summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-dynamic-update.html
blob: 5dc68244fe0f896388ce7a0ff9d8f49397395078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html class=reftest-wait>
<title>legend and dynamic update</title>
<link rel=fieldset-foo-ref.html>
<p>There should be a normal fieldset below with the legend "Foo".</p>
<fieldset>
  <legend>F</legend>
</fieldset>
<script>
  const legend = document.querySelector('legend');
  // force layout
  legend.offsetTop;
  requestAnimationFrame(() => {
    legend.textContent += "oo";
    requestAnimationFrame(() => {
      document.documentElement.removeAttribute('class');
    });
  });
</script>