Bug 956724 - Fix broken onload handler for DOMWindows r=rnewman

From fdb5e3aab7479a9cf0ff7b78dcd373e296707e56 Mon Sep 17 00:00:00 2001
This commit is contained in:
Tim Taubert 2014-01-06 16:23:40 +01:00
Родитель bf63ad091c
Коммит a481c0db46
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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;
}
},