6 window
.addAndTransferIframe = function()
8 iframe
= document
.createElement('iframe');
9 iframe
.setAttribute('width', '500');
10 iframe
.setAttribute('height', '350');
11 iframe
.setAttribute('src', 'iframe-reparenting-close-window-iframe.html');
12 window
.document
.body
.appendChild(iframe
);
15 // Called from Iframe when it is loaded and initialized.
16 window
.transferIframe = function()
18 var backgroundWin
= window
.opener
;
19 backgroundWin
.log("Transferring Iframe now.");
20 backgroundWin
.document
.adoptNode(iframe
);
21 backgroundWin
.document
.body
.appendChild(iframe
);
22 iframe
.contentWindow
.finish();