text-style-01e.svg 668 B

1234567891011121314151617181920212223242526272829303132
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/
  4. -->
  5. <svg xmlns="http://www.w3.org/2000/svg" onload="m();">
  6. <title>Testcase for style changes</title>
  7. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=395155 -->
  8. <style id="s" type="text/css">
  9. tspan { fill: red; }
  10. </style>
  11. <script>
  12. function m()
  13. {
  14. var s = document.getElementById("s");
  15. s.appendChild(document.createTextNode("tspan { fill: green }"));
  16. s.appendChild(document.createTextNode("tspan { fill: red }"));
  17. s.removeChild(s.lastChild);
  18. }
  19. </script>
  20. <text>
  21. <tspan x="10" y="50">
  22. This should be green
  23. </tspan>
  24. </text>
  25. </svg>