PreferenceManager: reducedTransparency property
User Preferences API
User Preferences API
The reducedTransparency read-only property of the PreferenceManager interface returns the PreferenceObject used to override the user's preference for the reduced transparency of the site.
Valid reducedTransparency PreferenceObject.value settings are reduce and no-preference.
Value
A PreferenceObject used to override the user's preference for the reduced transparency of the site.
Examples
Basic usage
This example demonstrates how to query the user's reduced transparency preference.
if (navigator.preferences.reducedTransparency.value === "reduce") {
// The user prefers reduced transparency.
} else {
// The user has stated no preference regarding transparency.
}