Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-dialog-element/dialog-setup-cleanup-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<link rel="author" href="mailto:wpt@keithcirkel.co.uk" />
<!-- This test passes if it does not crash. -->
<iframe src="./resources/showmodal-frame.html"></iframe>
<script>
new Promise((resolve) => (window.loaded = resolve)).then(() => {
const iframe = document.body.querySelector("iframe");
const iframeDoc = iframe.contentDocument;
iframe.remove();
iframeDoc.querySelector("dialog").close();
iframeDoc.querySelector("dialog").setAttribute("open", "");
document.body.append(iframe);
iframeDoc.querySelector("dialog").show();
});
</script>