Bug 756689 - Send notifications when addon options are shown. r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Mon, 21 May 2012 12:31:36 -0700
changeset 96775 cd8973ac8ba6d4c51b4ec84331559f404d5867ed
parent 96774 3472ef7a9d7b52073493010f57c6012fb36c8914
child 96776 a0c0d4a72648e6031825ae8d1023e57b5cdec827
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs756689
milestone15.0a1
Bug 756689 - Send notifications when addon options are shown. r=mfinkle
mobile/android/chrome/content/aboutAddons.js
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -271,27 +271,25 @@ var Addons = {
         let settings = xhr.responseXML.querySelectorAll(":root > setting");
         for (let i = 0; i < settings.length; i++) {
           var setting = settings[i];
           var desc = stripTextNodes(setting).trim();
           if (!setting.hasAttribute("desc"))
             setting.setAttribute("desc", desc);
           box.appendChild(setting);
         }
-/*
         // Send an event so add-ons can prepopulate any non-preference based
         // settings
         let event = document.createEvent("Events");
         event.initEvent("AddonOptionsLoad", true, false);
-        this.dispatchEvent(event);
+        window.dispatchEvent(event);
 
         // Also send a notification to match the behavior of desktop Firefox
-        let id = this.id.substring(17); // length of |urn:mozilla:item:|
+        let id = aListItem.getAttribute("addonID");
         Services.obs.notifyObservers(document, "addon-options-displayed", id);
-*/
       }
     } catch (e) {
       Cu.reportError(e)
     }
 
     let list = document.querySelector("#addons-list");
     list.style.display = "none";
     let details = document.querySelector("#addons-details");