Vertex Viewer SDK
    Preparing search index...
    • Adds a listener to the given target, and returns a promise that resolves with the first event emitted of the given type.

      Type Parameters

      • E extends Event

      Parameters

      • target: EventTarget

        The target to add an event listener to.

      • type: string

        The event type to listen for.

      • Optionalopts: boolean | AddEventListenerOptions

        Options to pass to addEventListener.

      Returns Promise<E>

      A promise that resolves with the first event emitted of type.