|
Download docs/reference/eval.md from AUXteam/pinch: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/spaces/AUXteam/pinch/resolve/main/docs/reference/eval.md
- Command line
-
hf download hf://spaces/AUXteam/pinch/docs/reference/eval.md
-
curl -L -o eval.md https://huggingface.co/spaces/AUXteam/pinch/resolve/main/docs/reference/eval.md
520 Bytes
| # Eval | |
| Run JavaScript in the current tab. This endpoint is disabled unless evaluation is explicitly enabled in config. | |
| ```bash | |
| curl -X POST http://localhost:9867/evaluate \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"expression":"document.title"}' | |
| # CLI Alternative | |
| pinchtab eval "document.title" | |
| # Response | |
| { | |
| "result": "Example Domain" | |
| } | |
| ``` | |
| Notes: | |
| - requires `security.allowEvaluate: true` | |
| - the tab-scoped variant is `POST /tabs/{id}/evaluate` | |
| ## Related Pages | |
| - [Config](./config.md) | |
| - [Tabs](./tabs.md) | |