Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Errors

/* Any copyright is dedicated to the Public Domain.
"use strict";
// Testing that there's no breaking exception when destroying
// an iframe early after its creation.
add_task(async function () {
const { tab } = await openInspectorForURL("about:blank");
const browser = tab.linkedBrowser;
// Create/remove an extra one now, after the load event.
for (let i = 0; i < 10; i++) {
await SpecialPowers.spawn(browser, [], async function () {
const iframe = content.document.createElement("iframe");
content.document.body.appendChild(iframe);
await new Promise(res => (iframe.onload = res));
iframe.remove();
});
}
});