wait_for
Polls a JavaScript condition in Electron renderer processes until it evaluates as true, then returns the result. Use to wait for DOM elements, application states, or other conditions before proceeding.
Instructions
Poll a JavaScript predicate in the renderer until it returns truthy, then return its value. The predicate is a function body; use return to yield a value. Example body: return document.querySelectorAll(".item").length >= 3.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | Function body. Use `return` to yield the predicate result. | |
| timeoutMs | No | Default 5000. | |
| pollMs | No | Poll interval, default 100. |