For AI agents: a documentation index is available at /llms.txt
Skip to main content

EvaluateOptions

Properties​

PropertyTypeDescription
timeout?numberA timeout to wait for the script to finish evaluating, overriding any defaults. Useful for async scripts that may be longer running. Defaults to the session's default timeout: 30 seconds (30000) unless changed with the preferences mutation. Pass 0 for no limit; negative values are rejected. A script that runs longer fails with a "timed out" error. A script still running synchronously (for example a busy loop) is stopped; work it has already scheduled, such as timers or pending promises, keeps running in the page. With url, a positive limit also covers downloading the script; otherwise the download is limited to 10 seconds.
url?stringThe URL of the script you'd like to evaluate. This code gets wrapped in an async function so you can use return at the end as well as await and other async concepts. You can return any stringified value from this function
Was this page helpful?