What is the recommended way to intercept the switch's event handlers?
I'd like a confirmation dialog to appear whenever the user clicks the switch, and change the switch value only after the user confirms 'yes'. So the first step is for me to intercept the default click behavior for the switch.
Here's what I tried:
When I click the switch, this prints the expected message to the console. However, I also expected this to prevent the switch from changing value, but that is not the case.