| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <body onload="AccessInnerDocument()"> | |
| 3 <div id="output"></div> | |
| 4 <iframe id="inner" src="resources/wrapper-context-inner.html"></iframe> | |
| 5 <script> | |
| 6 if (window.layoutTestController) { | |
| 7 layoutTestController.waitUntilDone(); | |
| 8 layoutTestController.dumpAsText(); | |
| 9 } | |
| 10 | |
| 11 // Write to the output div. | |
| 12 function WriteOutput(s) { | |
| 13 var paragraph = document.createElement("p"); | |
| 14 paragraph.innerHTML = s; | |
| 15 document.getElementById("output").appendChild(paragraph); | |
| 16 } | |
| 17 | |
| 18 // Used from the inner frame to know when this frame has accessed | |
| 19 // the document of the inner frame. | |
| 20 var innerDocument; | |
| 21 | |
| 22 // Once the inner frame has loaded, access it's document and assign | |
| 23 // the wrapper to innerDocument. | |
| 24 function AccessInnerDocument() { | |
| 25 if (inner.loaded) { | |
| 26 innerDocument = inner.document; | |
| 27 } else { | |
| 28 setTimeout(AccessInnerDocument, 100); | |
| 29 } | |
| 30 } | |
| 31 </script> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |