MDN self-hosted library · e01.org

PreferenceObject: validValues property

User Preferences API

Open notebook · 1 cells web-api-instance-property upstream source

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);

Specifications

Browser compatibility