summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/crashtests/1423776.html
blob: 4790a79f3196950cf24121c3c86b40f5bf6fa78b (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
<script>
function onLoad() {
  const svg = document.querySelector("svg");
  const feConvolveMatrix = document.querySelectorAll("feConvolveMatrix");
  // For emulating the traditional behavior, collapse Selection to end of the
  // text node in the last <svg> which is the deepest last child of the <body>
  // (i.e., at end of the text node after the last <feConvolveMatrix>).
  getSelection().collapse(svg.lastChild, svg.lastChild.length);
  feConvolveMatrix[0].addEventListener("DOMNodeInserted", () => {
    svg.appendChild(feConvolveMatrix[1]);
    document.execCommand("insertOrderedList", false);
  });
  feConvolveMatrix[0].insertAdjacentHTML(
    "afterBegin",
    document.querySelector("table").outerHTML
  );
}
</script>
<body onload="onLoad()">
<table></table>
<b contenteditable>
<svg>
<feConvolveMatrix/>
<feConvolveMatrix/>
</svg></body>