summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/text/textpath-selection.svg
blob: 6e98a9d845a11b2ff2f5009b75c4da6bc0db2421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <path id="p" d="M 100,100 h 50 v 200" fill="none" stroke="red" stroke-width="1"/>
  <text style="font: 30px monospace"><textPath xlink:href="#p">a.b.c.d.e.</textPath></text>
  <script>
    var textPath = document.getElementsByTagName("textPath")[0];
    var range = document.createRange();
    range.setStart(textPath.firstChild, 1);
    range.setEnd(textPath.firstChild, 9);
    window.getSelection().addRange(range);
  </script>
</svg>