fired when an element receives pointer capture.
fired when an element receives pointer capture.
MDN
Fired after pointer capture is released for a pointer.
Fired after pointer capture is released for a pointer.
MDN
a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).
a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).
MDN
fired when a pointer becomes active.
fired when a pointer becomes active.
MDN
fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).
fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).
MDN
fired when a pointing device is moved out of the hit test boundaries of an element.
fired 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.
MDN
fired when a pointer changes coordinates.
fired when a pointer changes coordinates.
MDN
fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.
MDN
fired when a pointing device is moved into an element's hit test boundaries.
fired when a pointing device is moved into an element's hit test boundaries.
MDN
fired when a pointer is no longer active.
fired when a pointer is no longer active.
MDN
(Since version ) see corresponding Javadoc for more information.
Most of today's web content assumes the user's pointing device will be a mouse. However, since many devices support other types of pointing input devices, such as pen/stylus and touch surfaces, extensions to the existing pointing device event models are needed and pointer events address that need.
Pointer events are DOM events that are fired for a pointing device. They are designed to create a single DOM event model to handle pointing input devices such as a mouse, pen/stylus or touch (such as one or more fingers). The pointer is a hardware-agnostic device that can target a specific set of screen coordinates. Having a single event model for pointers can simplify creating Web sites and applications and provide a good user experience regardless of the user's hardware. However, for scenarios when device-specific handling is desired, pointer events defines a property to inspect the device type which produced the event.
The events needed to handle generic pointer input are analogous to mouse events (mousedown/pointerdown, mousemove/pointermove, etc.). Consequently, pointer event types are intentionally similar to mouse event types. Additionally, a pointer event contains the usual properties present in mouse events (client coordinates, target element, button states, etc.) in addition to new properties for other forms of input: pressure, contact geometry, tilt, etc. In fact, the PointerEvent interface inherits all of the MouseEvent's properties thus facilitating migrating content from mouse events to pointer events.
MDN