File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 44define ( [
55 "requirejs-dplugins/has"
66] , function ( has ) {
7- has . add ( "touch-events" , "ontouchstart" in document ) ; // UA supports Touch Events
8- has . add ( "pointer-events" , "onpointerdown" in document ) ; // UA supports Pointer Events
9- has . add ( "mspointer-events" , "onmspointerdown" in document ) ; // UA supports Pointer Events (IE10+IE11 preview)
10- has . add ( "touch-device" , / ( m o b i l e ) | ( a n d r o i d ) / i. test ( navigator . userAgent ) ) ; // mobile device
11- has . add ( "css-touch-action" , "touchAction" in document . body . style ) ; // touch-action CSS
12- has . add ( "css-ms-touch-action" , "msTouchAction" in document . body . style ) ; // -ms-touch-action CSS
7+ if ( typeof document !== "undefined" ) {
8+ has . add ( "touch-events" , "ontouchstart" in document ) ; // UA supports Touch Events
9+ has . add ( "pointer-events" , "onpointerdown" in document ) ; // UA supports Pointer Events
10+ has . add ( "mspointer-events" , "onmspointerdown" in document ) ; // UA supports Pointer Events (IE10+IE11 preview)
11+ has . add ( "touch-device" , / ( m o b i l e ) | ( a n d r o i d ) / i. test ( navigator . userAgent ) ) ; // mobile device
12+ has . add ( "css-touch-action" , "touchAction" in document . body . style ) ; // touch-action CSS
13+ has . add ( "css-ms-touch-action" , "msTouchAction" in document . body . style ) ; // -ms-touch-action CSS
14+ }
1315 return has ;
1416} ) ;
You can’t perform that action at this time.
0 commit comments