summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/move-first-element-from-editinghost-to-outside-on-input-of-embolden.html
blob: 6bb87c2810914d76a56492d6c86ac298cf3bade3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
addEventListener("load", () => {
  document.querySelector("ol").addEventListener("input", () => {
    const inlineEditingHost = document.querySelector("span[contenteditable]");
    const iter = document.createNodeIterator(inlineEditingHost, NodeFilter.SHOW_ELEMENT);
    iter.nextNode().before(inlineEditingHost);
  });
  document.execCommand("selectAll");
  document.execCommand("bold");
});
</script>
</head>
<body>
<ol>
<span contenteditable>
<h6></h6>
</span></ol></body>
</html>