Created
January 14, 2022 20:55
-
-
Save GitHubEmploy/45b6a55aaa7fce61903b54eb7a8aafc7 to your computer and use it in GitHub Desktop.
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 touchSupported = () => { | |
(‘ontouchstart’ in window || window.DocumentTouch && document instanceof window.DocumentTouch); | |
} | |
console.log(touchSupported()); // Result: If touch event is supported, it will return True, otherwise it will return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment