summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-2-selection-ranges-and-one-is-outside-body.html
blob: d248c333d940fff01e2c2f183f5717970a89b61e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener('DOMContentLoaded', () => {
  const form = document.createElement("form");
  const range = new Range();
  document.documentElement.contentEditable = true;
  document.execCommand("formatBlock", false, "h3");
  document.documentElement.appendChild(form);
  range.setStartBefore(form);
  getSelection().addRange(range);
  range.selectNode(form);
  document.execCommand("insertHorizontalRule");
});
</script>
</head>
</html>