gotpointercapture

The gotpointercapture event fires when a pointing device is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.

Note: The opposite of gotpointercapture is lostpointercapture.

General info

Interface PointerEvent
Bubbles No
Cancelable No
Target Document, Element
Default Action None.

Properties

Property Type Description
target Read only EventTarget The event target (the topmost target in the DOM tree).
type Read only DOMString The type of event.
bubbles Read only Boolean Whether the event normally bubbles or not.
cancelable Read only Boolean Whether the event is cancellable or not.
view Read only WindowProxy Document.defaultView (window of the document)
detail Read only long (float) 0.
pointerId Read only long A unique identifier for the pointer causing the event.
width Read only double (float) The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.
height Read only double (float) The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
pressure Read only float The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
tiltX Read only long (float) The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.
tiltY Read only long (float) The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.
pointerType Read only DOMString Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.
isPrimary Read only Boolean Indicates if the pointer represents the primary pointer of this pointer type.

Example

This snippet shows how to handle gotpointercapture events, using the EventTarget.addEventListener() method.

target.addEventListener('gotpointercapture', function(event) {
  // Process the event
}, false);

Specification

Pointer Events

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support (Yes) 59 (59) 10 No support No support
Feature Android Android Webview Chrome for Android Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support No support No support No support (Yes) No support No support 10 No support No support

See also

Document Tags and Contributors

Contributors to this page: mfluehr, chrisdavidmills, fscholz, erikadoyle, rolfedh, AFBarstow
Last updated by: mfluehr,