stable (1.2) latest (tip-of-tree) v8-inspector (node) Home Domains Accessibility Animation ApplicationCache CSS CacheStorage Console DOM DOMDebugger DOMStorage Database Debugger DeviceOrientation Emulation HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Page Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome Debugging Protocol Viewer - latest (tip-of-tree)

Page Domain

Actions and events related to the inspected page belong to the page domain.

Methods

Page. enable

Enables page domain notifications.

Page. disable

Disables page domain notifications.

Page. addScriptToEvaluateOnLoad

Experimental

Parameters
scriptSource
string
Return object
identifier
ScriptIdentifier Identifier of the added script.

Page. removeScriptToEvaluateOnLoad

Experimental

Parameters
identifier
ScriptIdentifier

Page. setAutoAttachToCreatedPages

Controls whether browser will open a new inspector window for connected pages. Experimental

Parameters
autoAttach
boolean If true, browser will open a new inspector window for every page created from this one.

Page. reload

Reloads given page optionally ignoring the cache.

Parameters
ignoreCache
boolean If true, browser cache is ignored (as if the user pressed Shift+refresh).
scriptToEvaluateOnLoad
string If set, the script will be injected into all frames of the inspected page after reload.

Page. navigate

Navigates current page to the given URL.

Parameters
url
string URL to navigate the page to.
referrer
string Referrer URL. Experimental
Return object
frameId
FrameId Frame id that will be navigated. Experimental

Page. stopLoading

Force the page stop all navigations and pending resource fetches. Experimental

Page. getNavigationHistory

Returns navigation history for the current page. Experimental

Return object
currentIndex
integer Index of the current navigation history entry.
entries
array [ NavigationEntry ] Array of navigation history entries.

Page. navigateToHistoryEntry

Navigates current page to the given history entry. Experimental

Parameters
entryId
integer Unique id of the entry to navigate to.

Page. getResourceTree

Returns present frame / resource tree structure. Experimental

Return object
frameTree
FrameResourceTree Present frame / resource tree structure.

Page. getResourceContent

Returns content of the given resource. Experimental

Parameters
frameId
FrameId Frame id to get resource for.
url
string URL of the resource to get content for.
Return object
content
string Resource content.
base64Encoded
boolean True, if content was served as base64.

Page. searchInResource

Searches for given string in resource content. Experimental

Parameters
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
boolean If true, search is case sensitive.
isRegex
boolean If true, treats string parameter as regex.
Return object
result
array [ Debugger.SearchMatch ] List of search matches.

Page. setDocumentContent

Sets given markup as the document's HTML. Experimental

Parameters
frameId
FrameId Frame id to set HTML for.
html
string HTML content to set.

Page. captureScreenshot

Capture page screenshot. Experimental

Parameters
format
string Image compression format (defaults to png). Allowed values: jpeg, png.
quality
integer Compression quality from range [0..100] (jpeg only).
fromSurface
boolean Capture the screenshot from the surface, rather than the view. Defaults to false. Experimental
Return object
data
string Base64-encoded image data.

Page. printToPDF

Print page as pdf. Experimental

Return object
data
string Base64-encoded pdf data.

Page. startScreencast

Starts sending each frame using the screencastFrame event. Experimental

Parameters
format
string Image compression format. Allowed values: jpeg, png.
quality
integer Compression quality from range [0..100].
maxWidth
integer Maximum screenshot width.
maxHeight
integer Maximum screenshot height.
everyNthFrame
integer Send every n-th frame.

Page. stopScreencast

Stops sending each frame in the screencastFrame. Experimental

Page. screencastFrameAck

Acknowledges that a screencast frame has been received by the frontend. Experimental

Parameters
sessionId
integer Frame number.

Page. handleJavaScriptDialog

Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

Parameters
accept
boolean Whether to accept or dismiss the dialog.
promptText
string The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.

Page. getAppManifest

Experimental

Return object
url
string Manifest location.
errors
array [ AppManifestError ]
data
string Manifest content.

Page. requestAppBanner

Experimental

Page. setControlNavigations

Toggles navigation throttling which allows programatic control over navigation and redirect response. Experimental

Parameters
enabled
boolean

Page. processNavigation

Should be sent in response to a navigationRequested or a redirectRequested event, telling the browser how to handle the navigation. Experimental

Parameters
navigationId
integer

Page. getLayoutMetrics

Returns metrics relating to the layouting of the page, such as viewport bounds/scale. Experimental

Return object
layoutViewport
LayoutViewport Metrics relating to the layout viewport.
visualViewport
VisualViewport Metrics relating to the visual viewport.
contentSize
DOM.Rect Size of scrollable area.

Events

Page. domContentEventFired

Parameters
timestamp
number

Page. loadEventFired

Parameters
timestamp
number

Page. frameAttached

Fired when frame has been attached to its parent.

Parameters
frameId
FrameId Id of the frame that has been attached.
parentFrameId
FrameId Parent frame identifier.
stack
Runtime.StackTrace JavaScript stack trace of when frame was attached, only set if frame initiated from script. Experimental

Page. frameNavigated

Fired once navigation of the frame has completed. Frame is now associated with the new loader.

Parameters
frame
Frame Frame object.

Page. frameDetached

Fired when frame has been detached from its parent.

Parameters
frameId
FrameId Id of the frame that has been detached.

Page. frameStartedLoading

Fired when frame has started loading. Experimental

Parameters
frameId
FrameId Id of the frame that has started loading.

Page. frameStoppedLoading

Fired when frame has stopped loading. Experimental

Parameters
frameId
FrameId Id of the frame that has stopped loading.

Page. frameScheduledNavigation

Fired when frame schedules a potential navigation. Experimental

Parameters
frameId
FrameId Id of the frame that has scheduled a navigation.
delay
number Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.

Page. frameClearedScheduledNavigation

Fired when frame no longer has a scheduled navigation. Experimental

Parameters
frameId
FrameId Id of the frame that has cleared its scheduled navigation.

Page. frameResized

Experimental

Page. javascriptDialogOpening

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

Parameters
message
string Message that will be displayed by the dialog.
type
DialogType Dialog type.

Page. javascriptDialogClosed

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

Parameters
result
boolean Whether dialog was confirmed.

Page. screencastFrame

Compressed image data requested by the startScreencast. Experimental

Parameters
data
string Base64-encoded compressed image.
metadata
ScreencastFrameMetadata Screencast frame metadata.
sessionId
integer Frame number.

Page. screencastVisibilityChanged

Fired when the page with currently enabled screencast was shown or hidden . Experimental

Parameters
visible
boolean True if the page is visible.

Page. interstitialShown

Fired when interstitial page was shown

Page. interstitialHidden

Fired when interstitial page was hidden

Page. navigationRequested

Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.

Parameters
isInMainFrame
boolean Whether the navigation is taking place in the main frame or in a subframe.
isRedirect
boolean Whether the navigation has encountered a server redirect or not.
navigationId
integer
url
string URL of requested navigation.

Types

ResourceType

Resource type as it was perceived by the rendering engine.

Type: string

Allowed values

Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, EventSource, WebSocket, Manifest, Other.

FrameId

Unique frame identifier.

Type: string

Frame

Information about the Frame on the page.

Type: object

Properties
id
string Frame unique identifier.
parentId
string Parent frame identifier.
loaderId
Network.LoaderId Identifier of the loader associated with this frame.
name
string Frame's name as specified in the tag.
url
string Frame document's URL.
securityOrigin
string Frame document's security origin.
mimeType
string Frame document's mimeType as determined by the browser.

FrameResource

Information about the Resource on the page. Experimental

Type: object

Properties
url
string Resource URL.
type
ResourceType Type of this resource.
mimeType
string Resource mimeType as determined by the browser.
lastModified
Network.Timestamp last-modified timestamp as reported by server.
contentSize
number Resource content size.
failed
boolean True if the resource failed to load.
canceled
boolean True if the resource was canceled during loading.

FrameResourceTree

Information about the Frame hierarchy along with their cached resources. Experimental

Type: object

Properties
frame
Frame Frame information for this tree item.
childFrames
array [ FrameResourceTree ] Child frames.
resources
array [ FrameResource ] Information about frame resources.

ScriptIdentifier

Unique script identifier. Experimental

Type: string

NavigationEntry

Navigation history entry. Experimental

Type: object

Properties
id
integer Unique id of the navigation history entry.
url
string URL of the navigation history entry.
title
string Title of the navigation history entry.

ScreencastFrameMetadata

Screencast frame metadata. Experimental

Type: object

Properties
offsetTop
number Top offset in DIP. Experimental
pageScaleFactor
number Page scale factor. Experimental
deviceWidth
number Device screen width in DIP. Experimental
deviceHeight
number Device screen height in DIP. Experimental
scrollOffsetX
number Position of horizontal scroll in CSS pixels. Experimental
scrollOffsetY
number Position of vertical scroll in CSS pixels. Experimental
timestamp
number Frame swap timestamp. Experimental

DialogType

Javascript dialog type. Experimental

Type: string

Allowed values

alert, confirm, prompt, beforeunload.

AppManifestError

Error while paring app manifest. Experimental

Type: object

Properties
message
string Error message.
critical
integer If criticial, this is a non-recoverable parse error.
line
integer Error line.
column
integer Error column.

NavigationResponse

Proceed: allow the navigation; Cancel: cancel the navigation; CancelAndIgnore: cancels the navigation and makes the requester of the navigation acts like the request was never made. Experimental

Type: string

Allowed values

Proceed, Cancel, CancelAndIgnore.

LayoutViewport

Layout viewport position and dimensions. Experimental

Type: object

Properties
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

Visual viewport position, dimensions, and scale. Experimental

Type: object

Properties
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).