about-blank-replacement-blank-nested-frame.html (551B)
1 <!doctype html> 2 <html> 3 <body> 4 <script> 5 function nestedLoaded() { 6 parent.postMessage({ type: 'NESTED_LOADED' }, '*'); 7 } 8 9 // Helper routine to make it slightly easier for our parent to find 10 // the nested frame. 11 function nested() { 12 return document.getElementById('nested').contentWindow; 13 } 14 15 // NOTE: Make sure not to touch the iframe directly here. We want to 16 // test the case where the initial about:blank document is not 17 // directly accessed before load. 18 </script> 19 <iframe id="nested" onload="nestedLoaded()"></iframe> 20 </body> 21 </html>