Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AsyncUtils

Index

Methods

Static sleep

  • sleep(ms: number): Promise<void>
  • Asynchronous function for waiting a certain amount of time

    Parameters

    • ms: number

      wait time in milliseconds

    Returns Promise<void>

Static waitForNextExecutionContext

  • waitForNextExecutionContext(): Promise<void>
  • Asnychronous function for waiting until the JavaScript call stack is empty.
    Can be used to wait for the shortest possible amount of time after the current execution context has been finished.

    Example:

    // Add some DOM element via JS and set some CSS
    await AsyncUtils.waitForNextExecutionContext(); // Let the browser actually render the DOM element
    // Ask browser for rendered size of the newly created DOM element
    

    Returns Promise<void>

Generated using TypeDoc