utils/browser/events/events library
Functions
-
anyParentHasAttribute(
Element? target, String attribute) → bool - Return true if the element or any of its ancestors have an attribute.
-
anyParentHasClass(
Element target, String className) → bool - Return true if the element or any of its ancestors have the given class.
-
anyParentHasTag(
Element? target, String componentTag) → bool - Return true if the element or any of its ancestors have the given tag.
-
closestWithClass(
Element? target, String className) → Element? - This element or the closest of its ancestor with the given class.
-
compareDocumentPosition(
Node a, Node b) → int - A Comparator for sorting Nodes based on document order.
-
isKeyboardTrigger(
KeyboardEvent event) → bool -
isParentOf(
Element? element, Node? node) → bool -
Whether
element
is a parent ofnode
in the dom tree. -
isSpaceKey(
KeyboardEvent event) → bool - Determines if the space key was pressed in a KeyboardEvent.
-
isStandardMouseEvent(
MouseEvent event) → bool - Whether the MouseEvent was initiated with the primary mouse button and no modifier keys were used.
-
isStandardTriggerEvent(
UIEvent event) → bool - Whether the UIEvent is a standard trigger event without modifier keys.
-
not<
T> (Predicate< T> predicate) → Predicate<T> -
onResize(
Element element) → Stream< Rectangle< num> ?> -
A stream of contect rects fired when
element
changes size. -
triggersOutside(
dynamic element) → Stream< Event> - A stream of click, mouseup or focus events outside a given element.
-
triggersOutsideAny(
Predicate< Node> checkNodeInside) → Stream<Event> - A stream of click, mouseup or focus events of any node none of whose parents pass the check inside function.