[Pkg-mozext-commits] [adblock-plus] 24/98: Issue 4211 - Improve detection of uninitialized documents for means of element hiding
David Prévot
taffit at moszumanska.debian.org
Tue Oct 24 01:30:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 57cca920e7015fbb37187eee05e0f0443b51ba4a
Author: Wladimir Palant <trev at adblockplus.org>
Date: Mon Jul 18 16:01:13 2016 +0200
Issue 4211 - Improve detection of uninitialized documents for means of element hiding
---
lib/child/elemHide.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/child/elemHide.js b/lib/child/elemHide.js
index ddd0a4f..0c6f411 100644
--- a/lib/child/elemHide.js
+++ b/lib/child/elemHide.js
@@ -325,13 +325,14 @@ let observer = {
if (topic != this.topic)
return;
- if (!subject.location || !subject.location.href)
+ if (subject.document.readyState == "uninitialized")
{
- // The window is in an invalid state - delay processing until it's ready.
+ // It would be nice to listen to the readystatechange event here. However,
+ // it doesn't fire when changing from "uninitialized" state.
Utils.runAsync(() =>
{
if (!Cu.isDeadWrapper(subject))
- this.observe(subject, topic, data)
+ this.observe(subject, topic, data);
});
return;
}
--
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