isTouchDevice
The isTouchDevice function checks if the device supports touch events.
Syntax
typescript
isTouchDevice(): boolean;Parameters
| Name | Type | Description |
|---|---|---|
| – | – | This function does not take any parameters |
Returns
| Name | Type | Description |
|---|---|---|
| – | boolean | true if the device is touch |
Examples
typescript
isTouchDevice();
// => trueNotes
- Useful for adapting interfaces for mobile or hybrid devices.
