From 3f68c63721f90e97aa9f5c8e297c7c84b7f9659d Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 24 Sep 2010 12:45:54 +0200 Subject: Push unfinished documentation to a separate branch --- .../overview-summary-persistent-page-mod.js.html | 228 --------------------- 1 file changed, 228 deletions(-) delete mode 100644 docs/html/overview-summary-persistent-page-mod.js.html (limited to 'docs/html/overview-summary-persistent-page-mod.js.html') diff --git a/docs/html/overview-summary-persistent-page-mod.js.html b/docs/html/overview-summary-persistent-page-mod.js.html deleted file mode 100644 index 927faba..0000000 --- a/docs/html/overview-summary-persistent-page-mod.js.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - Overview - - - - - - - - - - - - - - - - - - -
- - -
- - -
-
- -

persistent-page-mod.js

- -
- - - - -

Summary

-

- - No overview generated for 'persistent-page-mod.js'

- -

- -
- - - - - - - - - - - - -
- - Class Summary - -
PersistentPageMod 
-
- - - - - - - -
var timer = require("timer");
-var self = require("self");
-
-function PersistentPageMod(window, callback) {
-  memory.track(this);
-  this.window = window;
-  this.callback = callback;
-  this.window.addEventListener("unload", this, false);
-  this.window.addEventListener("DOMSubtreeModified", this, false);
-  this.doMod();
-  require("unload-2").ensure(this);
-}
-
-PersistentPageMod.prototype = {
-  REPLACE_DELAY: 100,
-  doMod: function doMod() {
-    try {
-      this.callback.call(undefined, this.window);
-    } catch (e) {
-      console.exception(e);
-    }
-    this.timerID = null;
-  },
-  handleEvent: function handleEvent(event) {
-    switch (event.type) {
-    case "unload":
-      if (event.target == this.window.document)
-        this.unload();
-      break;
-    case "DOMSubtreeModified":
-      if (this.timerID == null) {
-        // Wait a bit to do the replacing. Otherwise, we just get called
-        // tons of times in a tiny period and end up hanging the browser
-        // for a while.
-        var self = this;
-        this.timerID = timer.setTimeout(function() {self.doMod();},
-                                        this.REPLACE_DELAY);
-      }
-      break;
-    }
-  },
-  unload: function unload() {
-    if (this.timerID != null) {
-      timer.clearTimeout(this.timerID);
-      this.timerID = null;
-    }
-    this.window.removeEventListener("DOMSubtreeModified", this, false);
-    this.window.removeEventListener("unload", this, false);
-  }
-};
-
-require("errors").catchAndLogProps(PersistentPageMod.prototype,
-                                   "handleEvent");
-
-var register = exports.register = function register(window, callback) {
-  new PersistentPageMod(window, callback);
-};
-
-
- - - - - - - - - - - - - - - -
- -
- - -
- - - -
Documentation generated by JSDoc on Wed Jun 23 09:33:14 2010
- - -- cgit