Thank you for this suggestion. I added to it to work with my situation, in which the value backing the toggle cannot be directly modified by the time the change event fires (for example, a confirm dialog might be popped or an API call might need to succeed). I tried a bunch of things, and settled on your idea.
What I discovered is that the event parameter is actually the Toggle itself. So if you need to back out the change, you can assign to its checked property inside the change handler. This will realign the toggle widget’s checked state with that of the backing component, so even if that causes another change event to fire, your guard will protect against popping the confirm dialog twice.