Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/real-queue/lib/utils/ready"

Index

Functions

Functions

Const ready

  • ready(fn?: () => void, state?: DocumentReadyState): Promise<void>
  • Wait DOM is ready depending on a state.

    • interactive: Defer scripts are executing, but DOM is ready
    • complete: All scripts including deferred ones are executed and DOM is ready
    see

    https://stackoverflow.com/a/65430734/5506547

    see

    https://stackoverflow.com/a/51980980/5506547

    Parameters

    • Optional fn: () => void
        • (): void
        • Returns void

    • Default value state: DocumentReadyState = "complete"

    Returns Promise<void>

Generated using TypeDoc