Skip to content

Commit 6ec1d00

Browse files
committed
✨ Add Touch to Prototype.BrowserFeatures (prototypejs#106)
1 parent aa2cec3 commit 6ec1d00

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/prototype/prototype.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ var Prototype = {
118118
**/
119119
ElementExtensions : true,
120120
SpecificElementExtensions: true,
121+
122+
/**
123+
* Prototype.BrowserFeatures.Touch -> Boolean
124+
*
125+
* Detects if the browser supports touch interaction.
126+
**/
127+
Touch: navigator.msMaxTouchPoints || ('ontouchstart' in document.documentElement)
121128
},
122129

123130
ScriptFragment : '<script([^>]*)>([\\S\\s]*?)<\/script\\s*>',

0 commit comments

Comments
 (0)