Skip to main content
Solved

Is it possible to trigger off of a variable change


Tricia_Spoonts

It appears that when you change a variable mode e.g. from light/dark mode it does not trigger a selection or document event. Is there an event that you can hook into on a variable mode change that may not yet be documented.

Best answer by tank666

I just tested, the documentchange event fires when the variable mode changes. This event does not fire only when you switch from the first mode to auto and vice versa.

This is because the PROPERTY_CHANGE event type does not yet support the explicitVariableModes property.

View original

2 replies

tank666
  • 4854 replies
  • Answer
  • July 19, 2023

I just tested, the documentchange event fires when the variable mode changes. This event does not fire only when you switch from the first mode to auto and vice versa.

This is because the PROPERTY_CHANGE event type does not yet support the explicitVariableModes property.


Tricia_Spoonts

Thank you @tank666 I see that it was not firing because I didnโ€™t have any colors in my test document that changed. Never start coding after 11pm ๐Ÿ™‚


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings