Last active
March 11, 2024 14:57
-
-
Save gabrielecanepa/4ab9e0f8bb9b8ffe7d6652a5692848b5 to your computer and use it in GitHub Desktop.
JavaScript snippet to check if a device supports touch gestures.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isTouchDevice = () => !!('ontouchstart' in window) || !!('msmaxtouchpoints' in window.navigator) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment