HTML | DOM touchcancel Event
The touchcancel event is used to execute a script when the touch event gets interrupted.
It is considered a good practice to include the touchcancel event to clean up the code if the devices interrupt a touch event at different actions.
- All HTML elements supported by this event.
object.ontouchcancel = myScript;
Below program illustrates the touchcancel event :
Before touching the screen:
After touching the screen:
- Internet Explorer
- Google Chrome