Skip to content

isTouchEvent

It returns true if the event param is of TouchEvent type.

Types

IIsTouchEvent

Parameters accepted by isTouchEvent.

InputInput DescriptionReturnReturn Description
(event: SyntheticEvent | Event)event - The React {@link SyntheticEvent} or native {@link Event} to inspect.booleantrue when the event is (or wraps) a {@link TouchEvent}, false otherwise. Falls back to a "touches" property check on browsers that do not expose window.TouchEvent.

Released under the MIT License.