MCPcopy
hub / github.com/ampproject/amphtml / writeSafeFrame

Function writeSafeFrame

test/integration/test-amphtml-ads.js:503–508  ·  view source on GitHub ↗

* Write the HTML page into the provided iframe, turn it into a safe frame * then add it to the document.

(doc, iframe, adContent)

Source from the content-addressed store, hash-verified

501 * then add it to the document.
502 */
503function writeSafeFrame(doc, iframe, adContent) {
504 iframe.name = `1-0-31;${adContent.length};${adContent}{"uid": "test"}`;
505 iframe.src =
506 '//iframe.localhost:9876/test/fixtures/served/iframe-safeframe.html';
507 doc.body.appendChild(iframe);
508}
509
510/**
511 * Unregister the specified iframe from the host script at the specified window.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected