Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bug fix: making sure a window tracker can't regress

  • Loading branch information...
commit bcd6572046b67e811d2b573f21dc145d4cf2dd71 1 parent b471d35
Erik Vold authored September 05, 2011
5  extension/modules/utils/Scriptish_windowEventTracker.js
@@ -8,6 +8,8 @@ lazyImport(this, "resource://scriptish/logging.js", ["Scriptish_log"]);
8 8
 lazyUtil(this, "getWindowIDs");
9 9
 lazyUtil(this, "windowUnloader");
10 10
 
  11
+const events = ["DOMContentLoaded", "load"];
  12
+
11 13
 const trackers = {};
12 14
 
13 15
 function Scriptish_windowEventTracker(aWin) {
@@ -16,6 +18,9 @@ function Scriptish_windowEventTracker(aWin) {
16 18
   trackers[winID] = "start";
17 19
 
18 20
   aWin.addEventListener("DOMContentLoaded", function() {
  21
+    // if the tracker event gte to this one has occurred then ignore
  22
+    if (~events.indexOf(trackers[winID])) return;
  23
+
19 24
     trackers[winID] = "DOMContentLoaded";
20 25
   }, false);
21 26
   /*

0 notes on commit bcd6572

Please sign in to comment.
Something went wrong with that request. Please try again.