Is touchscreen on javascript

Categories: javascript

Some of javascript shortcuts below here:

var is_touch_device = 'ontouchstart' in document.documentElement;
function isTouchDevice() {
    var el = document.createElement('div');
    el.setAttribute('ongesturestart', 'return;');
    return typeof el.ongesturestart === "function";
}

No comments here yet Write here gently

No webmentions were found.

Comments powered by Talkyard.