[Pkg-mozext-commits] [firebug] 14/15: Issue 5768: Feedback from 1.10 Review (properly register event listeners)

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 22:46:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag firebug-1.10.5
in repository firebug.

commit 27742e44800d1d3468798054c196ae2adb4d9eb4
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Thu Oct 18 15:12:35 2012 +0200

    Issue 5768: 	Feedback from 1.10 Review (properly register event listeners)
---
 .../firebug/firefox/external-editors/externalEditors.js      | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/extension/content/firebug/firefox/external-editors/externalEditors.js b/extension/content/firebug/firefox/external-editors/externalEditors.js
index 3fe7775..ee9097e 100644
--- a/extension/content/firebug/firefox/external-editors/externalEditors.js
+++ b/extension/content/firebug/firefox/external-editors/externalEditors.js
@@ -237,11 +237,17 @@ Firebug.ExternalEditors = Obj.extend(Firebug.Module,
         var item = doc.createElement("menu");
         item.setAttribute("type", "splitmenu");
         item.setAttribute("iconic", "true");
-        item.setAttribute("oncommand", "Firebug.ExternalEditors.onContextMenuCommand(event)");
+
+        item.addEventListener("command", function(event)
+        {
+            Firebug.ExternalEditors.onContextMenuCommand(event);
+        });
 
         var menupopup = doc.createElement("menupopup");
-        menupopup.setAttribute("onpopupshowing",
-            "return Firebug.ExternalEditors.onEditorsShowing(this)");
+        menupopup.addEventListener("popupshowing", function(event)
+        {
+            return Firebug.ExternalEditors.onEditorsShowing(this)
+        });
 
         item.appendChild(menupopup);
         return item;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list