Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /custom-elements/iframe-custom-id-setter-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<script>
customElements.define('x-frame', class extends HTMLIFrameElement {
constructor() {
super();
document.body.append(this);
this.contentDocument.open();
this.contentDocument.close();
this.contentWindow.onbeforeunload = () => { this.id = 'first'; };
}
}, {extends: 'iframe'});
</script>
<iframe is="x-frame" srcdoc="" id="stale"></iframe>
<script>
document.querySelector('iframe').remove();
</script>