File size: 520 Bytes
25b930c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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)