Skip to main content
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

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.
enum
default:"list"
required
One of: list, get, search, sourcemap, map, override, overrides, revert.
enum
For list/search; default all One of: scripts, stylesheets, documents, frames, contexts, all.
string
Filter (substring) or exact URL for get/override
string
 
string
 
string
 
string
Search text or regex
boolean
 
boolean
 
integer
1-based, for get
integer
 
integer
 
boolean
get: return original source via source map; search: report original locations
string
Original source path (for get original / map)
integer
1-based line for map
integer
 
enum
One of: toOriginal, toGenerated.
string
Override content
string
Override content from a local file path
string
 
boolean
Reload after installing/reverting an override
integer
Pagination offset, default 0 Range: 0 to ….
integer
Page size, default 50 Range: 1 to 500.

Example

Search all scripts
Original source through the source map
Override a resource until the session stops