createTouch - Deprecated

createTouch has been deprecated for a while now.

This fix uses the same technique used by Modernizr - 377a6303b3/feature-detects/touchevents.js (L40)
master
enition 2019-08-19 16:53:27 +01:00 committed by GitHub
parent b242f49e67
commit 4ec1cbee55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@
Snap.plugin(function (Snap, Element, Paper, glob) {
var elproto = Element.prototype,
has = "hasOwnProperty",
supportsTouch = "createTouch" in glob.doc,
supportsTouch = (('ontouchstart' in window) || window.TouchEvent || window.DocumentTouch && document instanceof DocumentTouch),
events = [
"click", "dblclick", "mousedown", "mousemove", "mouseout",
"mouseover", "mouseup", "touchstart", "touchmove", "touchend",