Eval

Run JavaScript in the current tab. This endpoint is disabled unless evaluation is explicitly enabled in config.

terminal
pinchtab eval "document.title"
curl -X POST http://localhost:9867/evaluate \  -H "Content-Type: application/json" \  -d '{"expression":"document.title"}'
Response
{
  "result": "Example Domain"
}

Notes:

  • requires security.allowEvaluate: true
  • the tab-scoped variant is POST /tabs/{id}/evaluate