OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script> | |
3 if (window.testRunner) | |
4 testRunner.waitUntilDone(); | |
5 | |
6 function setScale() { | |
7 var obj = document.getElementById("object"); | |
fs
2016/03/29 11:58:51
Could use querySelector and avoid the id=...
Shanmuga Pandi
2016/03/31 09:04:37
Done.
| |
8 var svgdoc = obj.contentDocument; | |
9 var svgroot = svgdoc.documentElement; | |
10 svgroot.currentScale = 0.5; | |
11 if (window.testRunner) | |
12 setTimeout(function() { testRunner.notifyDone(); }, 0); | |
fs
2016/03/29 11:58:51
Could you use runAfterLayoutAndPaint here instead?
Shanmuga Pandi
2016/03/31 09:04:37
Done.
| |
13 } | |
14 </script> | |
15 | |
16 <body> | |
17 <object id="object" onload="setScale()" data="resources/green-rect.svg" type ="image/svg+xml"/> | |
fs
2016/03/29 11:58:51
I'd suggest that you add a "reference" (another gr
Shanmuga Pandi
2016/03/31 09:04:37
Done.
| |
18 </body> | |
OLD | NEW |