From c9520c0a59a6ee84ad86f03dad8d449e3ea14798 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 20 Dec 2010 00:38:47 -0500 Subject: [PATCH] Don't try to delete elem.dactylHighlight in hints. Closes issue #195. --- common/content/hints.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/hints.js b/common/content/hints.js index eb47296f..069b7275 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -373,7 +373,7 @@ const Hints = Module("hints", { * @param {boolean} active Whether it is the currently active hint or not. */ _setClass: function _setClass(elem, active) { - if (!("dactylHighlight" in elem)) + if (elem.dactylHighlight == null) elem.dactylHighlight = elem.getAttributeNS(NS, "highlight") || ""; let prefix = (elem.getAttributeNS(NS, "hl") || "") + " " + elem.dactylHighlight + " "; @@ -383,7 +383,8 @@ const Hints = Module("hints", { highlight.highlightNode(elem, prefix + "HintElem"); else { highlight.highlightNode(elem, elem.dactylHighlight); - delete elem.dactylHighlight; + // delete elem.dactylHighlight fails on Gecko 1.9. Issue #197 + elem.dactylHighlight = null; } },