Added isTouchDevice and touch device helper methods

This commit is contained in:
Francisco Hodge
2019-03-06 19:32:03 -05:00
parent 00f8daff3c
commit 1a53fae5d6
2 changed files with 34 additions and 3 deletions
+6
View File
@@ -365,6 +365,12 @@ class Utilities {
return Boolean(this.maxLengthReached);
}
/**
* Determines whether a touch device is being used
*/
isTouchDevice(){
return 'ontouchstart' in window || navigator.maxTouchPoints;
}
/**
* Bind all methods in a given class