Referenceerror While Using Sdk/tabs In Firefox Webextension
Solution 1:
The error is on package.json
line 6: you're telling to the addon sdk that the main file of your addon is manage.json
. According to [the docs] the value of main should be:
A string representing the name of a program module that is located in one of the top-level module directories specified bylib. Defaults to"index.js".
So you need to change its value to index.js
.
Besides that, I think you're missing a difference between Firefox addon built using the addon-sdk (which do not have a ´manifest.json´ and that you build using jpm tool) and the new WebExtensions which do require you to write a ´manifest.json´ like the one already have.
UPDATE:
Again: you're missing the difference between WebExtensions and SDK-based addons. Now you made a WebExtension but you're trying to use the SDK. It isn't possible. Just use chrome.tabs
directly instead of trying to import it from the sdk (var tabs = require("sdk/tabs");
).
Post a Comment for "Referenceerror While Using Sdk/tabs In Firefox Webextension"