DOMEventFacade Class
Wraps a DOM event, properties requiring browser abstraction are fixed here. Provids a security layer when required.
Item Index
Methods
halt
-
immediate
Stops the event propagation and prevents the default event behavior.
Parameters:
-
immediate
Booleanif true additional listeners on the current target will not be executed
preventDefault
-
returnValue
Prevents the event's default behavior
Parameters:
-
returnValue
Stringsets the returnValue of the event to this value (rather than the default false value). This can be used to add a customized confirmation query to the beforeunload event).
stopImmediatePropagation
()
Stops the propagation to the next bubble target and prevents any additional listeners from being exectued on the current target.
stopPropagation
()
Stops the propagation to the next bubble target
Properties
_GESTURE_MAP
Object
static
A object literal with keys "start", "end", and "move". The value for each key is a string representing the event for that environment. For touch environments, the respective values are "touchstart", "touchend" and "touchmove". Mouse and MSPointer environments are also supported via feature detection.
changedTouches
DOMEventFacade[]
An array of event-specific touch events.
For touchstart
, the touch points that became active with the current
event.
For touchmove
, the touch points that have changed since the last
event.
For touchend
, the touch points that have been removed from the touch
surface.
metaKey
Boolean
true
if the "Windows" key on a Windows keyboard, "command" key on an
Apple keyboard, or "meta" key on other keyboards is pressed.
targetTouches
DOMEventFacade[]
Array of individual touch events still in contact with the touch
surface and whose touchstart
event occurred inside the same taregt
element as the current target element.
touches
DOMEventFacade[]
Array of individual touch events for touch points that are still in contact with the touch surface.
wheelDelta
Number
Number representing the direction and velocity of the movement of the mousewheel. Negative is down, the higher the number, the faster. Applies to the mousewheel event.