Page Domain
Actions and events related to the inspected page belong to the page domain.
Methods
- Page.clearGeolocationOverride
- Page.disable
- Page.enable
- Page.handleJavaScriptDialog
- Page.navigate
- Page.reload
- Page.setGeolocationOverride
Events
- Page.domContentEventFired
- Page.frameAttached
- Page.frameDetached
- Page.frameNavigated
- Page.interstitialHidden
- Page.interstitialShown
- Page.javascriptDialogClosed
- Page.javascriptDialogOpening
- Page.loadEventFired
- Page.navigationRequested
Types
Methods
Page.handleJavaScriptDialog #
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Parameters
accept booleanWhether to accept or dismiss the dialog.
promptTextOptional
stringThe text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
Page.navigate #
Navigates current page to the given URL.
Parameters
url stringURL to navigate the page to.
Return object
frameId 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
ignoreCacheOptional
booleanIf true, browser cache is ignored (as if the user pressed Shift+refresh).
scriptToEvaluateOnLoadOptional
stringIf set, the script will be injected into all frames of the inspected page after reload.
Page.setGeolocationOverride #
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
Parameters
latitudeOptional
numberMock latitude
longitudeOptional
numberMock longitude
accuracyOptional
numberMock accuracy
Events
Page.frameAttached #
Fired when frame has been attached to its parent.
Parameters
frameId Id of the frame that has been attached.
parentFrameId Parent frame identifier.
Page.frameDetached #
Fired when frame has been detached from its parent.
Parameters
frameId Id of the frame that has been detached.
Page.frameNavigated #
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
Parameters
frame Frame object.
Page.javascriptDialogClosed #
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
Parameters
result booleanWhether dialog was confirmed.
Page.javascriptDialogOpening #
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
Parameters
message stringMessage that will be displayed by the dialog.
type Dialog type.
Page.navigationRequested #
Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.
Parameters
isInMainFrame booleanWhether the navigation is taking place in the main frame or in a subframe.
isRedirect booleanWhether the navigation has encountered a server redirect or not.
navigationId integerurl stringURL of requested navigation.
Types
Page.Frame #
Information about the Frame on the page.
Type: object
Properties
id stringFrame unique identifier.
parentIdOptional
stringParent frame identifier.
loaderId Identifier of the loader associated with this frame.
nameOptional
stringFrame's name as specified in the tag.
url stringFrame document's URL.
securityOrigin stringFrame document's security origin.
mimeType stringFrame document's mimeType as determined by the browser.
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