Why the HighContrastChanged Event does not work in my js code?
Xin Xin4 Su
1
Reputation point
I need get the system high contrast changed, so I monitor the "HighContrastChanged" event, but it can not work, but it is normal in C#.
below is my code sample,
accessbilitySettings= Windows.UI.ViewManagement.AccessibilitySettings();
accessbilitySettings.addEventListener("highcontrastchanged", this.onHighContrastChanged);
onHighContrastChanged() {
console.log(onHighContrastChanged
);
}
the onHighContrastChanged() can not be fired when the system high contrast changed