|
1 <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" onload="setTimeout(boom, 30)" class="reftest-wait"> |
|
2 |
|
3 <script> |
|
4 |
|
5 var originalRoot = document.documentElement; |
|
6 var svgCircle; |
|
7 |
|
8 function boom() |
|
9 { |
|
10 var SVG_NS = "http://www.w3.org/2000/svg"; |
|
11 |
|
12 var svgPolyline = document.createElementNS(SVG_NS, 'polyline'); |
|
13 svgCircle = document.createElementNS(SVG_NS, 'circle'); |
|
14 |
|
15 svgCircle.appendChild(svgPolyline); |
|
16 |
|
17 document.removeChild(originalRoot); |
|
18 document.appendChild(svgCircle); |
|
19 |
|
20 setTimeout(restore, 30); |
|
21 } |
|
22 |
|
23 function restore() |
|
24 { |
|
25 // We have to put it the root element back in the document so that reftest.js |
|
26 // sees the event for the removal of class="reftest-wait"! |
|
27 document.removeChild(svgCircle); |
|
28 document.appendChild(originalRoot); |
|
29 document.documentElement.removeAttribute("class"); |
|
30 } |
|
31 |
|
32 </script> |
|
33 |
|
34 </svg> |