OLD | NEW |
---|---|
1 <head> | 1 <head> |
2 <style> | 2 <style> |
3 html, body { | |
4 margin: 0; | |
5 padding: 5px; | |
tdresser
2015/04/13 13:45:30
Why is this section necessary? Can both margin and
Rick Byers
2015/04/13 20:08:31
Right, scrollTop-scrollLeft-strict-quirks-modes.ht
| |
6 } | |
3 div { | 7 div { |
4 height: 9999px; | 8 height: 10000px; |
5 width: 9999px; | 9 width: 10000px; |
6 } | 10 } |
7 </style> | 11 </style> |
8 <script> | 12 <script> |
9 function scroll() { | 13 function scroll() { |
10 document.body.scrollTop = 5000; | 14 document.body.scrollTop = 5000; |
11 document.body.scrollLeft = 4000; | 15 document.body.scrollLeft = 4000; |
12 | 16 |
13 // The calls below should not take effect, given | 17 // The calls below should not take effect, given |
14 // that setting scrollTop/Left on the root node | 18 // that setting scrollTop/Left on the root node |
15 // is no-op in quirks-mode. | 19 // is no-op in quirks-mode. |
16 document.documentElement.scrollTop = 1; | 20 document.documentElement.scrollTop = 1; |
17 document.documentElement.scrollLeft = 1; | 21 document.documentElement.scrollLeft = 1; |
18 | 22 |
19 parent.verifyTest() | 23 parent.verifyTest() |
20 } | 24 } |
21 </script> | 25 </script> |
22 </head> | 26 </head> |
23 <body onload="scroll()"> | 27 <body onload="scroll()"> |
24 <div></div> | 28 <div></div> |
25 </body> | 29 </body> |
OLD | NEW |