| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 function log(msg) | |
| 5 { | |
| 6 var console = document.getElementById('console'); | |
| 7 console.appendChild(document.createTextNode(msg + "\n")); | |
| 8 } | |
| 9 | |
| 10 function test() | |
| 11 { | |
| 12 if (window.testRunner) | |
| 13 testRunner.dumpAsText(); | |
| 14 | |
| 15 var element = document.getElementById('nonPositionedDiv'); | |
| 16 var compStyle = element.ownerDocument.defaultView.getComputedStyle(e
lement, null); | |
| 17 log("Non-positioned Div:"); | |
| 18 log(" Computed Style = " + compStyle.zIndex + " (Should be auto)"
); | |
| 19 log(" element.style.zIndex = " + element.style.zIndex + " (Should
be 20)"); | |
| 20 log(""); | |
| 21 | |
| 22 element = document.getElementById('positionedDiv'); | |
| 23 compStyle = element.ownerDocument.defaultView.getComputedStyle(eleme
nt, null); | |
| 24 log("Positioned Div:"); | |
| 25 log(" Computed Style = " + compStyle.zIndex + " (Should be 20)"); | |
| 26 log(" element.style.zIndex = " + element.style.zIndex + " (Should
be 20)"); | |
| 27 } | |
| 28 </script> | |
| 29 </head> | |
| 30 <body onload="test();"> | |
| 31 <div style="z-index:20" id='nonPositionedDiv'></div> | |
| 32 <div style="z-index:20; position: absolute" id='positionedDiv'></div> | |
| 33 <pre id='console'></pre> | |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |