PreferenceObject
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The PreferenceObject interface of the User Preferences API provides attributes and methods for reading and overriding user preferences.
Use the document's PreferenceManager (accessed via Navigator.preferences) to get access to the PreferenceObject objects representing each available preference.
The PreferenceManager interface inherits from EventTarget.
Instance properties
PreferenceObject.overrideRead only Experimental-
The override value if set,
nullotherwise. PreferenceObject.valueRead only Experimental-
The override value if set, the UA default otherwise.
PreferenceObject.validValuesRead only Experimental-
The valid values for the override.
Instance methods
PreferenceObject.clearOverride()Experimental-
Resets any previously set override to
nulland fires the must be provided event. PreferenceObject.requestOverride()Experimental-
Requests an override of the preference and fires the must be provided event on success.
Events
changeExperimental-
Fired when the override is set or reset.
Specifications
| Specification |
|---|
| Media Queries Level 5 # preference-object-interface |