Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/svg/text/textpath-selection.svg
<!--
Any copyright is dedicated to the Public Domain.
-->
<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>