Module cdp::page
[−]
[src]
Actions and events related to the inspected page belong to the page domain.
Page
Commands
-
Enables page domain notifications.
-
Disables page domain notifications.
Page.addScriptToEvaluateOnLoad
Experimentalplease use addScriptToEvaluateOnNewDocument instead.
Page.removeScriptToEvaluateOnLoad
Experimentalplease use removeScriptToEvaluateOnNewDocument instead.
Page.addScriptToEvaluateOnNewDocument
ExperimentalEvaluates given script in every frame upon creation (before loading frame's scripts).
Page.removeScriptToEvaluateOnNewDocument
ExperimentalRemoves given script from the list.
Page.setAutoAttachToCreatedPages
ExperimentalControls whether browser will open a new inspector window for connected pages.
-
Reloads given page optionally ignoring the cache.
Page.setAdBlockingEnabled
ExperimentalEnable Chrome's experimental ad filter on all sites.
-
Navigates current page to the given URL.
Page.stopLoading
ExperimentalForce the page stop all navigations and pending resource fetches.
Page.getNavigationHistory
ExperimentalReturns navigation history for the current page.
Page.navigateToHistoryEntry
ExperimentalNavigates current page to the given history entry.
Page.getCookies
ExperimentalReturns all browser cookies. Depending on the backend support, will return detailed cookie information in the
cookies
field.Page.deleteCookie
ExperimentalDeletes browser cookie with given name, domain and path.
Page.getResourceTree
ExperimentalReturns present frame / resource tree structure.
Page.getResourceContent
ExperimentalReturns content of the given resource.
Page.searchInResource
ExperimentalSearches for given string in resource content.
Page.setDocumentContent
ExperimentalSets given markup as the document's HTML.
Page.setDeviceMetricsOverride
ExperimentalOverrides 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).
Page.clearDeviceMetricsOverride
ExperimentalClears the overriden device metrics.
-
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
-
Clears the overriden Geolocation Position and Error.
Page.setDeviceOrientationOverride
ExperimentalOverrides the Device Orientation.
Page.clearDeviceOrientationOverride
ExperimentalClears the overridden Device Orientation.
Page.setTouchEmulationEnabled
ExperimentalToggles mouse event-based touch event emulation.
Page.captureScreenshot
ExperimentalCapture page screenshot.
Page.printToPDF
ExperimentalPrint page as PDF.
Page.startScreencast
ExperimentalStarts sending each frame using the
screencastFrame
event.Page.stopScreencast
ExperimentalStops sending each frame in the
screencastFrame
.Page.screencastFrameAck
ExperimentalAcknowledges that a screencast frame has been received by the frontend.
-
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Page.getAppManifest
ExperimentalPage.requestAppBanner
ExperimentalPage.getLayoutMetrics
ExperimentalReturns metrics relating to the layouting of the page, such as viewport bounds/scale.
Page.createIsolatedWorld
ExperimentalCreates an isolated world for the given frame.
-
Brings page to front (activates tab).
Page.setDownloadBehavior
ExperimentalSet the behavior when downloading a file.
Events
Page.domContentEventFired
Page.loadEventFired
-
Fired for top level page lifecycle events such as navigation, load, paint, etc.
-
Fired when frame has been attached to its parent.
-
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
-
Fired when frame has been detached from its parent.
Page.frameStartedLoading
ExperimentalFired when frame has started loading.
Page.frameStoppedLoading
ExperimentalFired when frame has stopped loading.
Page.frameScheduledNavigation
ExperimentalFired when frame schedules a potential navigation.
Page.frameClearedScheduledNavigation
ExperimentalFired when frame no longer has a scheduled navigation.
Page.frameResized
Experimental-
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
-
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
Page.screencastFrame
ExperimentalCompressed image data requested by the
startScreencast
.Page.screencastVisibilityChanged
ExperimentalFired when the page with currently enabled screencast was shown or hidden .
-
Fired when interstitial page was shown
-
Fired when interstitial page was hidden
Types
-
Resource type as it was perceived by the rendering engine.
-
Unique frame identifier.
-
Information about the Frame on the page.
FrameResource
ExperimentalInformation about the Resource on the page.
FrameResourceTree
ExperimentalInformation about the Frame hierarchy along with their cached resources.
ScriptIdentifier
ExperimentalUnique script identifier.
TransitionType
ExperimentalTransition type.
NavigationEntry
ExperimentalNavigation history entry.
ScreencastFrameMetadata
ExperimentalScreencast frame metadata.
DialogType
ExperimentalJavascript dialog type.
AppManifestError
ExperimentalError while paring app manifest.
NavigationResponse
ExperimentalProceed: 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.
LayoutViewport
ExperimentalLayout viewport position and dimensions.
VisualViewport
ExperimentalVisual viewport position, dimensions, and scale.
Viewport
ExperimentalViewport for capturing screenshot.
Structs
AddScriptToEvaluateOnLoadCommand |
[ Deprecated ] [Experimental] |
AddScriptToEvaluateOnLoadResponse |
[ Deprecated ] [Experimental] |
AddScriptToEvaluateOnNewDocumentCommand |
[Experimental] Evaluates given script in every frame upon creation (before loading frame's scripts). |
AddScriptToEvaluateOnNewDocumentResponse |
[Experimental] Evaluates given script in every frame upon creation (before loading frame's scripts). |
AppManifestError |
[Experimental] Error while paring app manifest. |
BringToFrontCommand |
Brings page to front (activates tab). |
BringToFrontResponse |
Brings page to front (activates tab). |
CaptureScreenshotCommand |
[Experimental] Capture page screenshot. |
CaptureScreenshotResponse |
[Experimental] Capture page screenshot. |
ClearDeviceMetricsOverrideCommand |
[Experimental] Clears the overriden device metrics. |
ClearDeviceMetricsOverrideResponse |
[Experimental] Clears the overriden device metrics. |
ClearDeviceOrientationOverrideCommand |
[Experimental] Clears the overridden Device Orientation. |
ClearDeviceOrientationOverrideResponse |
[Experimental] Clears the overridden Device Orientation. |
ClearGeolocationOverrideCommand |
Clears the overriden Geolocation Position and Error. |
ClearGeolocationOverrideResponse |
Clears the overriden Geolocation Position and Error. |
CreateIsolatedWorldCommand |
[Experimental] Creates an isolated world for the given frame. |
CreateIsolatedWorldResponse |
[Experimental] Creates an isolated world for the given frame. |
DeleteCookieCommand |
[Experimental] Deletes browser cookie with given name, domain and path. |
DeleteCookieResponse |
[Experimental] Deletes browser cookie with given name, domain and path. |
DisableCommand |
Disables page domain notifications. |
DisableResponse |
Disables page domain notifications. |
DomContentEventFiredEvent | |
EnableCommand |
Enables page domain notifications. |
EnableResponse |
Enables page domain notifications. |
Frame |
Information about the Frame on the page. |
FrameAttachedEvent |
Fired when frame has been attached to its parent. |
FrameClearedScheduledNavigationEvent |
[Experimental] Fired when frame no longer has a scheduled navigation. |
FrameDetachedEvent |
Fired when frame has been detached from its parent. |
FrameNavigatedEvent |
Fired once navigation of the frame has completed. Frame is now associated with the new loader. |
FrameResizedEvent |
[Experimental] |
FrameResource |
[Experimental] Information about the Resource on the page. |
FrameResourceTree |
[Experimental] Information about the Frame hierarchy along with their cached resources. |
FrameScheduledNavigationEvent |
[Experimental] Fired when frame schedules a potential navigation. |
FrameStartedLoadingEvent |
[Experimental] Fired when frame has started loading. |
FrameStoppedLoadingEvent |
[Experimental] Fired when frame has stopped loading. |
GetAppManifestCommand |
[Experimental] |
GetAppManifestResponse |
[Experimental] |
GetCookiesCommand |
[Experimental] Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the |
GetCookiesResponse |
[Experimental] Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the |
GetLayoutMetricsCommand |
[Experimental] Returns metrics relating to the layouting of the page, such as viewport bounds/scale. |
GetLayoutMetricsResponse |
[Experimental] Returns metrics relating to the layouting of the page, such as viewport bounds/scale. |
GetNavigationHistoryCommand |
[Experimental] Returns navigation history for the current page. |
GetNavigationHistoryResponse |
[Experimental] Returns navigation history for the current page. |
GetResourceContentCommand |
[Experimental] Returns content of the given resource. |
GetResourceContentResponse |
[Experimental] Returns content of the given resource. |
GetResourceTreeCommand |
[Experimental] Returns present frame / resource tree structure. |
GetResourceTreeResponse |
[Experimental] Returns present frame / resource tree structure. |
HandleJavaScriptDialogCommand |
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). |
HandleJavaScriptDialogResponse |
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). |
InterstitialHiddenEvent |
Fired when interstitial page was hidden |
InterstitialShownEvent |
Fired when interstitial page was shown |
JavascriptDialogClosedEvent |
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed. |
JavascriptDialogOpeningEvent |
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open. |
LayoutViewport |
[Experimental] Layout viewport position and dimensions. |
LifecycleEventEvent |
Fired for top level page lifecycle events such as navigation, load, paint, etc. |
LoadEventFiredEvent | |
NavigateCommand |
Navigates current page to the given URL. |
NavigateResponse |
Navigates current page to the given URL. |
NavigateToHistoryEntryCommand |
[Experimental] Navigates current page to the given history entry. |
NavigateToHistoryEntryResponse |
[Experimental] Navigates current page to the given history entry. |
NavigationEntry |
[Experimental] Navigation history entry. |
PrintToPdfCommand |
[Experimental] Print page as PDF. |
PrintToPdfResponse |
[Experimental] Print page as PDF. |
ReloadCommand |
Reloads given page optionally ignoring the cache. |
ReloadResponse |
Reloads given page optionally ignoring the cache. |
RemoveScriptToEvaluateOnLoadCommand |
[ Deprecated ] [Experimental] |
RemoveScriptToEvaluateOnLoadResponse |
[ Deprecated ] [Experimental] |
RemoveScriptToEvaluateOnNewDocumentCommand |
[Experimental] Removes given script from the list. |
RemoveScriptToEvaluateOnNewDocumentResponse |
[Experimental] Removes given script from the list. |
RequestAppBannerCommand |
[Experimental] |
RequestAppBannerResponse |
[Experimental] |
ScreencastFrameAckCommand |
[Experimental] Acknowledges that a screencast frame has been received by the frontend. |
ScreencastFrameAckResponse |
[Experimental] Acknowledges that a screencast frame has been received by the frontend. |
ScreencastFrameEvent |
[Experimental] Compressed image data requested by the |
ScreencastFrameMetadata |
[Experimental] Screencast frame metadata. |
ScreencastVisibilityChangedEvent |
[Experimental] Fired when the page with currently enabled screencast was shown or hidden . |
SearchInResourceCommand |
[Experimental] Searches for given string in resource content. |
SearchInResourceResponse |
[Experimental] Searches for given string in resource content. |
SetAdBlockingEnabledCommand |
[Experimental] Enable Chrome's experimental ad filter on all sites. |
SetAdBlockingEnabledResponse |
[Experimental] Enable Chrome's experimental ad filter on all sites. |
SetAutoAttachToCreatedPagesCommand |
[Experimental] Controls whether browser will open a new inspector window for connected pages. |
SetAutoAttachToCreatedPagesResponse |
[Experimental] Controls whether browser will open a new inspector window for connected pages. |
SetDeviceMetricsOverrideCommand |
[Experimental] 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). |
SetDeviceMetricsOverrideResponse |
[Experimental] 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). |
SetDeviceOrientationOverrideCommand |
[Experimental] Overrides the Device Orientation. |
SetDeviceOrientationOverrideResponse |
[Experimental] Overrides the Device Orientation. |
SetDocumentContentCommand |
[Experimental] Sets given markup as the document's HTML. |
SetDocumentContentResponse |
[Experimental] Sets given markup as the document's HTML. |
SetDownloadBehaviorCommand |
[Experimental] Set the behavior when downloading a file. |
SetDownloadBehaviorResponse |
[Experimental] Set the behavior when downloading a file. |
SetGeolocationOverrideCommand |
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. |
SetGeolocationOverrideResponse |
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. |
SetTouchEmulationEnabledCommand |
[Experimental] Toggles mouse event-based touch event emulation. |
SetTouchEmulationEnabledResponse |
[Experimental] Toggles mouse event-based touch event emulation. |
StartScreencastCommand |
[Experimental] Starts sending each frame using the |
StartScreencastResponse |
[Experimental] Starts sending each frame using the |
StopLoadingCommand |
[Experimental] Force the page stop all navigations and pending resource fetches. |
StopLoadingResponse |
[Experimental] Force the page stop all navigations and pending resource fetches. |
StopScreencastCommand |
[Experimental] Stops sending each frame in the |
StopScreencastResponse |
[Experimental] Stops sending each frame in the |
Viewport |
[Experimental] Viewport for capturing screenshot. |
VisualViewport |
[Experimental] Visual viewport position, dimensions, and scale. |
Enums
CaptureScreenshotCommandFormat |
[Experimental] |
DialogType |
[Experimental] Javascript dialog type. |
FrameScheduledNavigationEventReason |
[Experimental] |
NavigationResponse |
[Experimental] 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. |
ResourceType |
Resource type as it was perceived by the rendering engine. |
SetDownloadBehaviorCommandBehavior |
[Experimental] |
SetTouchEmulationEnabledCommandConfiguration |
[Experimental] |
StartScreencastCommandFormat |
[Experimental] |
TransitionType |
[Experimental] Transition type. |
Type Definitions
FrameId |
Unique frame identifier. |
ScriptIdentifier |
[Experimental] Unique script identifier. |