Evaluation and Waiting
Evaluation
Section titled “Evaluation”ChromeWebView.evaluate() uses a queued mutex by default so only one evaluation runs at a time. That keeps runtime behavior deterministic.
For independent work, pass mode: "non-blocking" to bypass the queue.
Element waiting
Section titled “Element waiting”waitForElement() supports two strategies:
observer: uses aMutationObserverinside the page.poll: checks the DOM repeatedly on a timer.
The observer strategy also supports two modes:
per-request: one observer per pending request.shared: one observer reused across requests, with TTL-based cleanup.
When to use which
Section titled “When to use which”- Use
observerfor fast DOM reactions. - Use
pollwhen you need abort behavior or simpler timing. - Use
sharedwhen many requests target the same page and you want to avoid setting up multiple observers.