0.7.4 • Published 11 months ago

@blackglory/wait-for v0.7.4

Weekly downloads
91
License
MIT
Repository
github
Last release
11 months 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

11 months ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.3

1 year ago

0.7.0

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.6.0

1 year ago

0.5.0

2 years ago

0.5.1

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.3.5

2 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.2.13

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago