We use the Method of InstallTrigger https://developer.mozilla.org/en-US /docs/Web/API/InstallTrigger/install.
We would like to use an optional callback function invoked when the installation is complete.
There is the comment for this function
"Firefox 3 note. In Firefox 3 the callback is no longer invoked unless the website performing the installation is whitelisted."
Our code
{code}
ffRunInlineInstall: function() {
var self = this;
self.inlineCookies();
var params = {
“Foo”: {
URL: ‘https://addons.mozilla.org/firefox/downloads/latest/пульт/addon-745706-latest.xpi’,
IconURL: ‘https://addons.cdn.mozilla.net/user-media/addon_icons/745/745706-32.png’,
toString: function() {
return this.URL;
}
}
};
function callback() {
alert(“I am the Alert”);
}
InstallTrigger.install(params, callback);
}
{code}
Result:
As you can see there is no alert after successful addon installation which means our callback function is not invoked