Use of browserSettings not behaving the way doc describes

Using the example here:

to set the opening position of a new tab, I use:

browser.browserSettings.newTabPosition.set({value: "afterCurrent"});

as described in the doc. However I get error:

browser.browserSettings is undefined

What should I do?

Ugh, sorry for the noise, didn’t have permissions set.

What permission did you need to set?

If it’d be helpful to add that to the documentation, we can do that. :slight_smile:

browserSettings

It’s actually mentioned in the browserSettings doc:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings

but not in the browserSettings.newTabPosition doc:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings/newTabPosition

which is understandable, as I suppose they expect devs to have read the first one. It might be convenient to have it in both, but that could open a floodgate as I expect it is not normally done that way.

Thanks for enquiring.