summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/inserthtml-in-li-in-option.html
blob: c8aa9f780f45b071b827704c564003808061c9b0 (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
25
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
document.addEventListener("DOMContentLoaded", () => {
  const select = document.querySelector("select");
  select.appendChild(document.querySelector("option"));
  select.appendChild(document.createElement("optgroup"));
  document.querySelector("p").appendChild(document.querySelector("li[contenteditable]"));
  getSelection().collapse(document.querySelector("output"), 0);
  document.execCommand("insertHTML", false, select.innerHTML);
});
</script>
</head>
<body>
<dl>
<select>a</select>
<p></p>
<option>
<li contenteditable>
<output>
</output><li></option></dl></body>
</html>