(bool)
| 20 | } |
| 21 | |
| 22 | export function setPointerEvent(bool) { |
| 23 | const pointerCaptureFn = name => id => { |
| 24 | if (typeof id !== 'number') { |
| 25 | if (__DEV__) { |
| 26 | console.error('A pointerId must be passed to "%s"', name); |
| 27 | } |
| 28 | } |
| 29 | }; |
| 30 | global.PointerEvent = bool ? emptyFunction : undefined; |
| 31 | global.HTMLElement.prototype.setPointerCapture = bool |
| 32 | ? pointerCaptureFn('setPointerCapture') |
| 33 | : undefined; |
| 34 | global.HTMLElement.prototype.releasePointerCapture = bool |
| 35 | ? pointerCaptureFn('releasePointerCapture') |
| 36 | : undefined; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Change environment host platform. |
no test coverage detected