isTouchEvent
Commons
stable
Type guard that narrows a TRippleEvent to TouchEvent by checking constructor.name. Used internally by the ripple system to position the ripple at the touch contact point.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- erequisTRippleEvent
- The event to classify, typed as TRippleEvent (union of MouseEvent, TouchEvent, KeyboardEvent). The check uses constructor.name for reliable cross-frame detection.
API
Valeur de retour
La valeur retournée par cet util.
- true and narrows e to TouchEvent when the event originated from a touch gesture; false for mouse and keyboard events.
Usage
Exemples
Extraits de code prêts à coller.
Detecting touch to set ripple origin