2 <title>getComputedStyle across windows
</title>
17 var i
= document
.getElementById("i");
19 var pout
= document
.getElementById("out");
20 var poutnone
= document
.getElementById("outnone");
21 var pin
= i
.contentDocument
.getElementsByTagName("p")[0];
22 var pinnone
= i
.contentDocument
.getElementsByTagName("p")[1];
24 document
.getElementById("res1").style
.color
=
25 window
.getComputedStyle(pin
).color
;
27 document
.getElementById("res2").style
.color
=
28 i
.contentWindow
.getComputedStyle(pout
).color
;
30 document
.getElementById("res3").style
.color
=
31 window
.getComputedStyle(pinnone
).color
;
33 document
.getElementById("res4").style
.color
=
34 i
.contentWindow
.getComputedStyle(poutnone
).color
;
40 <p id=
"out">This is a paragraph outside the iframe.
</p>
41 <div style=
"display:none"><p id=
"outnone">This is a paragraph outside the iframe.
</p></div>
43 <iframe id=
"i" src=
"computed-style-cross-window-inner.html" onload=
"run()"></iframe>
45 <div style=
"color:fuchsia">This paragraph is the color that
46 outerWindow.getComputedStyle says the paragraph inside the iframe
49 <div style=
"color:blue">This paragraph is the color that
50 iframeWindow.getComputedStyle says the paragraph outside the iframe
53 <div style=
"color:fuchsia">This paragraph is the color that
54 outerWindow.getComputedStyle says the display:none paragraph inside the
57 <div style=
"color:blue">This paragraph is the color that
58 iframeWindow.getComputedStyle says the display:none paragraph outside