Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that disables it given conditions:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/embedded-content/the-img-element/document-destroyed-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title><img> loading in destroyed document</title>
<iframe></iframe>
<script>
onload = function() {
const img = new Image();
img.onload = function() {
const iframe = document.querySelector('iframe');
iframe.contentDocument.createElement('div').innerHTML =
`<picture>
<source srcset="nonexistent.png">
<img src="data:image/gif;base64,R0lGODlhCgAKAIAAAP/MAAAAACH5BAAAAAAALAAAAAAKAAoAAAIIhI+py+0PYysAOw==">
</picture>`;
iframe.remove();
};
img.src = 'data:image/gif;base64,R0lGODlhCgAKAIAAAP/MAAAAACH5BAAAAAAALAAAAAAKAAoAAAIIhI+py+0PYysAOw==';
};
</script>