summaryrefslogtreecommitdiff
path: root/common/modules/overlay.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/overlay.jsm')
-rw-r--r--common/modules/overlay.jsm6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm
index 64e056cc..6cc124d4 100644
--- a/common/modules/overlay.jsm
+++ b/common/modules/overlay.jsm
@@ -460,9 +460,9 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
if (doc.readyState === "complete")
load();
else
- doc.addEventListener("load", util.wrapCallback(function onLoad(event) {
- if (event.originalTarget === event.target) {
- doc.removeEventListener("load", onLoad.wrapper, true);
+ window.addEventListener("load", util.wrapCallback(function onLoad(event) {
+ if (event.originalTarget === doc) {
+ window.removeEventListener("load", onLoad.wrapper, true);
load(event);
}
}), true);