summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/text/reftests/lang-attribute-dynamic.svg
blob: d57b4decde7f57684504d917a77a06df1009902a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"
     class="reftest-wait">
  <metadata>
    <title>Update of lang attribute should recalculate style</title>
    <h:link rel="help" href="https://svgwg.org/svg2-draft/struct.html#LangSpaceAttrs"/>
    <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>