/html-dom /Basic
GitHub 5008★

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);

See also

Follow me on and to get more useful contents.