| 1 |
<svg xmlns="http://www.w3.org/2000/svg"> |
| 2 |
<text xml:lang="en" x="50%" y="10%" text-anchor="middle" fill="blue"> |
| 3 |
Click the circle below. If the color of the circle has changed to green, |
| 4 |
then your browser passes this test. |
| 5 |
</text> |
| 6 |
<style type="text/css"> |
| 7 |
circle { |
| 8 |
fill: blue; |
| 9 |
} |
| 10 |
</style> |
| 11 |
<circle cx="50%" cy="50%" r="20%" onclick=" |
| 12 |
var o = document.getElementsByTagNameNS ('http://www.w3.org/2000/svg', 'style')[0]; |
| 13 |
var n = document.createElementNS ('http://www.w3.org/2000/svg', 'style'); |
| 14 |
n.type = 'text/css'; |
| 15 |
n.textContent = 'circle { fill: green }'; |
| 16 |
o.parentNode.replaceChild (n, o); |
| 17 |
"/> |
| 18 |
</svg> |