5 testRunner
.dumpAsText();
7 if (!document
.getElementById('frame').document
)
8 result
= "TEST PASSED: The frame has no document property.";
9 else if (document
== document
.getElementById('frame').document
)
10 result
= "TEST FAILED: The document property is returning the document the iframe element is in.";
12 result
= "TEST FAILED: The document property is returning a document other than the one the iframe element is in, probably the document inside the frame.";
13 var resultElement
= document
.getElementById('result');
14 resultElement
.replaceChild(document
.createTextNode(result
), resultElement
.firstChild
);
17 <body onload=
"test()">
18 <p>This tests the document property on an HTMLIFrameElement.
19 Internet Explorer has a document property on all elements that gives the document the element is in.
20 Old versions of Safari had both this and another property on iframe elements to return the document
21 inside the iframe, which created an incompatibility with at least on SAP application because it
22 doesn't match the behavior of other browsers.
</p>
23 <p id=
"result">TEST NOT RUN
</p>
24 <iframe src=
"data:text/html,iframe contents" id=
"frame"></iframe>