---
title: "Evaluate JavaScript in tab"
method: POST
path: "/tabs/{tabId}/evaluate"
tags: ["Interaction"]
---

# Evaluate JavaScript in tab

`POST /tabs/{tabId}/evaluate`

Runs arbitrary JS in the page context and returns the result.

## Path parameters

- `tabId` string, required

## Request body

- object
  - `userId` string, required
  - `expression` string, required — JavaScript expression to evaluate.

## Response `200`

Evaluation result.

- object
  - `ok` boolean
  - `result` unknown

## Other responses

- `400` — Bad request.
- `404` — Tab not found.

---

[API](https://skmtc.dev/jo-inc/apis/camofox-browser.md) · [All operations](https://skmtc.dev/jo-inc/apis/camofox-browser/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jo-inc/camofox-browser/revisions/80bb18f1c19f/schema)
