summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html
blob: 9f9dfbc9384aa5a330a4304f9c586f62983564ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!doctype html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<script>
addEventListener("DOMContentLoaded", () => {
  let i = 5;
  document.addEventListener("selectstart", () => {
    window.find("AAA");
    document.querySelector("li").before(document.querySelector("text"));
    if (!(--i)) {
      document.documentElement.removeAttribute("class");
    }
  });
  document.execCommand("selectAll");
}, {once: true});
</script>
<body>
<svg>
<text>AAA</text>
<li>
</li></svg></body>
</html>