getElementById-a-element-01.svg 605 B

12345678910111213141516171819202122232425262728
  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" version="1.1"
  6. onload="handleLoad(evt);">
  7. <title>Testcase for getElementById finding &lt;a&gt; element</title>
  8. <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=320724 -->
  9. <script type="application/ecmascript">
  10. <![CDATA[
  11. function handleLoad(event)
  12. {
  13. document.getElementById('a').setAttribute('fill', 'lime');
  14. }
  15. ]]>
  16. </script>
  17. <a id="a" fill="red">
  18. <rect width="100%" height="100%" fill="inherit"/>
  19. </a>
  20. </svg>