Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/text/reftests/lang-attribute-dynamic.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="utf-8"?>
class="reftest-wait">
<metadata>
<title>Update of lang attribute should recalculate style</title>
<h:link rel="match" href="lang-attribute-dynamic-ref.svg"/>
</metadata>
<style>
tspan:lang(ja) { fill: lime; }
</style>
<text>
<tspan x="10" y="100" font-size="90">Quick</tspan>
<tspan x="10" y="200" font-size="90">Brown</tspan>
<tspan x="10" y="300" font-size="90">Fox</tspan>
</text>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.querySelectorAll('tspan')[0].setAttribute('lang', 'ja');
document.documentElement.classList.remove('reftest-wait');
});
});
</script>
</svg>