blob: 2ced14163e4fb29347de3f0c0318e6136f3778d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
function test() {
iframe = document.querySelector('iframe');
shouldBeTrue('iframe instanceof HTMLIFrameElement');
shouldBeFalse('iframe instanceof iframe.contentWindow.HTMLIFrameElement');
finishJSTest();
}
description("Accessing window.frameElement from inside an iframe should not cause the <iframe>'s prototype to come from its own context.");
window.jsTestIsAsync = true;
</script>
</head>
<iframe onload="test();" srcdoc="
<script>
window.frameElement;
</script>
"></iframe>
</body>
</html>
|