Check if the touch events are supported
Check if the current browser supports the touch events:
const touchSupported = 'ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch);Check if the current browser supports the touch events:
const touchSupported = 'ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch);