summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/elements/the-innertext-and-outertext-properties/innertext-domnoderemoved-crash.html
blob: 94043caf69cc50dc7445ef67448058ba9ffd869b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1411135">

<div id=parentelement><div id=childelement>hello world</div></div>

<script>
  let removed = false;
  childelement.addEventListener('DOMNodeRemoved', () => {
    if (!removed) {
      removed = true;
      childelement.remove();
    }
  });
  parentelement.innerText = 'hello world';
</script>