function runTest() {
win = window.open("file_bug1126851_post_unload.html", "");
// Reload replaces the inner window so we cannot wait for win.onunload
// and instead must rely on messages from the popup.
window.onmessage = function() {
if (gotUnload) {
SimpleTest.finish();
} else {
gotUnload = true;
ok(true, "got unload");
win.close();
}
}
// Bug 543435 caused there to be a resize event after `window.open` which
// is also there in other browsers. But now we must ensure to get the right
// resize event to avoid races.
let evt;
win.onresize = function(e) {
if (e == evt) {
win.location.reload();
}
}
win.onload = function() {
evt = new win.Event("resize", { bubbles: true });
win.document.dispatchEvent(evt);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.