BrowserSetting.onChange event is fired when the setting is changed.
On Firefox, it doesn't fire if the change has been made through
BrowserSetting.onChange.addListener(listener) BrowserSetting.onChange.removeListener(listener) BrowserSetting.onChange.hasListener(listener)
Events have three functions:
Adds a listener to this event.
Stop listening to this event. The
listenerargument is the listener to remove.
listeneris registered for this event. Returns
trueif it is listening,
A callback function that will be called when this event occurs. The function will be passed the following arguments:
objectcontaining details of the change that occurred. Its properties are as follows:
The new value of the setting. The type of this property is determined by the particular setting.
string. This represents the way the setting is currently controlled. You can use it to check whether you can modify the setting. See
BrowserSetting.set()for details. Its value may be any of the following:
Extensions are not allowed to modify this setting.
Another extension that was installed after this one has modified this setting.
This extension is allowed to modify the setting.
This extension has already modified the setting.
BCD tables only load in the browser
Note: This API is based on Chromium's