(e)
| 24 | let _elementForUnflushedEvents = null; |
| 25 | document.captureElement = null; |
| 26 | function _captureProxy(e) { |
| 27 | // Recursion protection as we'll see our own event |
| 28 | if (_captureRecursion) return; |
| 29 | |
| 30 | // Clone the event as we cannot dispatch an already dispatched event |
| 31 | const newEv = new e.constructor(e.type, e); |
| 32 | |
| 33 | _captureRecursion = true; |
| 34 | if (document.captureElement) { |
| 35 | document.captureElement.dispatchEvent(newEv); |
| 36 | } else { |
| 37 | _elementForUnflushedEvents.dispatchEvent(newEv); |
| 38 | } |
| 39 | _captureRecursion = false; |
| 40 | |
| 41 | // Avoid double events |
| 42 | e.stopPropagation(); |
| 43 | |
| 44 | // Respect the wishes of the redirected event handlers |
| 45 | if (newEv.defaultPrevented) { |
| 46 | e.preventDefault(); |
| 47 | } |
| 48 | |
| 49 | // Implicitly release the capture on button release |
| 50 | if (e.type === "mouseup") { |
| 51 | releaseCapture(); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // Follow cursor style of target element |
| 56 | function _capturedElemChanged() { |
nothing calls this directly
no test coverage detected