Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "wed/domlistener"

Index

Type aliases

AddRemEvents

AddRemEvents: "added-element" | "removed-element" | "removing-element"

AddedElementHandler

AddedElementHandler: function

Called when an element has been directly added to the tree. There is no reason to provide parent, previousSibling, nextSibling for an added-element event but having the same signature for additions and removals allows use of the same function for both cases.

param

The root of the tree being listened on.

param

The parent of the element that was added.

param

The sibling that precedes the element.

param

The sibling that follows the element.

param

The element that was matched.

Type declaration

    • (root: Node, parent: Node, previousSibling: Node, nextSibling: Node, element: Element): void
    • Parameters

      • root: Node
      • parent: Node
      • previousSibling: Node
      • nextSibling: Node
      • element: Element

      Returns void

AttributeChangedHandler

AttributeChangedHandler: function

Called when an attribute value has been changed.

param

The root of the tree being listened on.

param

The element whose attribute changed.

param

The URI of the namespace of the attribute.

param

The name of the attribute.

param

The value of the attribute before this change.

Type declaration

    • (root: Node, element: Element, ns: string, name: string, oldValue: string): void
    • Parameters

      • root: Node
      • element: Element
      • ns: string
      • name: string
      • oldValue: string

      Returns void

ChildEvents

ChildEvents: "children-changing" | "children-changed"

ChildrenChangedHandler

ChildrenChangedHandler: function

Called when children of an element have been added to or removed from the element. Note that the listener will call handlers with at most one of added or removed non-empty.

param

The root of the tree being listened on.

param

The nodes that were added.

param

The nodes that were removed.

param

The node before the list of nodes added or removed. When the handler is called after a removal of children, this is necessarily null.

param

The node after the list of nodes added or removed. When the handler is called after a removal of children, this is necessarily null.

param

The element whose children were modified.

Type declaration

    • (root: Node, added: Node[], removed: Node[], previousSibling: Node | null, nextSibling: Node | null, element: Element): void
    • Parameters

      • root: Node
      • added: Node[]
      • removed: Node[]
      • previousSibling: Node | null
      • nextSibling: Node | null
      • element: Element

      Returns void

ChildrenChangingHandler

ChildrenChangingHandler: function

Called when children are about to be removed from an element. Note the asymmetry: these handlers are not called when nodes are added!!

param

The root of the tree being listened on.

param

The nodes that are about to be added. This will always be an empty list.

param

The nodes that are about to be removed.

param

The node before the list of nodes to be removed.

param

The node after the list of nodes to be removed.

param

The element whose children are being removed.

Type declaration

    • (root: Node, added: Node[], removed: Node[], previousSibling: Node | null, nextSibling: Node | null, element: Element): void
    • Parameters

      • root: Node
      • added: Node[]
      • removed: Node[]
      • previousSibling: Node | null
      • nextSibling: Node | null
      • element: Element

      Returns void

EventHandlerMap

EventHandlerMap: object

Type declaration

Events

Events: keyof EventHandlers

EventsOrTrigger

EventsOrTrigger: keyof Handlers

ExcludedElementHandler

ExcludedElementHandler: function

Called when a tree fragment is removed which contains the element matched by the selector that was passed to DOMListener.addHandler.

param

The root of the tree being listened on.

param

The node which is at the root of the tree fragment that was removed to trigger the event.

param

null because the tree no longer has a parent.

param

null because the tree no longer has siblings.

param

null because the tree no longer has siblings.

param

The element that was matched.

Type declaration

    • (root: Node, tree: Node, parent: null, previousSibling: null, nextSibling: null, element: Element): void
    • Parameters

      • root: Node
      • tree: Node
      • parent: null
      • previousSibling: null
      • nextSibling: null
      • element: Element

      Returns void

ExcludingElementHandler

ExcludingElementHandler: function

Called when a tree fragment is about to be removed and contains the element matched by the selector that was passed to DOMListener.addHandler.

param

The root of the tree being listened on.

param

The node which is at the root of the tree fragment that is being removed.

param

The parent of the tree.

param

The sibling that precedes tree.

param

The sibling that follows tree.

param

The element that was matched.

Type declaration

    • (root: Node, tree: Node, parent: null, previousSibling: null, nextSibling: null, element: Element): void
    • Parameters

      • root: Node
      • tree: Node
      • parent: null
      • previousSibling: null
      • nextSibling: null
      • element: Element

      Returns void

Handler

Handler: function

Type declaration

    • (): void
    • Returns void

IncludeExcludeEvents

IncludeExcludeEvents: "included-element" | "excluded-element" | "excluding-element"

IncludedElementHandler

IncludedElementHandler: function

Called when a tree fragment is added which contains the element matched by the selector that was passed to DOMListener.addHandler.

param

The root of the tree being listened on.

param

The node which is at the root of the tree fragment that was added to trigger the event.

param

The parent of the tree.

param

The sibling that precedes tree.

param

The sibling that follows tree.

param

The element that was matched.

Type declaration

    • (root: Node, tree: Node, parent: Node, previousSibling: Node | null, nextSibling: Node | null, element: Element): void
    • Parameters

      • root: Node
      • tree: Node
      • parent: Node
      • previousSibling: Node | null
      • nextSibling: Node | null
      • element: Element

      Returns void

RemovedElementHandler

RemovedElementHandler: function

Called when an element is has been directly removed from the tree.

param

The root of the tree being listened on.

param

null because the element is no longer in the tree.

param

null because the element is no longer in the tree.

param

null because the element is no longer in the tree.

param

The element that was matched.

Type declaration

    • (root: Node, parent: null, previousSibling: null, nextSibling: null, element: Element): void
    • Parameters

      • root: Node
      • parent: null
      • previousSibling: null
      • nextSibling: null
      • element: Element

      Returns void

RemovingElementHandler

RemovingElementHandler: function

Called when an element is about to be directly removed from the tree.

param

The root of the tree being listened on.

param

The parent of the element that was added.

param

The sibling that precedes the element.

param

The sibling that follows the element.

param

The element that was matched.

Type declaration

    • (root: Node, parent: Node, previousSibling: Node, nextSibling: Node, element: Element): void
    • Parameters

      • root: Node
      • parent: Node
      • previousSibling: Node
      • nextSibling: Node
      • element: Element

      Returns void

SelectorHandlerPair

SelectorHandlerPair: [string, H]

TextChangedHandler

TextChangedHandler: function

Called when a text node has its value changed. A text-changed event is not generated when Node objects of type TEXT_NODE are added or removed. They trigger children-changed events.

param

The root of the tree being listened on.

param

The text node that was changed.

param

The value the node had before this change.

Type declaration

    • (root: Node, node: Text, oldValue: string): void
    • Parameters

      • root: Node
      • node: Text
      • oldValue: string

      Returns void

TriggerHandler

TriggerHandler: function

A trigger event with name [name] is fired when trigger([name]) is called. Trigger events are meant to be triggered by event handlers called by the listener, not by other code.

Type declaration

    • (root: Node): void
    • Parameters

      • root: Node

      Returns void

Generated using TypeDoc