Input options for the ‘waitForFunction’ mutation.

Definition

input WaitForFunctionOptions {
  polling: Polling
  interval: Int
  timeout: Int
}

Fields

polling: Polling

Polling method: REQUEST_ANIMATION_FRAME (raf) for browser-synchronized polling, or a number for millisecond interval. Defaults to raf.

interval: Int

Polling interval in milliseconds, if ‘polling’ is not REQUEST_ANIMATION_FRAME. Example: 100 (for 100ms interval).

timeout: Int

Maximum time in milliseconds to wait for the function to return a truthy value. Defaults to a global timeout.