Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/nodes/crashtests/replaceChild-host-including-ancestor-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<div id="outer"><div id="inner"></div></div>
<script>
const shadow = inner.attachShadow({ mode: "open" });
const p = shadow.appendChild(document.createElement("p"));
try { shadow.replaceChild(outer, p); } catch (e) {}
try { shadow.moveBefore(outer, p); } catch (e) {}
</script>