Skip to content
Snippets Groups Projects
Verified Commit 18df7699 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Improve backward compatibility

parent 27a60cde
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@
* Imports
*/
var webextension = require('sdk/webextension');
var preferences = require('sdk/simple-prefs');
var webextension = null;
var self = require('sdk/self');
var tabs = require("sdk/tabs");
......@@ -66,6 +66,12 @@ exports.main = function (options) {
}
}
try {
webextension = require('sdk/webextension');
} catch (exception) {
return;
}
// Initialize the embedded WebExtension.
webextension.startup().then(({ browser }) => {
......@@ -113,7 +119,7 @@ exports.onUnload = function () {
// Sends injection updates to the WebExtension.
exports.broadcastInjection = function () {
if (typeof webextensionPort === 'object') {
if (webextensionPort !== null) {
webextensionPort.postMessage({
'subject': 'register-injection'
......
......@@ -13,8 +13,8 @@
"multiprocess": true
},
"engines": {
"firefox": ">=51.0a1",
"fennec": ">=51.0a1",
"firefox": ">=38.0a1",
"fennec": ">=38.0a1",
"seamonkey": ">=2.0a1 <=2.46",
"{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}": ">=27.1.0b1"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment