OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <style> | |
4 div.test { | |
5 position: absolute; | |
6 left: 250px; | |
7 top: 100px; | |
8 } | |
9 </style> | |
10 <script> | |
11 | |
12 if (window.testRunner) | |
13 testRunner.dumpAsText(); | |
14 | |
15 function runTest() | |
16 { | |
17 var helloText = document.getElementById("hello"); | |
18 var positionField = document.getElementById("style position"); | |
19 var position = 50.0; | |
20 | |
21 var textRule = document.styleSheets[0].cssRules[0]; | |
22 var s = textRule.style; | |
23 var leftValue = s.getPropertyCSSValue("left"); | |
24 var console = document.getElementById("console"); | |
25 | |
26 try | |
27 { | |
28 leftValue.setFloatValue(leftValue.primitiveType, parseFloat(position)); | |
29 } | |
30 catch (e) | |
31 { | |
32 var line = document.createElement("div"); | |
33 line.innerText = "setFloatValue " + e.message; | |
34 console.appendChild(line); | |
35 } | |
36 } | |
37 | |
38 </script> | |
39 </head> | |
40 <body onload="runTest();"> | |
41 Test CSSPrimitiveValue setters. | |
42 <div class="test" id="hello"></div> | |
43 <pre id="console"></pre> | |
44 </body> | |
45 </html> | |
46 | |
OLD | NEW |