The GestureEvent class encapsulates information about a multi-touch gesture. GestureEvent objects are high-level events that encapsulate the low-level TouchEvent objects. Both GestureEvent and TouchEvent events are sent during a multi-touch sequence. Gesture events contain scaling and rotation information allowing gestures to be combined, if supported by the platform. If not supported, one gesture ends before another starts. Listen for GestureEvent events if you want to respond to gestures only, not process the low-level TouchEvent objects.
Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.
defaultPrevented *
Boolean
true
Used to indicate whether preventDefault() has been called for this event.
detail *
Number
false
Specifies some detail information about the Event, depending on the type of event.
eventPhase *
Number
true
Used to indicate which phase of event flow is currently being evaluated.
metaKey
Boolean
true
If true, the meta key is pressed; otherwise, it is not.
namespaceURI *
String
true
The namespace URI associated with this event at initialization time, or null if it is unspecified.
rotation
Number
true
The delta rotation since the start of an event, in degrees, where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.
scale
Number
true
The distance between two fingers since the start of an event, as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0, the gesture is pinch close (to zoom out). If greater than 1.0, the gesture is pinch open (to zoom in).
screenX
Number
true
The x-coordinate of the event’s location in screen coordinates.
screenY
Number
true
The y-coordinate of the event’s location in screen coordinates.
shiftKey
Boolean
true
If true, the shift key is pressed; otherwise, it is not.
The distance between two fingers since the start of an event as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0, the gesture is pinch close (to zoom out). If greater than 1.0, the gesture is pinch open (to zoom in).
rotation
Number
Required
The delta rotation since the start of an event, in degrees, where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.
If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur.
The stopPropagation method is used prevent further propagation of an event during event flow. The event will complete dispatch to all listeners on the current EventTarget before event flow stops. This method may be used during any stage of event flow.