MCPcopy Index your code
hub / github.com/react/react / pointerCaptureFn

Function pointerCaptureFn

packages/dom-event-testing-library/domEnvironment.js:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22export 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')

Callers 1

setPointerEventFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected