Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/syntax/parsing/crashtests/adoption-agency-shift-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Crash in the adoption agency algorithm due to shifted lists</title>
<iframe id="ifr"></iframe>
<script>
let ifr = document.getElementById('ifr');
let ifrWin = ifr.contentWindow;
class XFoo extends ifrWin.HTMLElement {
constructor() {
super();
if (ifrWin.didReenter) return;
ifrWin.didReenter = true;
document.write('</b>');
}
}
ifrWin.customElements.define("x-foo", XFoo, { extends: "b" });
document.write('<b><b is="x-foo" id="fmt"><div id="block"><script>' +
'let b = document.getElementById("block");' +
'let i = document.getElementById("ifr");' +
'i.contentDocument.adoptNode(b);' +
'<\/script></b>');
</script>