dynamic-textPath-02.svg 845 B

123456789101112131415161718192021222324252627
  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"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. class="reftest-wait">
  8. <title>Test for changes to the IDs in the document causing textPath references to update</title>
  9. <defs>
  10. <path id="p1" d="M 100,100 h 200"/>
  11. <path id="p1" d="M 100,200 h 200"/>
  12. </defs>
  13. <text style="16px sans-serif"><textPath xlink:href="#p1">Hello</textPath></text>
  14. <script>
  15. document.addEventListener("MozReftestInvalidate", doTest, false);
  16. setTimeout(doTest, 4000); // fallback for running outside reftest
  17. function doTest() {
  18. document.getElementsByTagName("path")[0].removeAttribute("id");
  19. document.documentElement.removeAttribute("class");
  20. }
  21. </script>
  22. </svg>