mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 956724 - Fix broken onload handler for DOMWindows r=rnewman
From fdb5e3aab7479a9cf0ff7b78dcd373e296707e56 Mon Sep 17 00:00:00 2001
This commit is contained in:
parent
9e6ed1c053
commit
63400d0e78
@ -304,12 +304,14 @@ TabTracker.prototype = {
|
|||||||
|
|
||||||
switch (topic) {
|
switch (topic) {
|
||||||
case "domwindowopened":
|
case "domwindowopened":
|
||||||
// Add tab listeners now that a window has opened.
|
let onLoad = () => {
|
||||||
subject.addEventListener("load", (event) => {
|
|
||||||
subject.removeEventListener("load", onLoad, false);
|
subject.removeEventListener("load", onLoad, false);
|
||||||
// Only register after the window is done loading to avoid unloads.
|
// Only register after the window is done loading to avoid unloads.
|
||||||
this._registerListenersForWindow(subject);
|
this._registerListenersForWindow(subject);
|
||||||
}, false);
|
};
|
||||||
|
|
||||||
|
// Add tab listeners now that a window has opened.
|
||||||
|
subject.addEventListener("load", onLoad, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user