web api instance property
PreferenceObject: validValues property
Limited availabilitySecure context
The validValues read-only property of the PreferenceObject interface returns a read-only array of values that are accepted by the override.
validValues
An array containing the valid values to override the PreferenceObject value with.
Examples
Basic usage
This example demonstrates how to log all possible contrast values.
console.log(navigator.preferences.contrast.validValues);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.