Functions
forAllImagesInElement
- forAllImagesInElement(element: HTMLElement): Promise<void>
Parameters
Returns Promise<void>
forAnimationFrame
- forAnimationFrame(): Promise<number>
Returns Promise<number>
forDOMContentLoaded
- forDOMContentLoaded(): Promise<void>
Returns Promise<void>
forDocumentReady
- forDocumentReady(targetReadyState?: "interactive" | "complete"): Promise<void>
Parameters
targetReadyState: "interactive" | "complete" = 'complete'
Returns Promise<void>
forEver
- forEver(): Promise<never>
Returns Promise<never>
forImage
- forImage(imageElement: HTMLImageElement): Promise<void>
Parameters
imageElement: HTMLImageElement
Returns Promise<void>
forImmediate
- forImmediate(): Promise<void>
Returns Promise<void>
forTime
- forTime(miliseconds: number): Promise<void>
Parameters
Returns Promise<void>
forTimeSynced
- forTimeSynced(period: number, shift?: number): Promise<void>
Parameters
period: number
shift: number = 0
Returns Promise<void>
forTimeout
- forTimeout<T>(timeout: number, value: Promise<T>): Promise<T>
Type parameters
Parameters
timeout: number
value: Promise<T>
Returns Promise<T>
forValueDefined
- forValueDefined<T>(getValue: () => AsyncOrSync<undefined | null | T>, waiter?: () => Promise<void>, limit?: number): Promise<T>
Type parameters
Parameters
getValue: () => AsyncOrSync<undefined | null | T>
- (): AsyncOrSync<undefined | null | T>
Returns AsyncOrSync<undefined | null | T>
waiter: () => Promise<void> = ...
limit: number = 1000
Returns Promise<T>
Waits until document is loaded Creates a promise that resolves when the document.readyState is on targetReadyState