eval
Evaluate a JavaScript expression in the Tauri app's webview.
Bridge Required
This command requires an active bridge connection.
Usage
Options
| Option | Description | Default |
|---|---|---|
<expression> |
JavaScript expression to evaluate (required) | — |
--port <number> |
Bridge port (auto-discover if omitted) | — |
--token <string> |
Bridge token (auto-discover if omitted) | — |
Examples
Get document title
Count elements
Get structured data
Check Tauri API availability
Get computed style value
Notes
- The expression runs in the webview's JavaScript context
- Results that look like JSON are automatically pretty-printed
- The bridge has a 5-second timeout per evaluation
- This is a read-only tool — use it to inspect state, not modify it