PreferenceObject: clearOverride() method
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 clearOverride method of the PreferenceObject interface resets the must be provided value.
Syntax
js
clearOverrides()
Parameters
None.
Return value
None (undefined).
Examples
>Basic usage
The following example clears the override of the must be provided.
js
navigator.preferences.colorScheme.clearOverride();
console.log(navigator.preferences.colorScheme.override);
Specifications
| Specification |
|---|
| Media Queries Level 5> # clear-override-method> |