Skip to main content

Browser

Module Overview

Keywork includes promise-based utilities for working with the DOM.

Browser

waitUntilDOMReady

Creates a promise that blocks until the DOM has loaded.

import { waitUntilDOMReady } from 'keywork/timers/browser'

await waitUntilDOMReady()

requestAnimationFramePromise

Promise wrapper around requestAnimationFrame

import { requestAnimationFrame } from 'keywork/timers/browser'

await requestAnimationFrame()

Usage

import * as Browser from 'keywork/timers/browser'

Functions