[Pkg-mozext-commits] [adblock-plus] 328/464: Topic 11502 - EHH fails to recognize the first browser window opened
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 5fd651012789e5255f19ffa1d35b7c4259864cf0
Author: Wladimir Palant <trev at adblockplus.org>
Date: Thu Nov 8 15:43:45 2012 +0100
Topic 11502 - EHH fails to recognize the first browser window opened
---
lib/windowObserver.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/windowObserver.js b/lib/windowObserver.js
index ace20c5..5919d58 100644
--- a/lib/windowObserver.js
+++ b/lib/windowObserver.js
@@ -42,7 +42,7 @@ function WindowObserver(listener, when)
if (when == "start" || window.document.readyState == "complete")
this._listener.applyToWindow(window);
else
- this.observe(window, "domwindowopened", null);
+ this.observe(window, "chrome-document-global-created", null);
}
Services.obs.addObserver(this, "chrome-document-global-created", true);
@@ -75,16 +75,15 @@ WindowObserver.prototype =
observe: function(subject, topic, data)
{
- // Make sure page is not about:blank (work-around for bug 795961)
- if (subject instanceof Ci.nsIDOMWindow && subject.location.href !== "about:blank")
+ if (topic == "chrome-document-global-created")
{
+ let window = subject.QueryInterface(Ci.nsIDOMWindow);
if (this._when == "start")
{
this._listener.applyToWindow(window);
return;
}
- let window = subject.QueryInterface(Ci.nsIDOMWindow);
let event = (this._when == "ready" ? "DOMContentLoaded" : "load");
let listener = function()
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list