Execute JavaScript
execute_javascriptRun JavaScript in an Arc browser tab and get the evaluated result, whether as a bare expression or a statement body with return. Includes helper shortcuts for common DOM operations.
Instructions
Run JavaScript in a tab and return the result. A bare expression, or a statement body that uses return, both work. The helper library is available as A (A.all, A.one, A.click, A.setValue, A.describe, A.visible).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript to evaluate. An expression returns its value; a statement body returns whatever it returns, or null. | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab, falling back to whatever tab is active in Arc. |