зеркало из https://github.com/mozilla/gecko-dev.git
Bug 956724 - Fix broken onload handler for DOMWindows r=rnewman
From fdb5e3aab7479a9cf0ff7b78dcd373e296707e56 Mon Sep 17 00:00:00 2001
This commit is contained in:
Родитель
bf63ad091c
Коммит
a481c0db46
|
@ -304,12 +304,14 @@ TabTracker.prototype = {
|
|||
|
||||
switch (topic) {
|
||||
case "domwindowopened":
|
||||
// Add tab listeners now that a window has opened.
|
||||
subject.addEventListener("load", (event) => {
|
||||
let onLoad = () => {
|
||||
subject.removeEventListener("load", onLoad, false);
|
||||
// Only register after the window is done loading to avoid unloads.
|
||||
this._registerListenersForWindow(subject);
|
||||
}, false);
|
||||
};
|
||||
|
||||
// Add tab listeners now that a window has opened.
|
||||
subject.addEventListener("load", onLoad, false);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче