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
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
