> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browspark.krishm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# devtools_sources

> Sources panel: list loaded scripts, stylesheets, documents, frames and execution contexts; get file contents (optionally the original source via source map); se

Sources panel: list loaded scripts, stylesheets, documents, frames and execution contexts; get file contents (optionally the original source via source map); search across sources by filename, text, or regex; resolve source maps; apply, list, and revert temporary resource overrides (served in place of the network response after reload).

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="action" type="enum" required default="list">
  One of: `list`, `get`, `search`, `sourcemap`, `map`, `override`, `overrides`, `revert`.
</ParamField>

<ParamField body="kind" type="enum">
  For list/search; default all One of: `scripts`, `stylesheets`, `documents`, `frames`, `contexts`, `all`.
</ParamField>

<ParamField body="url" type="string">
  Filter (substring) or exact URL for get/override
</ParamField>

<ParamField body="scriptId" type="string">
   
</ParamField>

<ParamField body="styleSheetId" type="string">
   
</ParamField>

<ParamField body="frameId" type="string">
   
</ParamField>

<ParamField body="query" type="string">
  Search text or regex
</ParamField>

<ParamField body="regex" type="boolean">
   
</ParamField>

<ParamField body="caseSensitive" type="boolean">
   
</ParamField>

<ParamField body="fromLine" type="integer">
  1-based, for get
</ParamField>

<ParamField body="toLine" type="integer">
   
</ParamField>

<ParamField body="maxChars" type="integer">
   
</ParamField>

<ParamField body="original" type="boolean">
  get: return original source via source map; search: report original locations
</ParamField>

<ParamField body="source" type="string">
  Original source path (for get original / map)
</ParamField>

<ParamField body="line" type="integer">
  1-based line for map
</ParamField>

<ParamField body="column" type="integer">
   
</ParamField>

<ParamField body="direction" type="enum">
  One of: `toOriginal`, `toGenerated`.
</ParamField>

<ParamField body="body" type="string">
  Override content
</ParamField>

<ParamField body="file" type="string">
  Override content from a local file path
</ParamField>

<ParamField body="contentType" type="string">
   
</ParamField>

<ParamField body="reload" type="boolean">
  Reload after installing/reverting an override
</ParamField>

<ParamField body="offset" type="integer">
  Pagination offset, default 0 Range: 0 to ….
</ParamField>

<ParamField body="limit" type="integer">
  Page size, default 50 Range: 1 to 500.
</ParamField>

## Example

```json Search all scripts theme={null}
{
  "tabId": 1234,
  "action": "search",
  "query": "fetchUser",
  "kind": "scripts"
}
```

```json Original source through the source map theme={null}
{
  "tabId": 1234,
  "action": "get",
  "url": "https://example.com/app.js",
  "original": true,
  "fromLine": 1,
  "toLine": 80
}
```

```json Override a resource until the session stops theme={null}
{
  "tabId": 1234,
  "action": "override",
  "url": "https://example.com/config.json",
  "body": "{\"flag\":true}",
  "contentType": "application/json",
  "reload": true
}
```
