@gravity-ui/uikit
Version:
Gravity UI base styling and components
17 lines (16 loc) • 495 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTouchDevice = isTouchDevice;
function isTouchDevice() {
if (typeof window === 'undefined') {
return false;
}
if (typeof navigator !== 'undefined' && navigator.maxTouchPoints > 0) {
return true;
}
if (window.matchMedia && window.matchMedia('(any-pointer:coarse)').matches) {
return true;
}
return 'ontouchstart' in window;
}
//# sourceMappingURL=dom.js.map
;