The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.
This article is Almost Ready.
W3C Working Draft
Provides contextual information associated with input events (for example, from mouse, touch or pen).
Inherits from MouseEvent
|height||The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.|
|isPrimary||Returns whether the pointer associated with the event is the primary pointer for the current mouse, touch, or pen interaction.|
|pointerId||A unique identifier for the pointer causing the event|
|pointerType||Indicates the device type that caused the event (mouse, pen, touch, etc.).|
|pressure||The normalized pressure of the pointer input in the range of [0,1], where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.|
|tiltX||The plane angle (in degrees, in the range of [-90,90]) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.|
|width||The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.|
|initPointerEvent||Initializes a new PointerEvent created by the createEvent method.|
|gotpointercapture||Dispatched prior to the dispatch of the first event after pointer capture is set for a pointer. See the PointerEvent object.|
|lostpointercapture||Dispatched after pointer capture is released for a pointer.|
|pointerdown||Dispatched when a pointer enters the state of having a non-zero value for the buttons property.|
|pointerenter||Dispatched 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.|
|pointerleave||Dispatched when a pointing device is moved off of the hit test boundaries of an element and all of its descendants, including as a result of a pointerup event from a device that does not support hover.|
|pointermove||Dispatched when a pointer changes coordinates, button state, pressure, tilt, or contact geometry (e.g. width and height).|
|pointerover||Dispatched when a pointing device is moved into the hit test boundaries of an element. Also dispatched prior to a pointerdown event for devices that do not support hover.|
|pointerup||Dispatched when a pointer leaves the state of having a non-zero value for the buttons property.|
Inherited from MouseEvent
|button||Gets the mouse button that caused an event.|
|buttons||Gets a value that indicates which mouse buttons a user pressed.|
|clientX||Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent's client area).|
|clientY||Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent's client area).|
|layerX||Gets the x-coordinate of the mouse pointer, relative to the last positioned ancestor element.|
|layerY|| Returns the horizontal coordinate of the event relative to the current layer.
layerY is a non-standards property of the MouseEvent object.
|relatedTarget|| Gets the secondary element that is involved in an event.
The relatedTarget property is used to find the other element, if any, involved in an event. Events like mouseover are oriented around a certain target, but also involve a secondary target, such as the target that is exited as the mouseover event fires for the primary target.
|screenX||Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the screen.|
|screenY||Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the screen.|
|x||Gets the x-coordinate of the mouse cursor, relative to the last positioned ancestor element.|
|y||Gets the y-coordinate of the mouse pointer, relative to the last positioned ancestor element.|
|initMouseEvent||Initializes a new mouse event that the createEvent method created.|
|click||The click event is triggered for an element when it is activated by a mouse click or by another user action that normally has the same effect as a mouse click.|
|dblclick||A mouse double click event.|
|mousedown||Fires when the user clicks the object with either mouse button or taps the mouse pad.|
|mouseenter||Fires when the user moves the mouse pointer into the object.|
|mouseleave||Fires when the user moves the mouse pointer outside the boundaries of the object.|
|mousemove||Fires when the user moves the mouse over the object.|
|mouseout||Fires when the user moves the mouse pointer outside the boundaries of the object.|
|mouseup||Fires when the user releases a mouse button while the mouse is over the object.|
Needs Examples: This section should include examples.
|Pointer Events||Working Draft||Section 3.1|