Listen to both. Begin and end keep UI state honest.
Use pointerId. Match the same pointer across events.
Release paths. Lift, cancel, or releasePointerCapture can end capture.
Drag safety. This is why sliders keep updating outside their box.
Compatibility
Browser Support
Element gotpointercapture is Baseline Widely available (MDN: since July 2020). Safe to use with Pointer Events in modern evergreen browsers.
✓ Baseline · Widely available
Element gotpointercapture
PointerEvent when setPointerCapture succeeds — established across browsers.
99%Widely available
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
Android WebViewSupported · Modern WebView
Full support
gotpointercaptureBaseline
Bottom line: Safe for production drag/capture UI. Pair with setPointerCapture, releasePointerCapture, and lostpointercapture.
Frequently Asked Questions
It fires when an element captures a pointer using setPointerCapture() (MDN). After that, subsequent events for that pointer are retargeted to the capturing element until capture is released.
No. MDN marks Element gotpointercapture as Baseline Widely available (since July 2020). It is not Deprecated, Experimental, or Non-standard.
A PointerEvent. Useful fields include pointerId, pointerType, and isPrimary.
Call element.setPointerCapture(event.pointerId) — usually inside a pointerdown handler. When capture succeeds, gotpointercapture fires (MDN).
lostpointercapture fires when capture ends — for example via releasePointerCapture(), pointerup, or pointercancel.
So a drag, slider, or drawing surface keeps receiving pointermove events even if the pointer leaves the element’s bounds.