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

Function newFencedFrame

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

Source from the content-addressed store, hash-verified

34// Create a fenced frame. The new document will execute any scripts sent
35// toward the token it returns.
36const newFencedFrame = async (child_origin) => {
37 const support_loading_mode_fenced_frame =
38 "|header(Supports-Loading-Mode,fenced-frame)";
39 const sub_document_token = token();
40 const url = child_origin + executor_path +
41 support_loading_mode_fenced_frame +
42 `&uuid=${sub_document_token}`;
43 const urn = await generateURNFromFledge(url, []);
44 attachFencedFrame(urn);
45 return sub_document_token;
46};
47
48const importScript = (url) => {
49 const script = document.createElement("script");

Callers

nothing calls this directly

Calls 1

tokenFunction · 0.50

Tested by

no test coverage detected