interceptor_browser_evaluate
Execute a JavaScript file in a browser page and receive its return value. Use it to read or modify page state in isolated or main worlds.
Instructions
Execute a JS file in the page and return its result. Source is loaded from script_path (absolute path). The file body is wrapped in an arrow function receiving __args (so the file may return value; directly and access the optional args object). Worlds: isolated (default) or main (camoufox-only, requires main_world_eval: true at launch). Cloakbrowser (Chromium): isolated runs in Playwright's utility world (different window, same DOM). main is rejected — use interceptor_browser_inject_init_script for main-world patching there. Camoufox (cloverlabs/FF150): there is no separate isolated world — both permitted modes run in the page's main world. Reads are invisible to the page; mutations (window.x = …, Object.defineProperty, prototype patches) are observable by page scripts. Earlier daijro/FF135 had a Juggler scope that made isolated invisible to the page; that scope was removed in cloverlabs. Verify on your installed build with scripts/camoufox-world-probe.ts. Rate-limit on cloakbrowser before reCAPTCHA: each call emits CDP traffic that behavioural scorers count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional JSON-serialisable args object, available inside the script as `__args`. | |
| world | No | `isolated` (default) or `main`. On current camoufox build (cloverlabs/FF150) both run in the page's main world — arg is accepted but has no observable effect. | isolated |
| target_id | Yes | Target ID from interceptor_browser_launch or interceptor_camoufox_launch | |
| script_path | Yes | Absolute path to a .js file. File body is the function body; use `return` to send a value back. | |
| value_max_chars | No | Max characters of the JSON-stringified return value (default: 20000). |