Methods

Chrome DevTools

Page.clearGeolocationOverride #

Clears the overriden Geolocation Position and Error.


Chrome DevTools

Page.disable #

Disables page domain notifications.


Chrome DevTools

Page.enable #

Enables page domain notifications.


Chrome DevTools

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
Optional
string

The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.


Chrome DevTools

Page.navigate #

Navigates current page to the given URL.

Parameters

url
string

URL to navigate the page to.

Return object

frameId
FrameId

Frame id that will be navigated.

Experimental

React NativeChrome DevTools

Page.reload #

Reloads given page optionally ignoring the cache.

It isn't clear what the ignoreCache parameter of @cdp Page.reload should mean in React Native. We parse it, but don't do anything with it yet.

TODO: Implement scriptToEvaluateOnLoad parameter of @cdp Page.reload.

Parameters

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.


Chrome DevTools

Page.setGeolocationOverride #

Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

Parameters

latitude
Optional
number

Mock latitude

longitude
Optional
number

Mock longitude

accuracy
Optional
number

Mock accuracy

Events

Chrome DevTools

Page.domContentEventFired #

Parameters

timestamp
number

Chrome DevTools

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.


Chrome DevTools

Page.frameDetached #

Fired when frame has been detached from its parent.

Parameters

frameId
FrameId

Id of the frame that has been detached.


Chrome DevTools

Page.frameNavigated #

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

Parameters

frame
Frame

Frame object.


Chrome DevTools

Page.interstitialHidden #

Fired when interstitial page was hidden


Chrome DevTools

Page.interstitialShown #

Fired when interstitial page was shown


Chrome DevTools

Page.javascriptDialogClosed #

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

Parameters

result
boolean

Whether dialog was confirmed.


Chrome DevTools

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.


Chrome DevTools

Page.loadEventFired #

Parameters

timestamp
number

Chrome DevTools

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

Chrome DevTools

Page.Frame #

Information about the Frame on the page.

Type: object

Properties

id
string

Frame unique identifier.

parentId
Optional
string

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.

securityOrigin
string

Frame document's security origin.

mimeType
string

Frame document's mimeType as determined by the browser.


Chrome DevTools

Page.FrameId #

Unique frame identifier.

Type: string


Chrome DevTools

Page.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