Gleam - v1.0.2
    Preparing search index...

    Function waitForEvent

    • Resolves the next time type fires on element (one-shot listener). Pass an AbortSignal to cancel — rejects with signal.reason and removes the listener.

      Type Parameters

      • K extends keyof HTMLElementEventMap

      Parameters

      • element: HTMLElement
      • type: K
      • Optionalsignal: AbortSignal

      Returns Promise<void>