We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cba3cb5 commit a84ce22Copy full SHA for a84ce22
tests/samples/misc/testIFrame.html
@@ -8,7 +8,13 @@
8
9
<script>
10
var f = document.getElementById("frame0");
11
- alert("width: " + f.contentWindow.document.getElementById("frame0").width);
12
- alert("height: " + f.contentDocument.getElementById("frame0").height);
+
+ if (f.contentWindow) {
13
+ alert("width: " + f.contentWindow.document.getElementById("frame0").width);
14
+ }
15
16
+ if (f.contentDocument) {
17
+ alert("height: " + f.contentDocument.getElementById("frame0").height);
18
19
</script>
20
</html>
0 commit comments