|
1 <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" onload="boom();"> |
|
2 |
|
3 <script> |
|
4 |
|
5 function boom() |
|
6 { |
|
7 var SVG_NS = "http://www.w3.org/2000/svg"; |
|
8 |
|
9 var svgCircle = document.createElementNS(SVG_NS, 'circle'); |
|
10 var svgText = document.createElementNS(SVG_NS, 'text'); |
|
11 svgText.appendChild(document.createTextNode("foo")); |
|
12 svgCircle.appendChild(svgText); |
|
13 |
|
14 document.removeChild(document.documentElement); |
|
15 document.appendChild(svgCircle); |
|
16 } |
|
17 |
|
18 </script> |
|
19 |
|
20 </svg> |