httpsOnlyMode Setting
Allow users to query the mode for ‘HTTPS-Only Mode’. This setting’s value is of type HTTPSOnlyModeOption, defaulting to never.
Permissions
The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.
Hint
Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.
privacy
Read and modify privacy settings.
Examples
To read the httpsOnlyMode setting:
let { value } = await messenger.privacy.network.httpsOnlyMode.get({});
Functions
get(details)
Gets the value of a setting.
Parameters
details
Return type (Promise)
_returns
Details of the currently effective value.
levelOfControl
The level of control of the setting.
value
The value of the setting.
incognitoSpecific
Whether the effective value is specific to the incognito session. This property will only be present if the incognito property in the details parameter of get() was true.
Required permissions
Events
onChange
Fired after the setting changes.
Parameters for onChange.addListener(listener)
listener(details)
A function that will be called when this event occurs.
Parameters passed to the listener function
details
levelOfControl
The level of control of the setting.
value
The value of the setting after the change.
incognitoSpecific
Whether the value that has changed is specific to the incognito session. This property will only be present if the user has enabled the extension in incognito mode.
Required permissions
Types
LevelOfControl
One of
not_controllable: cannot be controlled by any extension
controlled_by_other_extensions: controlled by extensions with higher precedence
controllable_by_this_extension: can be controlled by this extension
controlled_by_this_extension: controlled by this extension