Skip to main content
Waits for DOM mutations to settle without executing any function first. This helper uses a MutationObserver to monitor DOM changes and waits until the DOM has been stable (no mutations) for the specified settle duration.

waitForDomSettled vs withNetworkSettledWait

  • Use waitForDomSettled when watching DOM mutations (elements added/removed/modified, loading spinners, dynamic content injection)
  • Use withNetworkSettledWait when watching network requests (API calls, form submissions, resource loading)

Examples

Arguments

options
Object
required
Configuration object for DOM settlement monitoring

Returns: Promise<boolean>

Promise that resolves to true if DOM settled within timeout, false if timeout or error occurred