web api instance property
PreferenceManager: reducedTransparency property
Limited availabilitySecure context
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 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.
}
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.