Why the HighContrastChanged Event does not work in my js code?

Xin Xin4 Su 1 Reputation point
2020-09-23T07:22:30.033+00:00

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

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,747 questions
{count} votes