BrowserSetting
A BrowserSetting
is an object representing a browser setting.
It provides methods to set and get the setting's underlying value, to clear any change you've made to it, and to listen for changes to its value.
Note that while this object is based on the ChromeSetting type, this object does not distinguish between setting the value in normal browsing windows and in private browsing windows. This means that all parts of the API relating to private browsing (such as the scope
option to ChromeSetting.set()
) are not implemented.
Methods
types.BrowserSetting.get()
- Get the current value of the setting, and an enumeration representing how the setting is currently controlled.
types.BrowserSetting.set()
- Set the setting to a new value.
types.BrowserSetting.clear()
- Clear any change made to the setting by this extension.
Events
types.BrowserSetting.onChange
- Fired when the setting's value changes.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
BrowserSetting | ChromeFull supportYes | EdgeFull support79 | FirefoxFull support54 | OperaFull supportYes | SafariNo supportNo | Firefox for AndroidFull support54 |
onChange | ChromeFull supportYes | EdgeFull support79 | FirefoxFull support72 | OperaFull supportYes | SafariNo supportNo | Firefox for AndroidNo supportNo |
Legend
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Acknowledgements
This API is based on Chromium's chrome.types
API.