MozillaZine

updating very old addon

Talk about add-ons and extension development.
gaurangnshah
 
Posts: 3
Joined: September 4th, 2017, 4:01 am

Post Posted September 4th, 2017, 4:07 am

I developed a simple firefox add-on few years back, around 7 when firefox 3 was launched. I am updating the addon however, when I submitted it showed me couple of warning massage. I think there has been a lot of change recently and due that I am getting this warning message.

Would someone redirect me to a page where I can understand this errors and details.

Code: Select all
Markup should not be passed to `innerHTML` dynamically.


and few others are related to manager api.

Code: Select all
Obsolete Extension Manager API
var ver = -1, firstRun = true;
var gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]
                        .getService(Components.interfaces.nsIExtensionManager);


Code: Select all
Access to the `getService` global
Warning: This interface is part of the obsolete extension manager interface, which is not available in any remotely modern version of Firefox. It should not be referenced in any code.

var ver = -1, firstRun = true;
var gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]
                        .getService(Components.interfaces.nsIExtensionManager);

gaurangnshah
 
Posts: 3
Joined: September 4th, 2017, 4:01 am

Post Posted September 4th, 2017, 4:32 am

I resolved the last two with following code
Code: Select all
 Components.utils.import("resource://gre/modules/AddonManager.jsm");

AddonManager.getAddonByID("id", function(addon) {
        alert(addon.version)
});


could someone help me with first one.

Brummelchen
 
Posts: 2273
Joined: March 19th, 2005, 10:51 am

Post Posted September 4th, 2017, 10:17 am


Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest