summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/justifycenter-then-delete-selection-on-DOMSubtreeModified.html
blob: 1ee9ac35cb8fc1a969322d12536a9f446cd4bb35 (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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
  document.execCommand("selectAll");
  document.querySelector("li").addEventListener("DOMSubtreeModified", () => {
    document.designMode = "on";
    document.execCommand("justifyCenter");
    getSelection().deleteFromDocument();
  });
  document.querySelector("li").type = "1";
});
</script>
</head>
<body>
<li>
  <h3 align="right">
    <option contenteditable="true"></option>
  </h3>
</li>
</body>
</html>