Page
Actions and events related to the inspected page belong to the page domain.
Page domain, as shipped in Scrapium 158, with 6 Scrapium additions that only work on Scrapfly Cloud Browser. They carry the Scrapium badge: getRenderedContent, getNavigationResponse, fetch, navigationResponseReceived, NavigationResponseEntry, FetchRedirectEntry. Everything else matches the official Page reference. Dependencies: Debugger, DOM, IO, Network, Runtime
No symbols match your filter.
Commands
Page.addScriptToEvaluateOnLoad
Experimental Deprecated Deprecated, please use addScriptToEvaluateOnNewDocument instead.
Parameters
| Name | Type | Description |
|---|---|---|
scriptSource | string |
Return Object
| Name | Type | Description |
|---|---|---|
identifier | ScriptIdentifier | Identifier of the added script. |
Page.addScriptToEvaluateOnNewDocument
Evaluates given script in every frame upon creation (before loading frame's scripts).
Parameters
| Name | Type | Description |
|---|---|---|
source | string | |
worldName (optional) Experimental | string | If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted. |
includeCommandLineAPI (optional) Experimental | boolean | Specifies whether command line API should be available to the script, defaults to false. |
runImmediately (optional) Experimental | boolean | If true, runs the script immediately on existing execution contexts or worlds. Default: false. |
Return Object
| Name | Type | Description |
|---|---|---|
identifier | ScriptIdentifier | Identifier of the added script. |
Page.bringToFront
Brings page to front (activates tab).
Page.captureScreenshot
Capture page screenshot.
Parameters
| Name | Type | Description |
|---|---|---|
format (optional) | string | Image compression format (defaults to png). |
quality (optional) | integer | Compression quality from range [0..100] (jpeg only). |
clip (optional) | Viewport | Capture the screenshot of a given region only. |
fromSurface (optional) Experimental | boolean | Capture the screenshot from the surface, rather than the view. Defaults to true. |
captureBeyondViewport (optional) Experimental | boolean | Capture the screenshot beyond the viewport. Defaults to false. |
optimizeForSpeed (optional) Experimental | boolean | Optimize image encoding for speed, not for resulting size (defaults to false) |
Return Object
| Name | Type | Description |
|---|---|---|
data | binary | Base64-encoded image data. |
Page.captureScreenshotIO
Experimental Same as captureScreenshot, but the encoded image bytes come back over a CDP IO stream handle
instead of inline, so a large screenshot is never held whole in one CDP message. Read the handle
with IO.read (base64) and close it with IO.close.
Parameters
| Name | Type | Description |
|---|---|---|
format (optional) | string | Image compression format (defaults to png). |
quality (optional) | integer | Compression quality from range [0..100] (jpeg only). |
clip (optional) | Viewport | Capture the screenshot of a given region only. |
fromSurface (optional) Experimental | boolean | Capture the screenshot from the surface, rather than the view. Defaults to true. |
captureBeyondViewport (optional) Experimental | boolean | Capture the screenshot beyond the viewport. Defaults to false. |
optimizeForSpeed (optional) Experimental | boolean | Optimize image encoding for speed, not for resulting size (defaults to false) |
keepCaptureState (optional) Experimental | boolean | Leave the page set up for the next capture beyond the viewport, which a capture without it undoes. Defaults to false. |
Return Object
| Name | Type | Description |
|---|---|---|
stream | IO.StreamHandle | A handle of the stream that holds the encoded image bytes, read as base64. |
Page.captureSnapshot
Experimental Returns a snapshot of the page as a string. For MHTML format, the serialization includes
iframes, shadow DOM, external resources, and element-inline styles.
Parameters
| Name | Type | Description |
|---|---|---|
format (optional) | string | Format (defaults to mhtml). |
Return Object
| Name | Type | Description |
|---|---|---|
data | string | Serialized page data. |
Page.clearDeviceMetricsOverride
Experimental Deprecated Clears the overridden device metrics.
Redirects to: Emulation
Page.clearDeviceOrientationOverride
Experimental Deprecated Clears the overridden Device Orientation.
Redirects to: DeviceOrientation
Page.clearGeolocationOverride
Deprecated Clears the overridden Geolocation Position and Error.
Redirects to: Emulation
Page.createIsolatedWorld
Creates an isolated world for the given frame.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame in which the isolated world should be created. |
worldName (optional) | string | An optional name which is reported in the Execution Context. |
grantUniveralAccess (optional) | boolean | Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. |
contentSecurityPolicy (optional) | string | An optional content security policy to set for the isolated world. If omitted, any existing CSP for the world will be cleared. Note that clearing or updating the CSP does not immediately affect the active context in the same document because LocalDOMWindow caches the ContentSecurityPolicy object. The change takes effect on subsequent navigations when a new window context is created. |
Return Object
| Name | Type | Description |
|---|---|---|
executionContextId | Runtime.ExecutionContextId | Execution context of the isolated world. |
Page.deleteCookie
Experimental Deprecated Deletes browser cookie with given name, domain and path.
Redirects to: Network
Parameters
| Name | Type | Description |
|---|---|---|
cookieName | string | Name of the cookie to remove. |
url | string | URL to match cooke domain and path. |
Page.disable
Disables page domain notifications.
Page.enable
Enables page domain notifications.
Parameters
| Name | Type | Description |
|---|---|---|
enableFileChooserOpenedEvent (optional) Experimental | boolean | If true, the `Page.fileChooserOpened` event will be emitted regardless of the state set by `Page.setInterceptFileChooserDialog` command (default: false). |
Page.getAppManifest
Gets the processed manifest for this current document.
This API always waits for the manifest to be loaded.
If manifestId is provided, and it does not match the manifest of the
current document, this API errors out.
If there is not a loaded page, this API errors out immediately.
Parameters
| Name | Type | Description |
|---|---|---|
manifestId (optional) | string |
Return Object
| Name | Type | Description |
|---|---|---|
url | string | Manifest location. |
errors | array<AppManifestError> | |
data (optional) | string | Manifest content. |
parsed (optional) Experimental Deprecated | AppManifestParsedProperties | Parsed manifest properties. Deprecated, use manifest instead. |
manifest Experimental | WebAppManifest |
Page.getInstallabilityErrors
Experimental Return Object
| Name | Type | Description |
|---|---|---|
installabilityErrors | array<InstallabilityError> |
Page.getManifestIcons
Experimental Deprecated Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
Return Object
| Name | Type | Description |
|---|---|---|
primaryIcon (optional) | binary |
Page.getAppId
Experimental Returns the unique (PWA) app id, along with IWA bundle ID and parent app info.
Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
Return Object
| Name | Type | Description |
|---|---|---|
appId (optional) | string | App id, either from manifest's id attribute or computed from start_url |
recommendedId (optional) | string | Recommendation for manifest's id attribute to match current id computed from start_url |
bundleId (optional) | string | The bundle ID for an Isolated Web App (IWA) |
parentAppName (optional) | string | The name of the parent app if this app is a Sub-App |
Page.getSubApps
Experimental Returns the list of installed child Sub-Apps for the inspected parent app.
Return Object
| Name | Type | Description |
|---|---|---|
subApps | array<SubApp> |
Page.getSiblingSubApps
Experimental Returns the list of sibling Sub-Apps sharing the same parent app if the inspected context is a Sub-App.
Return Object
| Name | Type | Description |
|---|---|---|
subApps | array<SubApp> |
Page.getAdScriptAncestry
Experimental Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId |
Return Object
| Name | Type | Description |
|---|---|---|
adScriptAncestry (optional) | Network.AdAncestry | The ancestry chain of ad script identifiers leading to this frame's creation, along with the root script's filterlist rule. The ancestry chain is ordered from the most immediate script (in the frame creation stack) to more distant ancestors (that created the immediately preceding script). Only sent if frame is labelled as an ad and ids are available. |
Page.getSpellCheckCustomDictionary
Experimental Returns the words that the frame's document added to its spell check custom
dictionary with `document.spellCheckCustomDictionary.addWords()`, sorted.
Page script cannot read the dictionary back; this lets developers inspect
it.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId |
Return Object
| Name | Type | Description |
|---|---|---|
words | array<string> |
Page.getFrameTree
Returns present frame tree structure.
Return Object
| Name | Type | Description |
|---|---|---|
frameTree | FrameTree | Present frame tree structure. |
Page.getRenderedContent
Experimental Scrapium Returns the full rendered content of the page.
For text-serializable types (HTML, XML, JSON, etc.), returns rendered HTML
with iframe content inlined. For binary types (PDF, images, etc.), returns
the raw body bytes as base64.
With `timeout`, the command blocks until the page's document is ready,
`timeout` at most: a navigation of the page in progress has committed,
and the committed document is parsed (DOMContentLoaded). The load event,
and the images, scripts and frames it waits for, are not waited for. The
command fails at once, with the network error (`net::ERR_...`), when the
navigation fails or when the document's own load fails (its connection
reset, closed or lost while the body loads). A document whose load was
stopped (window.stop(), Page.stopLoading) is returned at once, as far as
it got. At the timeout it returns the document the page shows, with
`ready` false: the one before a navigation that has not committed, or a
document still being parsed, as far as the parser got.
Without `timeout`, the command returns the document the page shows at
once, as it is, and does not fail on it: the browser's error page of a
navigation that failed, a document as far as its load or its parser got,
nothing when the page's renderer is gone. `ready` says whether it was a
ready document.
Parameters
| Name | Type | Description |
|---|---|---|
renderIframe (optional) | boolean | When false, skip rendering iframe content (faster). Default true. |
format (optional) | string | Output format for text content: "html" (default) or "markdown". "markdown" converts the rendered HTML to GitHub-flavored Markdown. Relative URLs in links and images are resolved against the main frame URL. Ignored for binary content types. |
timeout (optional) | integer | How long the command waits for the document to be ready, in milliseconds. 0 reads the document as it is now, and fails on a failed navigation or load as a longer wait does. Without it, the command neither waits nor fails on the document. |
Return Object
| Name | Type | Description |
|---|---|---|
content | string | The page content. For text types this is rendered HTML (or markdown if format="markdown") with iframes inlined. For binary types this is base64-encoded raw body bytes. |
type | string | "text" for HTML, "markdown" for converted Markdown, "binary" for non-text. |
ready | boolean | False when the content was not read from a ready document: the document was not ready yet (at the timeout, or at once without one), its navigation or its load failed (read without `timeout`), the page did not answer in time, or its renderer went away. The content may then be empty or stale and is not the page. |
Page.getRenderedContentIO
Experimental Same as getRenderedContent, but the content is returned as an IO stream
instead of one string: the caller reads it with IO.read and closes it with
IO.close. For a large page this keeps the whole content from being held in
one message. For text types the stream reads as UTF-8 text; for binary
types IO.read returns base64.
Parameters
| Name | Type | Description |
|---|---|---|
renderIframe (optional) | boolean | When false, skip rendering iframe content (faster). Default true. |
format (optional) | string | Output format for text content: "html" (default) or "markdown". "markdown" converts the rendered HTML to GitHub-flavored Markdown. Relative URLs in links and images are resolved against the main frame URL. Ignored for binary content types. |
timeout (optional) | integer | How long the command waits for the document to be ready, in milliseconds. 0 reads the document as it is now, and fails on a failed navigation or load as a longer wait does. Without it, the command neither waits nor fails on the document. |
Return Object
| Name | Type | Description |
|---|---|---|
stream | IO.StreamHandle | A handle of the stream that holds the page content. For text types the stream is rendered HTML (or markdown if format="markdown") with iframes inlined; for binary types it is the raw body bytes, read as base64. |
type | string | "text" for HTML, "markdown" for converted Markdown, "binary" for non-text. |
ready | boolean | False when the content was not read from a ready document: the document was not ready yet (at the timeout, or at once without one), its navigation or its load failed (read without `timeout`), the page did not answer in time, or its renderer went away. The stream may then be empty or stale and is not the page. |
Page.fetch
Experimental Scrapium Makes an HTTP request from the browser, outside the page, with the page's
cookies and network settings. The request is sent in the fetch API's default
mode: Sec-Fetch-Mode cors, a fetch()'s priority, and Origin where a cors
fetch() of the page sends it, on the request and on each redirect hop. It
carries Accept */* and the client hints the page's document sends to the URL
unless headers or Network.setExtraHTTPHeaders give them. Like the page's own
requests, it carries the headers Network.setExtraHTTPHeaders gave the page's
sessions, the User-Agent and Accept-Language the page's requests take from
Emulation.setUserAgentOverride, and, to Google's hosts, the headers Chrome
adds to a page's requests there. Unlike the page's own fetch(), no CORS
preflight is sent, and the response is returned whatever its CORS or
Cross-Origin-Resource-Policy headers say. An http(s) request waits for the
page to name its client hints. If the page navigates before the request is
sent, the command fails with "The page navigated before the request was
sent". If the page cannot answer (it crashed, is frozen or shows a dialog)
or has not answered within 5 seconds, the request's only client hints are
Sec-CH-UA, Sec-CH-UA-Mobile and Sec-CH-UA-Platform, where the page's
permissions policy allows them. On iPhone and iPad the request carries no
client hint, not even one headers or Network.setExtraHTTPHeaders give, as
Chrome for iOS sends none. Calls a session makes at once each run to
their own answer, up to 16 unanswered at a time: a call past that fails with
"Too many Page.fetch calls in flight". A call whose response has not fully
arrived 150 seconds after its request left ends there: with statusCode 0
when no response came, else with the response's status and headers and no
content. The browser holds the responses of a session's unanswered calls up
to 64 MiB in all: a call whose response would pass that fails with "The
Page.fetch responses in flight exceed 64 MiB". Follows redirects by default
and returns the full redirect chain alongside the final response. The
request is keyed as the document's own requests are (its top-level site and
its frame): it carries the cookies a site partitioned under them, and it
shares the document's connections. A call made before the frame's document
commits is keyed on its own URL. With inPage, the page makes the request
instead, as its own fetch() (see inPage).
Parameters
| Name | Type | Description |
|---|---|---|
url | string | URL to fetch. A URL longer than 2,097,152 characters is an error. |
method (optional) | string | HTTP method (GET, POST, etc.). Default: GET. DELETE, GET, HEAD, OPTIONS, POST and PUT are sent upper-cased, as a page's fetch() sends them. A method that is not an HTTP token, or CONNECT, TRACE or TRACK, is an error. |
headers (optional) | object | Request headers as key-value pairs. They go out in the order a page's own fetch() sends the same headers, whatever their order here. User-Agent, the client hints and the headers a page can set go before Origin, Sec-Fetch-*, Referer, Accept-Encoding and Cookie, which follow where the browser adds them. An Accept of */* and an Accept-Language equal to the browser's own go where the browser adds its own. The browser adds Accept and the client hints only for a name neither headers nor Network.setExtraHTTPHeaders gives, and Origin only when headers give none. A header given here also wins over one of its name from Network.setExtraHTTPHeaders, except Referer: a Referer here is not sent (see referrer), while one from Network.setExtraHTTPHeaders becomes the referrer. It also wins over a user-agent override's User-Agent and Accept-Language. Of Network.setExtraHTTPHeaders, a Sec-* header that a page's request may not carry is left out, and a Sec-CH-* value is cut to 1,024 characters. To Google's hosts, the headers Chrome adds there replace one of the same name given here, as they do in a page's fetch(). An Origin given here is not recomputed per hop: it goes as null after a redirect to another origin, and is dropped when a redirect changes the method to GET. A header name or value that is not valid HTTP, or a value that is not a string, is an error. |
body (optional) | string | Request body. Without a Content-Type in headers it is sent as text/plain;charset=UTF-8, as a page's fetch() sends a string, and an empty string as an empty body of that type. A GET or HEAD request takes none: a non-empty body with either is an error, and an empty one is not sent. |
followRedirects (optional) | boolean | Whether to follow redirects. Default: true. When false, the first redirect a server sends is the response: its status code, its headers (Location among them) and the URL that answered it, with no content, and the request goes no further. A redirect the browser makes itself, such as an HSTS upgrade to https, is followed. Either way, a redirect whose Location is not a valid URL ends the call as a network error, with statusCode 0. |
credentials (optional) | string | The cookies of the page's cookie jar the request carries, as the Fetch API's credentials: those of any URL (include, the default), only those of the page's origin (same-origin), or none (omit). |
referrer (optional) | string | The referrer of the request, reduced by referrerPolicy for the URL fetched. When not given, the page's URL, as the page's own fetch sends it, and none from an error page or a sandboxed document. An empty string sends none. A Referer in headers is not sent: this sets it. When neither this nor referrerPolicy is given, a Referer from Network.setExtraHTTPHeaders is the referrer, under the unsafe-url policy, as for the page's own requests. |
referrerPolicy (optional) | ReferrerPolicy | The referrer policy applied to referrer, here and on each redirect: the page's referrer policy when not given. |
inPage (optional) | boolean | When true, the page makes the request itself, and what this command says of the request the browser makes (its headers, client hints, CORS, cookies and connections) does not apply. The browser calls the fetch function the page's scripts reach, window.fetch as the page left it, from a script of the frame's document, as the page's own code calls it. It passes url and a RequestInit that holds the parameters given here, and only those: method, headers, body, credentials, referrer, referrerPolicy, and redirect ("follow" or "manual") for followRedirects. The request is the page's fetch(), so the Fetch API's rules apply to it: CORS and its preflight, and the same-origin credentials when credentials is not given. It goes through Fetch interception and the HTTP cache, and Network events report it. A header a page's fetch() may not set (Cookie, Origin, Referer, a Sec- or Proxy- header, the other forbidden request headers) is left out. The headers object the page receives lists the names in sorted order. The answer is the Response the page's fetch() resolves with: its status, its MIME type, its URL and its content; a content over 50 MB fails the call. Its responseHeaders are all the headers the browser gave the page, whatever the CORS headers say, except Set-Cookie, Set-Cookie2 and Clear-Site-Data, which never reach a page. The cookies they set are in the cookie jar. redirectChain is absent. A redirect that is not followed answers its status and headers, as without inPage. When the page's code has already read the Response's body, or the body fails before it has fully arrived, the answer has the status and headers and no content. The call fails when the frame has no committed document that can run script now (it crashed, is frozen, shows a dialog, or has script disabled), when the page's fetch() throws or is rejected (a network error or a CORS refusal; the error names the rejection), when it resolves with anything but a Response, when the frame's document changes before the call is answered, and when the page's frame or its renderer goes away during the call ("The page went away before the call was answered"). A response that CORS refuses is not paused at Fetch interception's response stage; Network.responseReceivedExtraInfo reports its status and headers. The 150 seconds run from the call. Default: false. |
Return Object
| Name | Type | Description |
|---|---|---|
content | string | The final response content (text or base64-encoded binary). |
encoding | string | Content encoding: "text" or "base64". |
statusCode | integer | HTTP status code of the final response. |
responseHeaders | object | Response headers of the final response. |
mimeType | string | MIME type of the response. |
url | string | The final URL after redirects. |
redirectChain (optional) | array<FetchRedirectEntry> | Array of redirect entries (each hop in the redirect chain). |
Page.capture
Experimental Captures the page as an MHTML archive and returns it as an IO stream. The archive comes
from the engine behind chrome.pageCapture.saveAsMHTML and captureSnapshot, so it holds
what they hold: the DOM as it is now, with its iframes, stylesheets and images; no
scripts and no web fonts. The browser neither holds it in memory nor sends it as one
protocol message: read it with IO.read until eof, then release it with IO.close.
Do not overlap captures of one page: a page serves one capture at a time, so a capture
started while another runs fails the one that ran first ("Failed to generate MHTML").
A tab that crashed answers "Frame is not live".
Parameters
| Name | Type | Description |
|---|---|---|
format (optional) | string | Format (defaults to mhtml). |
Return Object
| Name | Type | Description |
|---|---|---|
stream | IO.StreamHandle | A handle of the stream that holds the snapshot. |
size | integer | Size of the snapshot in bytes. |
Page.getLayoutMetrics
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
Return Object
| Name | Type | Description |
|---|---|---|
layoutViewport Deprecated | LayoutViewport | Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead. |
visualViewport Deprecated | VisualViewport | Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead. |
contentSize Deprecated | DOM.Rect | Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead. |
cssLayoutViewport | LayoutViewport | Metrics relating to the layout viewport in CSS pixels. |
cssVisualViewport | VisualViewport | Metrics relating to the visual viewport in CSS pixels. |
cssContentSize | DOM.Rect | Size of scrollable area in CSS pixels. |
Page.getResourceContent
Experimental Returns content of the given resource.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Frame id to get resource for. |
url | string | URL of the resource to get content for. |
Return Object
| Name | Type | Description |
|---|---|---|
content | string | Resource content. |
base64Encoded | boolean | True, if content was served as base64. |
Page.getResourceTree
Experimental Returns present frame / resource tree structure.
Return Object
| Name | Type | Description |
|---|---|---|
frameTree | FrameResourceTree | Present frame / resource tree structure. |
Page.handleJavaScriptDialog
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Parameters
| Name | Type | Description |
|---|---|---|
accept | boolean | Whether to accept or dismiss the dialog. |
promptText (optional) | string | The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. |
Page.printToPDF
Print page as PDF.
Parameters
| Name | Type | Description |
|---|---|---|
landscape (optional) | boolean | Paper orientation. Defaults to false. |
displayHeaderFooter (optional) | boolean | Display header and footer. Defaults to false. |
printBackground (optional) | boolean | Print background graphics. Defaults to false. |
scale (optional) | number | Scale of the webpage rendering. Defaults to 1. |
paperWidth (optional) | number | Paper width in inches. Defaults to 8.5 inches. |
paperHeight (optional) | number | Paper height in inches. Defaults to 11 inches. |
marginTop (optional) | number | Top margin in inches. Defaults to 1cm (~0.4 inches). |
marginBottom (optional) | number | Bottom margin in inches. Defaults to 1cm (~0.4 inches). |
marginLeft (optional) | number | Left margin in inches. Defaults to 1cm (~0.4 inches). |
marginRight (optional) | number | Right margin in inches. Defaults to 1cm (~0.4 inches). |
pageRanges (optional) | string | Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end. |
headerTemplate (optional) | string | HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document For example, `<span class=title></span>` would generate span containing the title. |
footerTemplate (optional) | string | HTML template for the print footer. Should use the same format as the `headerTemplate`. |
preferCSSPageSize (optional) | boolean | Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. |
transferMode (optional) Experimental | string | return as stream |
generateTaggedPDF (optional) Experimental | boolean | Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice. |
generateDocumentOutline (optional) Experimental | boolean | Whether or not to embed the document outline into the PDF. |
Return Object
| Name | Type | Description |
|---|---|---|
data | binary | Base64-encoded pdf data. Empty if |returnAsStream| is specified. |
stream (optional) Experimental | IO.StreamHandle | A handle of the stream that holds resulting PDF data. |
Page.reload
Reloads given page optionally ignoring the cache.
Parameters
| Name | Type | Description |
|---|---|---|
ignoreCache (optional) | boolean | If true, browser cache is ignored (as if the user pressed Shift+refresh). |
scriptToEvaluateOnLoad (optional) | string | If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin. |
loaderId (optional) Experimental | Network.LoaderId | If set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation. |
Page.removeScriptToEvaluateOnLoad
Experimental Deprecated Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
Parameters
| Name | Type | Description |
|---|---|---|
identifier | ScriptIdentifier |
Page.removeScriptToEvaluateOnNewDocument
Removes given script from the list.
Parameters
| Name | Type | Description |
|---|---|---|
identifier | ScriptIdentifier |
Page.screencastFrameAck
Experimental Acknowledges that a screencast frame has been received by the frontend.
Parameters
| Name | Type | Description |
|---|---|---|
sessionId | integer | Frame number. |
Page.searchInResource
Experimental Searches for given string in resource content.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Frame id for resource to search in. |
url | string | URL of the resource to search in. |
query | string | String to search for. |
caseSensitive (optional) | boolean | If true, search is case sensitive. |
isRegex (optional) | boolean | If true, treats string parameter as regex. |
Return Object
| Name | Type | Description |
|---|---|---|
result | array<Debugger.SearchMatch> | List of search matches. |
Page.setAdBlockingEnabled
Experimental Enable Chrome's experimental ad filter on all sites.
Parameters
| Name | Type | Description |
|---|---|---|
enabled | boolean | Whether to block ads. |
Page.setBypassCSP
Enable page Content Security Policy by-passing.
Parameters
| Name | Type | Description |
|---|---|---|
enabled | boolean | Whether to bypass page CSP. |
Page.getPermissionsPolicyState
Experimental Get Permissions Policy state on given frame.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId |
Return Object
| Name | Type | Description |
|---|---|---|
states | array<PermissionsPolicyFeatureState> |
Page.getOriginTrials
Experimental Get Origin Trials on given frame.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId |
Return Object
| Name | Type | Description |
|---|---|---|
originTrials | array<OriginTrial> |
Page.setDeviceMetricsOverride
Experimental Deprecated Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
query results).
Redirects to: Emulation
Parameters
| Name | Type | Description |
|---|---|---|
width | integer | Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
height | integer | Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
deviceScaleFactor | number | Overriding device scale factor value. 0 disables the override. |
mobile | boolean | Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. |
scale (optional) | number | Scale to apply to resulting view image. |
screenWidth (optional) | integer | Overriding screen width value in pixels (minimum 0, maximum 10000000). |
screenHeight (optional) | integer | Overriding screen height value in pixels (minimum 0, maximum 10000000). |
positionX (optional) | integer | Overriding view X position on screen in pixels (minimum 0, maximum 10000000). |
positionY (optional) | integer | Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). |
dontSetVisibleSize (optional) | boolean | Do not set visible view size, rely upon explicit setVisibleSize call. |
screenOrientation (optional) | Emulation.ScreenOrientation | Screen orientation override. |
viewport (optional) | Viewport | The viewport dimensions and scale. If not set, the override is cleared. |
Page.setDeviceOrientationOverride
Experimental Deprecated Overrides the Device Orientation.
Redirects to: DeviceOrientation
Parameters
| Name | Type | Description |
|---|---|---|
alpha | number | Mock alpha |
beta | number | Mock beta |
gamma | number | Mock gamma |
Page.setFontFamilies
Experimental Set generic font families.
Parameters
| Name | Type | Description |
|---|---|---|
fontFamilies | FontFamilies | Specifies font families to set. If a font family is not specified, it won't be changed. |
forScripts (optional) | array<ScriptFontFamilies> | Specifies font families to set for individual scripts. |
Page.setFontSizes
Experimental Set default font sizes.
Parameters
| Name | Type | Description |
|---|---|---|
fontSizes | FontSizes | Specifies font sizes to set. If a font size is not specified, it won't be changed. |
Page.setDocumentContent
Sets given markup as the document's HTML.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Frame id to set HTML for. |
html | string | HTML content to set. |
Page.setDownloadBehavior
Experimental Deprecated Set the behavior when downloading a file.
Parameters
| Name | Type | Description |
|---|---|---|
behavior | string | Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |
downloadPath (optional) | string | The default path to save downloaded files to. This is required if behavior is set to 'allow' |
Page.setGeolocationOverride
Deprecated Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
unavailable.
Redirects to: Emulation
Parameters
| Name | Type | Description |
|---|---|---|
latitude (optional) | number | Mock latitude |
longitude (optional) | number | Mock longitude |
accuracy (optional) | number | Mock accuracy |
Page.setLifecycleEventsEnabled
Controls whether page will emit lifecycle events.
Parameters
| Name | Type | Description |
|---|---|---|
enabled | boolean | If true, starts emitting lifecycle events. |
Page.setTouchEmulationEnabled
Experimental Deprecated Toggles mouse event-based touch event emulation.
Redirects to: Emulation
Parameters
| Name | Type | Description |
|---|---|---|
enabled | boolean | Whether the touch event emulation should be enabled. |
configuration (optional) | string | Touch/gesture events configuration. Default: current platform. |
Page.startScreencast
Experimental Starts sending each frame using the `screencastFrame` event.
Parameters
| Name | Type | Description |
|---|---|---|
format (optional) | string | Image compression format. |
quality (optional) | integer | Compression quality from range [0..100]. |
maxWidth (optional) | integer | Maximum screenshot width. |
maxHeight (optional) | integer | Maximum screenshot height. |
everyNthFrame (optional) | integer | Send every n-th frame. Must be a positive integer. |
maxFramesInFlight (optional) | integer | Maximum number of frames sent until screencastFrameAck is required. Defaults to 3. Must be a positive integer. |
sendLastFrame (optional) | boolean | By default, after screencastFrameAck arrives, the next produced frame is sent. Passing this flag enables storing the last produced frame in memory, which is immediately sent upon screencastFrameAck. This way, overall performance is traded for a better latency. |
Page.startScreenRecording
Experimental Starts screencast video recording.
Parameters
| Name | Type | Description |
|---|---|---|
audio (optional) | boolean | |
maxWidth (optional) | integer | Maximum frame width in pixels. |
maxHeight (optional) | integer | Maximum frame height in pixels. |
frameRate (optional) | integer | Maximum frame rate in frames per second. |
Return Object
| Name | Type | Description |
|---|---|---|
stream Experimental | IO.StreamHandle | A handle of the stream that holds resulting screencast data. |
Page.stopScreenRecording
Experimental Stops screencast video recording.
Return Object
| Name | Type | Description |
|---|---|---|
stream Experimental | IO.StreamHandle | A handle of the stream that holds resulting screencast data. |
Page.stopLoading
Force the page stop all navigations and pending resource fetches.
Page.crash
Experimental Crashes renderer on the IO thread, generates minidumps.
Page.close
Tries to close page, running its beforeunload hooks, if any.
Page.setWebLifecycleState
Experimental Tries to update the web lifecycle state of the page.
It will transition the page to the given state according to:
https://github.com/WICG/web-lifecycle/
Parameters
| Name | Type | Description |
|---|---|---|
state | string | Target lifecycle state |
Page.stopScreencast
Experimental Stops sending each frame in the `screencastFrame`.
Page.produceCompilationCache
Experimental Requests backend to produce compilation cache for the specified scripts.
`scripts` are appended to the list of scripts for which the cache
would be produced. The list may be reset during page navigation.
When script with a matching URL is encountered, the cache is optionally
produced upon backend discretion, based on internal heuristics.
See also: `Page.compilationCacheProduced`.
Parameters
| Name | Type | Description |
|---|---|---|
scripts | array<CompilationCacheParams> |
Page.addCompilationCache
Experimental Seeds compilation cache for given url. Compilation cache does not survive
cross-process navigation.
Parameters
| Name | Type | Description |
|---|---|---|
url | string | |
data | binary | Base64-encoded data |
Page.clearCompilationCache
Experimental Clears seeded compilation cache.
Page.setSPCTransactionMode
Experimental Sets the Secure Payment Confirmation transaction mode.
https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
Parameters
| Name | Type | Description |
|---|---|---|
mode | string |
Page.setRPHRegistrationMode
Experimental Extensions for Custom Handlers API:
https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
Parameters
| Name | Type | Description |
|---|---|---|
mode | string |
Page.generateTestReport
Experimental Generates a report for testing.
Parameters
| Name | Type | Description |
|---|---|---|
message | string | Message to be displayed in the report. |
group (optional) | string | Specifies the endpoint group to deliver the report to. |
Page.waitForDebugger
Experimental Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
Page.setInterceptFileChooserDialog
Intercept file chooser requests and transfer control to protocol clients.
When file chooser interception is enabled, native file chooser dialog is not shown.
Instead, a protocol event `Page.fileChooserOpened` is emitted.
Parameters
| Name | Type | Description |
|---|---|---|
enabled | boolean | |
cancel (optional) Experimental | boolean | If true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false). |
Page.setPrerenderingAllowed
Experimental Enable/disable prerendering manually.
This command is a short-term solution for https://crbug.com/1440085.
See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
for more details.
TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
Parameters
| Name | Type | Description |
|---|---|---|
isAllowed | boolean |
Page.getAnnotatedPageContent
Experimental Get the annotated page content for the main frame.
This is an experimental command that is subject to change.
Parameters
| Name | Type | Description |
|---|---|---|
includeActionableInformation (optional) | boolean | Whether to include actionable information. Defaults to true. |
Return Object
| Name | Type | Description |
|---|---|---|
content | binary | The annotated page content as a base64 encoded protobuf. The format is defined by the `AnnotatedPageContent` message in components/optimization_guide/proto/features/common_quality_data.proto |
Page.setInputVisualization
Experimental Configures input visualization on the page.
Parameters
| Name | Type | Description |
|---|---|---|
clicks (optional) | boolean | Whether to enable click visualization. |
Events
Page.fileChooserOpened
Emitted only when `page.interceptFileChooser` is enabled.
Parameters
| Name | Type | Description |
|---|---|---|
frameId Experimental | FrameId | Id of the frame containing input node. |
mode | string | Input mode. |
backendNodeId (optional) Experimental | DOM.BackendNodeId | Input node id. Only present for file choosers opened via an `<input type="file">` element. |
Page.frameAttached
Fired when frame has been attached to its parent.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that has been attached. |
parentFrameId | FrameId | Parent frame identifier. |
stack (optional) | Runtime.StackTrace | JavaScript stack trace of when frame was attached, only set if frame initiated from script. |
Page.frameDetached
Fired when frame has been detached from its parent.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that has been detached. |
reason Experimental | string |
Page.frameSubtreeWillBeDetached
Experimental Fired before frame subtree is detached. Emitted before any frame of the
subtree is actually detached.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that is the root of the subtree that will be detached. |
Page.documentOpened
Experimental Fired when opening document to write to.
Parameters
| Name | Type | Description |
|---|---|---|
frame | Frame | Frame object. |
Page.frameResized
Experimental Page.frameStartedLoading
Experimental Fired when frame has started loading.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that has started loading. |
Page.frameStoppedLoading
Experimental Fired when frame has stopped loading.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that has stopped loading. |
Page.downloadWillBegin
Experimental Deprecated Fired when page is about to start a download.
Deprecated. Use Browser.downloadWillBegin instead.
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame that caused download to begin. |
guid | string | Global unique identifier of the download. |
url | string | URL of the resource being downloaded. |
suggestedFilename | string | Suggested file name of the resource (the actual name of the file saved on disk may differ). |
Page.downloadProgress
Experimental Deprecated Fired when download makes progress. Last call has |done| == true.
Deprecated. Use Browser.downloadProgress instead.
Parameters
| Name | Type | Description |
|---|---|---|
guid | string | Global unique identifier of the download. |
totalBytes | number | Total expected bytes to download. |
receivedBytes | number | Total bytes received. |
state | string | Download status. |
Page.interstitialHidden
Fired when interstitial page was hidden
Page.interstitialShown
Fired when interstitial page was shown
Page.javascriptDialogClosed
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
closed.
Parameters
| Name | Type | Description |
|---|---|---|
frameId Experimental | FrameId | Frame id. |
result | boolean | Whether dialog was confirmed. |
userInput | string | User input in case of prompt. |
Page.javascriptDialogOpening
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
open.
Parameters
| Name | Type | Description |
|---|---|---|
url | string | Frame url. |
frameId Experimental | FrameId | Frame id. |
message | string | Message that will be displayed by the dialog. |
type | DialogType | Dialog type. |
hasBrowserHandler | boolean | True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. |
defaultPrompt (optional) | string | Default dialog prompt. |
Page.lifecycleEvent
Fired for lifecycle events (navigation, load, paint, etc) in the current
target (including local frames).
Parameters
| Name | Type | Description |
|---|---|---|
frameId | FrameId | Id of the frame. |
loaderId | Network.LoaderId | Loader identifier. Empty string if the request is fetched from worker. |
name | string | |
timestamp | Network.MonotonicTime |
Page.backForwardCacheNotUsed
Experimental Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
not assume any ordering with the Page.frameNavigated event. This event is fired only for
main-frame history navigation where the document changes (non-same-document navigations),
when bfcache navigation fails.
Parameters
| Name | Type | Description |
|---|---|---|
loaderId | Network.LoaderId | The loader id for the associated navigation. |
frameId | FrameId | The frame id of the associated frame. |
notRestoredExplanations | array<BackForwardCacheNotRestoredExplanation> | Array of reasons why the page could not be cached. This must not be empty. |
notRestoredExplanationsTree (optional) | BackForwardCacheNotRestoredExplanationTree | Tree structure of reasons why the page could not be cached for each frame. |
Page.screencastFrame
Experimental Compressed image data requested by the `startScreencast`.
Parameters
| Name | Type | Description |
|---|---|---|
data | binary | Base64-encoded compressed image. |
metadata | ScreencastFrameMetadata | Screencast frame metadata. |
sessionId | integer | Frame number. |
Page.screencastVisibilityChanged
Experimental Fired when the page with currently enabled screencast was shown or hidden `.
Parameters
| Name | Type | Description |
|---|---|---|
visible | boolean | True if the page is visible. |
Page.windowOpen
Fired when a new window is going to be opened, via window.open(), link click, form submission,
etc.
Parameters
| Name | Type | Description |
|---|---|---|
url | string | The URL for the new window. |
windowName | string | Window name. |
windowFeatures | array<string> | An array of enabled window features. |
userGesture | boolean | Whether or not it was triggered by user gesture. |
Page.compilationCacheProduced
Experimental Issued for every compilation cache generated.
Parameters
| Name | Type | Description |
|---|---|---|
url | string | |
data | binary | Base64-encoded data |
Types
FrameId
(string) Unique frame identifier.
AdFrameType
(string) Experimental Indicates whether a frame has been identified as an ad.
Allowed Values
nonechildroot
AdFrameExplanation
(string) Experimental Allowed Values
ParentIsAdCreatedByAdScriptMatchedBlockingRule
AdFrameStatus
(object) Experimental Indicates whether a frame has been identified as an ad and why.
Properties
| Name | Type | Description |
|---|---|---|
adFrameType | AdFrameType | |
explanations (optional) | array<AdFrameExplanation> |
SecureContextType
(string) Experimental Indicates whether the frame is a secure context and why it is the case.
Allowed Values
SecureSecureLocalhostInsecureSchemeInsecureAncestor
CrossOriginIsolatedContextType
(string) Experimental Indicates whether the frame is cross-origin isolated and why it is the case.
Allowed Values
IsolatedNotIsolatedNotIsolatedFeatureDisabled
GatedAPIFeatures
(string) Experimental Allowed Values
SharedArrayBuffersSharedArrayBuffersTransferAllowedPerformanceMeasureMemoryPerformanceProfile
PermissionsPolicyFeature
(string) Experimental All Permissions Policy features. This enum should match the one defined
in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
LINT.IfChange(PermissionsPolicyFeature)
Allowed Values
accelerometerall-screens-captureambient-light-sensoraria-notifyautofillautoplaybluetoothbrowsing-topicscameracaptured-surface-controlch-dprch-device-memorych-downlinkch-ectch-prefers-color-schemech-prefers-reduced-motionch-prefers-reduced-transparencych-rttch-save-datach-uach-ua-archch-ua-bitnessch-ua-high-entropy-valuesch-ua-platformch-ua-modelch-ua-mobilech-ua-form-factorsch-ua-full-versionch-ua-full-version-listch-ua-platform-versionch-ua-wow64ch-viewport-heightch-viewport-widthch-widthclipboard-readclipboard-writecompute-pressurecontrolled-framecross-origin-isolateddeferred-fetchdeferred-fetch-minimaldevice-attributesdigital-credentials-createdigital-credentials-getdirect-socketsdirect-sockets-multicastdisplay-capturedocument-domainencrypted-mediaexecution-while-out-of-viewportexecution-while-not-renderedfocus-without-user-activationfullscreenfrobulategamepadgeolocationgyroscopehapticshididentity-credentials-getidle-detectioninterest-cohortkeyboard-maplanguage-detectorlanguage-modellocal-fontslocal-networklocal-network-accessloopback-networkmagnetometermanual-textmedia-playback-while-not-visiblemicrophonemidion-device-speech-recognitionotp-credentialspaymentpicture-in-pictureprivate-state-token-issuanceprivate-state-token-redemptionpublickey-credentials-createpublickey-credentials-getpublickey-credentials-remote-client-data-jsonrewriterscreen-wake-lockserialsmart-cardspeaker-selectionstorage-accesssub-appssummarizersync-xhrtoolstranslatorunbounded-elementunloadusbusb-unrestrictedvertical-scrollweb-app-installationwebnnweb-printingweb-sharewindow-managementwriterxr-spatial-tracking
PermissionsPolicyBlockReason
(string) Experimental Reason for a permissions policy feature to be disabled.
Allowed Values
HeaderIframeAttributeInFencedFrameTreeInIsolatedApp
PermissionsPolicyBlockLocator
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
frameId | FrameId | |
blockReason | PermissionsPolicyBlockReason |
PermissionsPolicyFeatureState
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
feature | PermissionsPolicyFeature | |
allowed | boolean | |
locator (optional) | PermissionsPolicyBlockLocator |
OriginTrialTokenStatus
(string) Experimental Origin Trial(https://www.chromium.org/blink/origin-trials) support.
Status for an Origin Trial token.
Allowed Values
SuccessNotSupportedInsecureExpiredWrongOriginInvalidSignatureMalformedWrongVersionFeatureDisabledTokenDisabledFeatureDisabledForUserUnknownTrial
OriginTrialStatus
(string) Experimental Status for an Origin Trial.
Allowed Values
EnabledValidTokenNotProvidedOSNotSupportedTrialNotAllowed
OriginTrialUsageRestriction
(string) Experimental Allowed Values
NoneSubset
OriginTrialToken
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
origin | string | |
matchSubDomains | boolean | |
trialName | string | |
expiryTime | Network.TimeSinceEpoch | |
isThirdParty | boolean | |
usageRestriction | OriginTrialUsageRestriction |
OriginTrialTokenWithStatus
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
rawTokenText | string | |
parsedToken (optional) | OriginTrialToken | `parsedToken` is present only when the token is extractable and parsable. |
status | OriginTrialTokenStatus |
OriginTrial
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
trialName | string | |
status | OriginTrialStatus | |
tokensWithStatus | array<OriginTrialTokenWithStatus> |
SecurityOriginDetails
(object) Experimental Additional information about the frame document's security origin.
Properties
| Name | Type | Description |
|---|---|---|
isLocalhost | boolean | Indicates whether the frame document's security origin is one of the local hostnames (e.g. "localhost") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1). |
Frame
(object) Information about the Frame on the page.
Properties
| Name | Type | Description |
|---|---|---|
id | FrameId | Frame unique identifier. |
parentId (optional) | FrameId | Parent frame identifier. |
loaderId | Network.LoaderId | Identifier of the loader associated with this frame. |
name (optional) | string | Frame's name as specified in the tag. |
url | string | Frame document's URL without fragment. |
urlFragment (optional) Experimental | string | Frame document's URL fragment including the '#'. |
domainAndRegistry Experimental | string | Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com" http://a.b.co.uk/file.html -> "b.co.uk" |
securityOrigin | string | Frame document's security origin. |
securityOriginDetails (optional) Experimental | SecurityOriginDetails | Additional details about the frame document's security origin. |
mimeType | string | Frame document's mimeType as determined by the browser. |
unreachableUrl (optional) Experimental | string | If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment. |
adFrameStatus (optional) Experimental | AdFrameStatus | Indicates whether this frame was tagged as an ad and why. |
secureContextType Experimental | SecureContextType | Indicates whether the main document is a secure context and explains why that is the case. |
crossOriginIsolatedContextType Experimental | CrossOriginIsolatedContextType | Indicates whether this is a cross origin isolated context. |
gatedAPIFeatures Experimental | array<GatedAPIFeatures> | Indicated which gated APIs / features are available. |
FrameResource
(object) Experimental Information about the Resource on the page.
Properties
| Name | Type | Description |
|---|---|---|
url | string | Resource URL. |
type | Network.ResourceType | Type of this resource. |
mimeType | string | Resource mimeType as determined by the browser. |
lastModified (optional) | Network.TimeSinceEpoch | last-modified timestamp as reported by server. |
contentSize (optional) | number | Resource content size. |
failed (optional) | boolean | True if the resource failed to load. |
canceled (optional) | boolean | True if the resource was canceled during loading. |
FrameResourceTree
(object) Experimental Information about the Frame hierarchy along with their cached resources.
Properties
| Name | Type | Description |
|---|---|---|
frame | Frame | Frame information for this tree item. |
childFrames (optional) | array<FrameResourceTree> | Child frames. |
resources | array<FrameResource> | Information about frame resources. |
ScriptIdentifier
(string) Unique script identifier.
TransitionType
(string) Transition type.
Allowed Values
linktypedaddress_barauto_bookmarkauto_subframemanual_subframegeneratedauto_toplevelform_submitreloadkeywordkeyword_generatedother
ScreencastFrameMetadata
(object) Experimental Screencast frame metadata.
Properties
| Name | Type | Description |
|---|---|---|
offsetTop | number | Top offset in DIP. |
pageScaleFactor | number | Page scale factor. |
deviceWidth | number | Device screen width in DIP. |
deviceHeight | number | Device screen height in DIP. |
scrollOffsetX | number | Position of horizontal scroll in CSS pixels. |
scrollOffsetY | number | Position of vertical scroll in CSS pixels. |
timestamp (optional) | Network.TimeSinceEpoch | Frame swap timestamp. |
monotonicTimestamp (optional) | Network.MonotonicTime | Frame swap timestamp as monotonic time. |
DialogType
(string) Javascript dialog type.
Allowed Values
alertconfirmpromptbeforeunload
AppManifestError
(object) Error while paring app manifest.
Properties
| Name | Type | Description |
|---|---|---|
message | string | Error message. |
critical | integer | If critical, this is a non-recoverable parse error. |
line | integer | Error line. |
column | integer | Error column. |
AppManifestParsedProperties
(object) Experimental Parsed app manifest properties.
Properties
| Name | Type | Description |
|---|---|---|
scope | string | Computed scope value |
LayoutViewport
(object) Layout viewport position and dimensions.
Properties
| Name | Type | Description |
|---|---|---|
pageX | integer | Horizontal offset relative to the document (CSS pixels). |
pageY | integer | Vertical offset relative to the document (CSS pixels). |
clientWidth | integer | Width (CSS pixels), excludes scrollbar if present. |
clientHeight | integer | Height (CSS pixels), excludes scrollbar if present. |
VisualViewport
(object) Visual viewport position, dimensions, and scale.
Properties
| Name | Type | Description |
|---|---|---|
offsetX | number | Horizontal offset relative to the layout viewport (CSS pixels). |
offsetY | number | Vertical offset relative to the layout viewport (CSS pixels). |
pageX | number | Horizontal offset relative to the document (CSS pixels). |
pageY | number | Vertical offset relative to the document (CSS pixels). |
clientWidth | number | Width (CSS pixels), excludes scrollbar if present. |
clientHeight | number | Height (CSS pixels), excludes scrollbar if present. |
scale | number | Scale relative to the ideal viewport (size at width=device-width). |
zoom (optional) | number | Page zoom factor (CSS to device independent pixels ratio). |
Viewport
(object) Viewport for capturing screenshot.
Properties
| Name | Type | Description |
|---|---|---|
x | number | X offset in device independent pixels (dip). |
y | number | Y offset in device independent pixels (dip). |
width | number | Rectangle width in device independent pixels (dip). |
height | number | Rectangle height in device independent pixels (dip). |
scale | number | Page scale factor. |
FontFamilies
(object) Experimental Generic font families collection.
Properties
| Name | Type | Description |
|---|---|---|
standard (optional) | string | The standard font-family. |
fixed (optional) | string | The fixed font-family. |
serif (optional) | string | The serif font-family. |
sansSerif (optional) | string | The sansSerif font-family. |
cursive (optional) | string | The cursive font-family. |
fantasy (optional) | string | The fantasy font-family. |
math (optional) | string | The math font-family. |
ScriptFontFamilies
(object) Experimental Font families collection for a script.
Properties
| Name | Type | Description |
|---|---|---|
script | string | Name of the script which these font families are defined for. |
fontFamilies | FontFamilies | Generic font families collection for the script. |
FontSizes
(object) Experimental Default font sizes.
Properties
| Name | Type | Description |
|---|---|---|
standard (optional) | integer | Default standard font size. |
fixed (optional) | integer | Default fixed font size. |
InstallabilityErrorArgument
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
name | string | Argument name (e.g. name:'minimum-icon-size-in-pixels'). |
value | string | Argument value (e.g. value:'64'). |
InstallabilityError
(object) Experimental The installability error
Properties
| Name | Type | Description |
|---|---|---|
errorId | string | The error id (e.g. 'manifest-missing-suitable-icon'). |
errorArguments | array<InstallabilityErrorArgument> | The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}). |
ReferrerPolicy
(string) Experimental The referring-policy used for the navigation.
Allowed Values
noReferrernoReferrerWhenDowngradeoriginoriginWhenCrossOriginsameOriginstrictOriginstrictOriginWhenCrossOriginunsafeUrl
CompilationCacheParams
(object) Experimental Per-script compilation cache parameters for `Page.produceCompilationCache`
Properties
| Name | Type | Description |
|---|---|---|
url | string | The URL of the script to produce a compilation cache entry for. |
eager (optional) | boolean | A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion). |
FileFilter
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
name (optional) | string | |
accepts (optional) | array<string> |
FileHandler
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
action | string | |
name | string | |
accepts (optional) | array<FileFilter> | Mimic a map, name is the key, accepts is the value. |
launchType | string | Won't repeat the enums, using string for easy comparison. Same as the other enums below. |
ImageResource
(object) Experimental The image definition used in both icon and screenshot.
Properties
| Name | Type | Description |
|---|---|---|
url | string | The src field in the definition, but changing to url in favor of consistency. |
sizes (optional) | string | |
type (optional) | string |
LaunchHandler
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
clientMode | string |
ProtocolHandler
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
protocol | string | |
url | string |
RelatedApplication
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
id (optional) | string | |
url | string |
ScopeExtension
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
origin | string | Instead of using tuple, this field always returns the serialized string for easy understanding and comparison. |
hasOriginWildcard | boolean |
Screenshot
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
image | ImageResource | |
formFactor | string | |
label (optional) | string |
Shortcut
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
name | string | |
url | string |
WebAppManifest
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
backgroundColor (optional) | string | |
description (optional) | string | The extra description provided by the manifest. |
dir (optional) | string | |
display (optional) | string | |
displayOverrides (optional) | array<string> | The overrided display mode controlled by the user. |
fileHandlers (optional) | array<FileHandler> | The handlers to open files. |
icons (optional) | array<ImageResource> | |
id (optional) | string | |
lang (optional) | string | |
launchHandler (optional) | LaunchHandler | TODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md |
name (optional) | string | |
orientation (optional) | string | |
preferRelatedApplications (optional) | boolean | |
protocolHandlers (optional) | array<ProtocolHandler> | The handlers to open protocols. |
relatedApplications (optional) | array<RelatedApplication> | |
scope (optional) | string | |
scopeExtensions (optional) | array<ScopeExtension> | Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md |
screenshots (optional) | array<Screenshot> | The screenshots used by chromium. |
shareTarget (optional) | ShareTarget | |
shortName (optional) | string | |
shortcuts (optional) | array<Shortcut> | |
startUrl (optional) | string | |
themeColor (optional) | string |
SubApp
(object) Properties
| Name | Type | Description |
|---|---|---|
name | string | Display name of the sub-app. |
scope | string | Scope of the sub-app. |
manifestId | string | Manifest id of the sub-app. |
startUrl | string | Start URL of the sub-app. |
DocumentResponseSource
(string) Experimental Where the response of a document came from: the network; the browser's
HTTP cache (cache), whether or not the browser first asked the server to
revalidate it and was answered 304, and including a response a link
rel=prefetch put there; a prefetch the browser made before the navigation,
for the page's speculation rules (prefetch); the page's service worker
(serviceWorker); or a client of this protocol, with Fetch.fulfillRequest,
with or without a body (client).
Allowed Values
networkcacheprefetchserviceWorkerclient
DocumentResponse
(object) Experimental The response a main-frame document was made from, as the browser uses it.
Properties
| Name | Type | Description |
|---|---|---|
loaderId | Network.LoaderId | Loader of the document: the loaderId Page.frameNavigated reports for the frame that shows it, and the loaderId of the Network events of the request it was loaded with. A page restored from the back/forward cache keeps the loader it was first loaded with. |
url | string | URL of the response: the one the document was loaded from, after the redirects its request followed. A same-document navigation of the page (history.pushState, a fragment) does not change it. |
statusCode | integer | HTTP status code of the response, never a redirect hop's. A response the browser revalidated with the server reads the status of the response it kept, not the 304. |
headers | object | Response headers, a header sent more than once as its values joined by newlines, as Network.Response.headers carries them. |
mimeType | string | MIME type of the response as the browser reads it: the type its Content-Type names, or the type the browser sniffed from the body when it named none or one the browser sniffs (unknown/unknown, application/unknown, */*, an XML type whose body is a feed). The document made from the response has this type: document.contentType reads it. |
charset | string | Charset the response's Content-Type names, empty when it names none. The document can be decoded in another encoding: characterSet says which. |
characterSet (optional) | string | Character encoding the document is decoded with, as document.characterSet reads it: the charset the response names, unless a byte order mark overrides it, else the one a meta element declares or the browser detects. Only Page.getNavigationResponse reports it, once the document has been parsed (its DOMContentLoaded event): until then the browser may still change it. Absent for an error page, which is not decoded from the response. |
source | DocumentResponseSource | Where the response came from. |
isErrorPage | boolean | True when the browser shows its own error page instead of a document made from this response (an error status with an empty body). |
FetchRedirectEntry
(object) Experimental Scrapium A single redirect entry in a fetch redirect chain.
Properties
| Name | Type | Description |
|---|---|---|
url | string | URL that issued the redirect. |
statusCode | integer | HTTP status code of the redirect (301, 302, 307, 308). |
headers | object | Response headers of the redirect response. |
BackForwardCacheNotRestoredReason
(string) Experimental List of not restored reasons for back-forward cache.
Allowed Values
NotPrimaryMainFrameBackForwardCacheDisabledRelatedActiveContentsExistHTTPStatusNotOKSchemeNotHTTPOrHTTPSLoadingWasGrantedMediaAccessDisableForRenderFrameHostCalledDomainNotAllowedHTTPMethodNotGETSubframeIsNavigatingTimeoutCacheLimitJavaScriptExecutionRendererProcessKilledRendererProcessCrashedSchedulerTrackedFeatureUsedConflictingBrowsingInstanceCacheFlushedServiceWorkerVersionActivationSessionRestoredServiceWorkerPostMessageEnteredBackForwardCacheBeforeServiceWorkerHostAddedRenderFrameHostReused_SameSiteRenderFrameHostReused_CrossSiteServiceWorkerClaimIgnoreEventAndEvictHaveInnerContentsTimeoutPuttingInCacheBackForwardCacheDisabledByLowMemoryBackForwardCacheDisabledByCommandLineNetworkRequestDatapipeDrainedAsBytesConsumerNetworkRequestRedirectedNetworkRequestTimeoutNetworkExceedsBufferLimitNavigationCancelledWhileRestoringNotMostRecentNavigationEntryBackForwardCacheDisabledForPrerenderUserAgentOverrideDiffersForegroundCacheLimitForwardCacheDisabledBrowsingInstanceNotSwappedBackForwardCacheDisabledForDelegateUnloadHandlerExistsInMainFrameUnloadHandlerExistsInSubFrameServiceWorkerUnregistrationCacheControlNoStoreCacheControlNoStoreCookieModifiedCacheControlNoStoreHTTPOnlyCookieModifiedNoResponseHeadUnknownActivationNavigationsDisallowedForBug1234857ErrorDocumentFencedFramesEmbedderCookieDisabledHTTPAuthRequiredCookieFlushedBroadcastChannelOnMessageWebViewSettingsChangedWebViewJavaScriptObjectChangedWebViewMessageListenerInjectedWebViewSafeBrowsingAllowlistChangedWebViewDocumentStartJavascriptChangedWebSocketWebTransportWebRTCMainResourceHasCacheControlNoStoreMainResourceHasCacheControlNoCacheSubresourceHasCacheControlNoStoreSubresourceHasCacheControlNoCacheContainsPluginsDocumentLoadedOutstandingNetworkRequestOthersRequestedMIDIPermissionRequestedAudioCapturePermissionRequestedVideoCapturePermissionRequestedBackForwardCacheBlockedSensorsRequestedBackgroundWorkPermissionBroadcastChannelWebXRSharedWorkerSharedWorkerMessageSharedWorkerWithNoActiveClientWebLocksWebLocksContentionWebHIDWebBluetoothWebShareRequestedStorageAccessGrantWebNfcOutstandingNetworkRequestFetchOutstandingNetworkRequestXHRAppBannerPrintingWebDatabasePictureInPictureSpeechRecognizerIdleManagerPaymentManagerSpeechSynthesisKeyboardLockWebOTPServiceOutstandingNetworkRequestDirectSocketInjectedJavascriptInjectedStyleSheetKeepaliveRequestIndexedDBEventDummyJsNetworkRequestReceivedCacheControlNoStoreResourceWebRTCUsedWithCCNSWebTransportUsedWithCCNSWebSocketUsedWithCCNSSmartCardLiveMediaStreamTrackUnloadHandlerParserAbortedContentSecurityHandlerContentWebAuthenticationAPIContentFileChooserContentSerialContentFileSystemAccessContentMediaDevicesDispatcherHostContentWebBluetoothContentWebUSBContentMediaSessionServiceContentScreenReaderContentDiscardedEmbedderPopupBlockerTabHelperEmbedderSafeBrowsingTriggeredPopupBlockerEmbedderSafeBrowsingThreatDetailsEmbedderAppBannerManagerEmbedderDomDistillerViewerSourceEmbedderDomDistillerSelfDeletingRequestDelegateEmbedderOomInterventionTabHelperEmbedderOfflinePageEmbedderChromePasswordManagerClientBindCredentialManagerEmbedderPermissionRequestManagerEmbedderModalDialogEmbedderExtensionsEmbedderExtensionMessagingEmbedderExtensionMessagingForOpenPortEmbedderExtensionSentMessageToCachedFrameEmbedderExtensionFrameEmbedderPrivilegedWebContentsRequestedByWebViewClientPostMessageByWebViewClientCacheControlNoStoreDeviceBoundSessionTerminatedCacheLimitPrunedOnModerateMemoryPressureCacheLimitPrunedOnCriticalMemoryPressure
BackForwardCacheNotRestoredReasonType
(string) Experimental Types of not restored reasons for back-forward cache.
Allowed Values
SupportPendingPageSupportNeededCircumstantial
BackForwardCacheBlockingDetails
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
url (optional) | string | Url of the file where blockage happened. Optional because of tests. |
function (optional) | string | Function name where blockage happened. Optional because of anonymous functions and tests. |
lineNumber | integer | Line number in the script (0-based). |
columnNumber | integer | Column number in the script (0-based). |
BackForwardCacheNotRestoredExplanation
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
type | BackForwardCacheNotRestoredReasonType | Type of the reason |
reason | BackForwardCacheNotRestoredReason | Not restored reason |
context (optional) | string | Context associated with the reason. The meaning of this context is dependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: the extension ID. |
details (optional) | array<BackForwardCacheBlockingDetails> |
BackForwardCacheNotRestoredExplanationTree
(object) Experimental Properties
| Name | Type | Description |
|---|---|---|
url | string | URL of each frame |
explanations | array<BackForwardCacheNotRestoredExplanation> | Not restored reasons of each frame |
children | array<BackForwardCacheNotRestoredExplanationTree> | Array of children frame |