PreferenceObject: validValues property
User Preferences API
User Preferences API
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);