summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/forwarddelete-in-list-editing-host-after-selectall-with-focus.html
blob: 266cc4fb600227ed134c062d6c01cf52a9f1abed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script>
addEventListener("load", () => {
  document.querySelector("ol[contenteditable]").focus();
  document.execCommand("selectAll");
  const targetListItem = document.querySelector("li + li");
  targetListItem.addEventListener("DOMSubtreeModified", () => {
    document.execCommand("forwardDelete");
    document.querySelector("script").appendChild(targetListItem);
  });
  targetListItem.setAttribute("scrolling", "auto");
});
</script>
<ol contenteditable>
<li>
<li>a</li>