0.7.4 • Published 2 years ago

@blackglory/wait-for v0.7.4

Weekly downloads
91
License
MIT
Repository
github
Last release
2 years ago

wait-for

A module for waiting for things to happen.

Install

npm install --save @blackglory/wait-for
# or
yarn add @blackglory/wait-for

API

waitForDOMChanged

function waitForDOMChanged(): Promies<void>

waitForAttached

function waitForAttached(...nodes: Node[]): Promise<void>

waitForDetached

function waitForDetached(...nodes: Node[]): Promise<void>

waitForElementsMatchingSelectorAttached

function waitForElementsMatchingSelectorAttached(
  selector: string
): Promise<Element[]>

waitForElementsMatchingSelectorAttached

function waitForElementsMatchingSelectorAttached(
  selector: string
): Promise<Element[]>

waitForAllElementsMatchingSelectorDetached

function waitForAllElementsMatchingSelectorDetached(
  selector: string
): Promise<void>

waitForEventTarget

function waitForEventTarget<T extends EventTarget>(
  target: T
, event: string
, signal?: AbortSignal
): Promise<Event>

waitForEventEmitter

function waitForEventEmitter<T extends EventEmitter>(
  target: T
, event: string
, signal?: AbortSignal
): Promise<unknown[]>

waitForEmitter

function waitForEmitter<
  EventToArgs extends Record<string, unknown[]>
, Event extends keyof EventToArgs
>(
  target: Emitter<EventToArgs>
, event: Event
, signal?: AbortSignal
): Promise<EventToArgs[Event]>

waitForDOMContentLoaded

function waitForDOMContentLoaded(): Promise<void>

waitForLoad

function waitForLoad(): Promise<void>

waitForComplete

function waitForComplete(): Promise<void>

waitForInteractiveOrComplete

function waitForInteractiveOrComplete(): Promise<void>

waitForFunction

function waitForFunction<T>(
  fn: () => T | PromiseLike<T>
, interval: number = 0
): Promise<T>

waitForTimeout

function waitForTimeout(ms: number, signal?: AbortSignal): Promise<void>

waitForStateChanged

function waitForStateChanged(): Promise<void>

waitForUrlChanged

function waitForUrlChanged(): Promise<void>

waitForAllMacrotasksProcessed

function waitForAllMacrotasksProcessed(): Promise<void>

waitForAllMicrotasksProcessed

function waitForAllMicrotasksProcessed(): Promise<void>
0.7.4

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.5.4

2 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.4.2

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.2.13

4 years ago

0.3.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago