diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index d27876bc..e1246b7f 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -302,6 +302,9 @@ var DOM = Class("DOM", { }, get editor() { + if (!this.length) + return; + this[0] instanceof Ci.nsIDOMNSEditableElement; if (this[0].editor instanceof Ci.nsIEditor) return this[0].editor; @@ -511,6 +514,9 @@ var DOM = Class("DOM", { elem.setAttributeNS(ns, k, v); }); + if (!this.length) + return null; + if (Set.has(hooks, key) && hooks[key].get) return hooks[key].get.call(this, this[0]); diff --git a/common/modules/messages.jsm b/common/modules/messages.jsm index 0473e692..5def642b 100644 --- a/common/modules/messages.jsm +++ b/common/modules/messages.jsm @@ -12,7 +12,6 @@ defineModule("messages", { require: ["services", "util"] }, this); -// TODO: Lazy instantiation var Messages = Module("messages", { init: function init(name) { diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm index fc841df5..4d048c4b 100644 --- a/common/modules/overlay.jsm +++ b/common/modules/overlay.jsm @@ -498,7 +498,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen Object.defineProperty(object, k, desc); if (callable(value)) { - let sentinel = "(function DactylOverlay() {}())" + var sentinel = "(function DactylOverlay() {}())" value.toString = function toString() toString.toString.call(this).replace(/\}?$/, sentinel + "; $&"); value.toSource = function toSource() toSource.toSource.call(this).replace(/\}?$/, sentinel + "; $&"); } diff --git a/melodactyl/components/protocols.js b/melodactyl/components/protocols.js deleted file mode 120000 index 7c25b746..00000000 --- a/melodactyl/components/protocols.js +++ /dev/null @@ -1 +0,0 @@ -../../common/components/protocols.js \ No newline at end of file diff --git a/pentadactyl/components/protocols.js b/pentadactyl/components/protocols.js deleted file mode 120000 index 7c25b746..00000000 --- a/pentadactyl/components/protocols.js +++ /dev/null @@ -1 +0,0 @@ -../../common/components/protocols.js \ No newline at end of file diff --git a/teledactyl/components/protocols.js b/teledactyl/components/protocols.js deleted file mode 120000 index 7c25b746..00000000 --- a/teledactyl/components/protocols.js +++ /dev/null @@ -1 +0,0 @@ -../../common/components/protocols.js \ No newline at end of file