[Pkg-mozext-commits] [wot] 51/226: Disconnect the correct observer.
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit c31e2e67f1944da8017c88c8471a0fc5f83159f9
Author: Sami Tolvanen <sami at mywot.com>
Date: Fri Sep 21 10:21:08 2012 +0300
Disconnect the correct observer.
---
content/search.js | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/content/search.js b/content/search.js
index 54e2d3a..c83f9a7 100644
--- a/content/search.js
+++ b/content/search.js
@@ -456,18 +456,16 @@ var wot_search =
return;
}
- wot_search.observer = new MutationObserver(function(mutation) {
- if (wot_search.observer) {
- wot_search.observer.disconnect();
- wot_search.observer = null;
- }
+ var mo = new MutationObserver(function(mutations, observer) {
+ observer.disconnect();
+ delete(observer);
window.setTimeout(function() {
wot_search.watch(content);
}, 500);
});
- wot_search.observer.observe(content, {
+ mo.observe(content, {
attributes: true, childList: true, subtree: true
});
} catch (e) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list