summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/accessibility/crashtests/computed-accessible-text-node.html
blob: 47183ce6ec64a630f0a6c78102337ea3f0667b7d (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
<html class="test-wait">
<img id="img1">text
<script>

// Bypass this abandoned syntax in all but the engines that implement it.
if (typeof getComputedAccessibleNode !== 'undefined') {

  async function trigger1() {
    let img = document.getElementById('img1');
    let computed_accessible_node = await self.getComputedAccessibleNode(img);
    // The next sibling is a text node.
    let next_sibling = computed_accessible_node.nextSibling;
    await next_sibling.ensureUpToDate();
    document.documentElement.className = '';
  }
  trigger1();

} else {
  // Pass in other engines that have not implemented the abandoned API
  document.documentElement.className = '';
}

</script>
</html>