QueryEvent class
A wrapping of browser Event, to attach more information such as custom event data and name space, etc.
- Implemented types
Constructors
- QueryEvent(String type, {EventTarget? target, dynamic data})
-
Construct a QueryEvent with given
type
. - QueryEvent.from(Event? originalEvent, {String? type})
-
Construct a QueryEvent from a native DOM
event
.
Properties
- altGraphKey → bool
-
Returns whether the alt-graph key is pressed.
no setter
- altKey → bool
-
Returns whether the alt key is pressed.
no setter
- bubbles → bool
-
no setteroverride
-
Returns the button being clicked if it is a mouse event,
or null if not.
no setter
- cancelable → bool
-
no setteroverride
- charCode → int
-
Returns the character code if it is a keyboard event, or null if not.
no setter
- code → String
-
no setter
- composed → bool
-
no setteroverride
- ctrlKey → bool
-
Returns whether the ctrl key is pressed.
no setter
- currentTarget → EventTarget?
-
The current target of this event when bubbling up.
no setteroverride
- data ↔ dynamic
-
Custom event data. If user calls trigger method with data, it will show
getter/setter pair
- defaultPrevented → bool
-
Return true if preventDefault was ever called in this event.
no setteroverride
- delegateTarget → EventTarget?
-
The delegate target of this event. i.e. The event target on which the
no setter
- eventPhase → int
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- immediatePropagationStopped → bool
-
Return true if stopImmediatePropagation was ever called in this event.
no setter
- isTrusted → bool
-
no setteroverride
- key → String
-
no setter
- keyCode → int
-
Returns the key code if it is a keyboard event, or null if not.
no setter
- keyLocation → int
-
no setter
- location → int
-
Returns the key location if it is a keyboard event, or null if not.
no setter
- matchingTarget → Element
-
A pointer to the element whose CSS selector matched within which an event
was fired. If this Event was not associated with any Event delegation,
accessing this value will throw an UnsupportedError.
no setteroverride
- metaKey → bool
-
Returns whether the meta key is pressed.
no setter
- namespace → String?
-
The namespace of this event. For example, if the event is triggered by
no setter
- originalEvent → Event?
-
The original event, if any. If this QueryEvent was triggered by browser,
final
- pageX → int
-
The mouse position relative to the left edge of the document.
no setter
- pageY → int
-
The mouse position relative to the top edge of the document.
no setter
-
path
→ List<
Node> -
no setteroverride
- propagationStopped → bool
-
Return true if stopPropagation was ever called in this event.
no setter
-
The other DOM element involved in the event, if any.
no setter
- result ↔ dynamic
-
The last value returned by an event handler that was triggered by this event, unless the value was null.
*
getter/setter pair
- ret ↔ dynamic
-
The return value of QueryEventListener
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shiftKey → bool
-
Returns whether the shift key is pressed.
no setter
- simulated → bool
-
Return true if the event is simulated
no setter
- target → EventTarget?
-
The original target of this event. i.e. The real event target where the
no setteroverride
- timeStamp → double
-
no setteroverride
- type → String
-
The type of event. If the event is constructed from a native DOM Event,
no setteroverride
- which → int?
-
For key or mouse events, this property indicates the specific key
no setter
Methods
-
composedPath(
) → List< EventTarget> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preventDefault(
) → void -
Prevent the default action of the event being triggered.
override
-
stopImmediatePropagation(
) → void -
Prevent the event from bubbling up, and prevent any succeeding handlers
override
-
stopPropagation(
) → void -
Prevent the event from bubbling up, and prevent any handlers on parent
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited