summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/insert-image-with-joining-header-element-and-body.html
blob: cf5b2df225be06c833fea6d3bf2ceab6b1231018 (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>
  <script>
    window.addEventListener("load", () => {
      const heading = document.getElementById("heading")
      const input = document.createElementNS("http://www.w3.org/1999/xhtml", "input")
      heading.appendChild(input)
      const selection = window.getSelection()
      const range = new Range()
      range.setStartBefore(input)
      heading.contentEditable = true
      document.execCommand("selectAll", false, null)
      document.designMode = "on"
      selection.addRange(range)
      range.setEndBefore(heading)
      range.setEndAfter(heading)
      document.execCommand("insertImage", false, "wss://:pass@[::1]$/")
    })
  </script>
</head>
<h4 id="heading"></h4>
<!-- COMMENT -->
</html>