turbodombuilder - v0.9.58
    Preparing search index...

    Class TurboNodeList<Type>

    TurboNodeList

    A composable, Set-like collection for managing nodes. Supports individual nodes, live DOM collections (HTMLCollection or NodeListOf), and nested TurboNodeList instances as sub-lists. Changes to sub-lists and live DOM collections propagate automatically on iteration.

    Type Parameters

    • Type extends object = object

      The type of the nodes held in the list.

    Index

    Constructors

    • Type Parameters

      • Type extends object = object

        The type of the nodes held in the list.

      Parameters

      Returns TurboNodeList<Type>

    Accessors

    • get list(): Set<Type>

      Returns Set<Type>

      A Set snapshot of all entries in this list, without duplicates.

    • set list(value: NodeListType<Type>): void

      Parameters

      Returns void

    • get array(): Type[]

      Returns Type[]

      An array snapshot of all entries in this list, without duplicates.

    • get size(): number

      Returns number

      The number of entries in this list, ignoring duplicates.

    Methods

    • Returns IterableIterator<Type>

    • Function

      add

      Parameters

      Returns this

      Itself, allowing for method chaining.

      Adds one or more entries to the list. Entries may be individual nodes, arrays, sets, HTMLCollections, NodeListOf instances, or nested TurboNodeLists.

    • Function

      remove

      Parameters

      Returns this

      Itself, allowing for method chaining.

      Removes one or more entries from the list. Entries may be individual nodes, arrays, sets, HTMLCollections, NodeListOf instances, or nested TurboNodeLists.

    • Function

      has

      Parameters

      Returns boolean

      Whether the entry (or entries) is present in the list.

      Checks whether the given entry (or entries) is present in the list.

    • Function

      clear

      Returns this

      Itself, allowing for method chaining.

      Clears all entries from the list.