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 94503 cd8973ac8ba6d4c51b4ec84331559f404d5867ed
parent 94502 3472ef7a9d7b52073493010f57c6012fb36c8914
child 94504 a0c0d4a72648e6031825ae8d1023e57b5cdec827
push id9644
push userwjohnston@mozilla.com
push dateMon, 21 May 2012 19:32:05 +0000
treeherdermozilla-inbound@cd8973ac8ba6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs756689
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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");