MCPcopy Create free account
hub / github.com/nodejs/node / newIframe

Function newIframe

test/fixtures/wpt/html/anonymous-iframe/resources/common.js:16–23  ·  view source on GitHub ↗
(child_origin)

Source from the content-addressed store, hash-verified

14// Create a normal iframe. The new document will execute any scripts sent
15// toward the token it returns.
16const newIframe = (child_origin) => {
17 const sub_document_token = token();
18 let iframe = document.createElement('iframe');
19 iframe.src = child_origin + executor_path + `&uuid=${sub_document_token}`;
20 iframe.credentialless = false
21 document.body.appendChild(iframe);
22 return sub_document_token;
23};
24
25// Create a popup. The new document will execute any scripts sent toward the
26// token it returns.

Calls 2

createElementMethod · 0.80
tokenFunction · 0.50

Tested by

no test coverage detected