Determines whether an event is a touch event.
(event: MouseEvent | TouchEvent)
| 1669 | |
| 1670 | /** Determines whether an event is a touch event. */ |
| 1671 | function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent { |
| 1672 | // This function is called for every pixel that the user has dragged so we need it to be |
| 1673 | // as fast as possible. Since we only bind mouse events and touch events, we can assume |
| 1674 | // that if the event's name starts with `t`, it's a touch event. |
| 1675 | return event.type[0] === 't'; |
| 1676 | } |
| 1677 | |
| 1678 | /** Callback invoked for `selectstart` events inside the shadow DOM. */ |
| 1679 | function shadowDomSelectStart(event: Event) { |
no outgoing calls
no test coverage detected