diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-12 14:15:58 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-12 14:15:58 -0500 |
commit | 0d9f623bea3d5b4e6c8888b50b34fa17ac67b598 (patch) | |
tree | d1229ad0cd405625cca62f53f227cec850c0b134 /common/content/dactyl.js | |
parent | 0f9a558a3c63a8feffceaa0406375670b48505be (diff) | |
download | pentadactyl-0d9f623bea3d5b4e6c8888b50b34fa17ac67b598.tar.gz |
Fix finder with iframes. Fix dactyl cleanup on :rehash.
Diffstat (limited to 'common/content/dactyl.js')
-rw-r--r-- | common/content/dactyl.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 6918964a..141c30e7 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -29,7 +29,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { this.commands = {}; this.indices = {}; this.modules = modules; - this.observers = {}; + this._observers = {}; util.addObserver(this); this.commands["dactyl.help"] = function (event) { @@ -133,21 +133,21 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { }, registerObserver: function (type, callback, weak) { - if (!(type in this.observers)) - this.observers[type] = []; - this.observers[type].push(weak ? Cu.getWeakReference(callback) : { get: function () callback }); + if (!(type in this._observers)) + this._observers[type] = []; + this._observers[type].push(weak ? Cu.getWeakReference(callback) : { get: function () callback }); }, unregisterObserver: function (type, callback) { - if (type in this.observers) - this.observers[type] = this.observers[type].filter(function (c) c.get() != callback); + if (type in this._observers) + this._observers[type] = this._observers[type].filter(function (c) c.get() != callback); }, // TODO: "zoom": if the zoom value of the current buffer changed triggerObserver: function (type) { let args = Array.slice(arguments, 1); - if (type in this.observers) - this.observers[type] = this.observers[type].filter(function (callback) { + if (type in this._observers) + this._observers[type] = this._observers[type].filter(function (callback) { if (callback.get()) { callback.get().apply(null, args); return true; |