@benmarch/a11y-toolkit
    Preparing search index...

    Class ElementList

    Represents a list of element-like objects. This can be used as a shared memory among Managers so that the consumer has full control at all times.

    It is essentially a Set with an O(1) lookup for elements.

    Hierarchy

    Index

    Constructors

    Properties

    "[toStringTag]": string
    elements: Elemental[]
    size: number

    the number of (unique) elements in Set.

    "[species]": SetConstructor

    Methods

    • Iterates over values in the set.

      Returns SetIterator<Elemental>

    • Removes a specified value from the Set.

      Parameters

      Returns boolean

      Returns true if an element in the Set existed and has been removed, or false if the element does not exist.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<Elemental>

      a new Set containing all the elements in this Set which are not also in the argument.

    • Returns an iterable of [v,v] pairs for every value v in the set.

      Returns SetIterator<[Elemental, Elemental]>

    • Executes a provided function once per each value in the Set object, in insertion order.

      Parameters

      Returns void

    • Parameters

      Returns boolean

      a boolean indicating whether an element with the specified value exists in the Set or not.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<Elemental & U>

      a new Set containing all the elements which are both in this Set and in the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether this Set has no elements in common with the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether all the elements in this Set are also in the argument.

    • Parameters

      • other: ReadonlySetLike<unknown>

      Returns boolean

      a boolean indicating whether all the elements in the argument are also in this Set.

    • Despite its name, returns an iterable of the values in the set.

      Returns SetIterator<Elemental>

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<Elemental | U>

      a new Set containing all the elements which are in either this Set or in the argument, but not in both.

    • Type Parameters

      • U

      Parameters

      • other: ReadonlySetLike<U>

      Returns Set<Elemental | U>

      a new Set containing all the elements in this Set and also all the elements in the argument.

    • Returns an iterable of values in the set.

      Returns SetIterator<Elemental>