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

Function makeChildIframeDocWrite

test/unit/test-3p-environment.js:231–242  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

229 }
230
231 function makeChildIframeDocWrite(win) {
232 const doc = win.document;
233 const iframe = doc.createElement('iframe');
234 iframe.name = 'testChild' + iframeCount++;
235 iframe.src = 'about:blank';
236 doc.body.appendChild(iframe);
237 iframe.contentWindow.document.open();
238 iframe.contentWindow.document.write('write: ' + iframe.name);
239 iframe.contentWindow.document.close();
240 doc.body.appendChild(doc.createElement('hr'));
241 return iframe;
242 }
243});

Callers 1

Calls 3

openMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected