Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://raw.githubusercontent.com/mozilla-firefox/firefox/main/testing/web-platform/tests/svg/text/reftests/textpath-dynamic-remove-readd-target.svg
<svg width="400" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml" class="reftest-wait">
<title>Removing and re-adding the referenced path renders the text along it again</title>
<metadata>
<html:link rel="author" title="Nikolas Zimmermann" href="mailto:nzimmermann@igalia.com"/>
<html:link rel="match" href="textpath-dynamic-target-ref.svg"/>
</metadata>
<defs id="defs">
<path id="curve" d="M 10 100 Q 100 20 200 100 T 390 100"/>
</defs>
<text font-size="24">
<textPath href="#curve">Text along a quadratic curve</textPath>
</text>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
const path = document.getElementById("curve");
path.remove();
requestAnimationFrame(() => {
document.getElementById("defs").appendChild(path);
document.documentElement.classList.remove("reftest-wait");
});
});
});
</script>
</svg>