I am developing my first firefox extension on vscode and just discovered that autocomplete/intellisense isn't working for web extension APIs e.g. browser.tab
, browser.extension
like it does for regular JavaScript. I like the intellisense feature because it minimizes errors and docs consultation. A google search result suggested I add:
{
"typeAcquisition": {
"include": ["firefox"]
}
}
in a jsconfig.json file which I've done but the issue still persists. Is there a way I can get intellisense to work here or am I out of luck?
Create a
jsconfig.json
file in your source and add this line to it ⤵︎You should then have suggestions for the
browser
namespace.