Skip to main content

Module page

Module page 

Source
Expand description

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

Types, command parameters and event payloads for the Page domain. The method-name constants for the same domain are in crate::methods.

Structs§

AdFrameStatus
Indicates whether a frame has been identified as an ad and why.
AddCompilationCacheParams
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
AddScriptToEvaluateOnLoadParams
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
AddScriptToEvaluateOnLoadReturns
What Page.addScriptToEvaluateOnLoad answers with.
AddScriptToEvaluateOnNewDocumentParams
Evaluates given script in every frame upon creation (before loading frame’s scripts).
AddScriptToEvaluateOnNewDocumentReturns
What Page.addScriptToEvaluateOnNewDocument answers with.
AppManifestError
Error while paring app manifest.
AppManifestParsedProperties
Parsed app manifest properties.
BackForwardCacheBlockingDetails
Experimental: may change without notice.
BackForwardCacheNotRestoredExplanation
Experimental: may change without notice.
BackForwardCacheNotRestoredExplanationTree
Experimental: may change without notice.
BackForwardCacheNotUsedEvent
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.
BringToFrontParams
Brings page to front (activates tab).
CaptureScreenshotParams
Capture page screenshot.
CaptureScreenshotReturns
What Page.captureScreenshot answers with.
CaptureSnapshotParams
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
CaptureSnapshotReturns
What Page.captureSnapshot answers with.
ClearCompilationCacheParams
Clears seeded compilation cache.
ClearDeviceMetricsOverrideParams
Clears the overridden device metrics.
ClearDeviceOrientationOverrideParams
Clears the overridden Device Orientation.
ClearGeolocationOverrideParams
Clears the overridden Geolocation Position and Error.
CloseParams
Tries to close page, running its beforeunload hooks, if any.
CompilationCacheParams
Per-script compilation cache parameters for Page.produceCompilationCache
CompilationCacheProducedEvent
Issued for every compilation cache generated.
CrashParams
Crashes renderer on the IO thread, generates minidumps.
CreateIsolatedWorldParams
Creates an isolated world for the given frame.
CreateIsolatedWorldReturns
What Page.createIsolatedWorld answers with.
DeleteCookieParams
Deletes browser cookie with given name, domain and path.
DisableParams
Disables page domain notifications.
DocumentOpenedEvent
Fired when opening document to write to.
DomContentEventFiredEvent
Payload of the Page.domContentEventFired event.
DownloadProgressEvent
Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.
DownloadWillBeginEvent
Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.
EnableParams
Enables page domain notifications.
FileChooserOpenedEvent
Emitted only when page.interceptFileChooser is enabled.
FileFilter
Experimental: may change without notice.
FileHandler
Experimental: may change without notice.
FontFamilies
Generic font families collection.
FontSizes
Default font sizes.
Frame
Information about the Frame on the page.
FrameAttachedEvent
Fired when frame has been attached to its parent.
FrameClearedScheduledNavigationEvent
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.
FrameRequestedNavigationEvent
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
FrameResizedEvent
Experimental: may change without notice.
FrameResource
Information about the Resource on the page.
FrameResourceTree
Information about the Frame hierarchy along with their cached resources.
FrameScheduledNavigationEvent
Fired when frame schedules a potential navigation.
FrameStartedLoadingEvent
Fired when frame has started loading.
FrameStartedNavigatingEvent
Fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after frameRequestedNavigation. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).
FrameStoppedLoadingEvent
Fired when frame has stopped loading.
FrameSubtreeWillBeDetachedEvent
Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
FrameTree
Information about the Frame hierarchy.
GenerateTestReportParams
Generates a report for testing.
GetAdScriptAncestryParams
Experimental: may change without notice.
GetAdScriptAncestryReturns
What Page.getAdScriptAncestry answers with.
GetAnnotatedPageContentParams
Get the annotated page content for the main frame. This is an experimental command that is subject to change.
GetAnnotatedPageContentReturns
What Page.getAnnotatedPageContent answers with.
GetAppIdParams
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
GetAppIdReturns
What Page.getAppId answers with.
GetAppManifestParams
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.
GetAppManifestReturns
What Page.getAppManifest answers with.
GetFrameTreeParams
Returns present frame tree structure.
GetFrameTreeReturns
What Page.getFrameTree answers with.
GetInstallabilityErrorsParams
Experimental: may change without notice.
GetInstallabilityErrorsReturns
What Page.getInstallabilityErrors answers with.
GetLayoutMetricsParams
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
GetLayoutMetricsReturns
What Page.getLayoutMetrics answers with.
GetManifestIconsParams
Deprecated because it’s not guaranteed that the returned icon is in fact the one used for PWA installation.
GetManifestIconsReturns
What Page.getManifestIcons answers with.
GetNavigationHistoryParams
Returns navigation history for the current page.
GetNavigationHistoryReturns
What Page.getNavigationHistory answers with.
GetOriginTrialsParams
Get Origin Trials on given frame.
GetOriginTrialsReturns
What Page.getOriginTrials answers with.
GetPermissionsPolicyStateParams
Get Permissions Policy state on given frame.
GetPermissionsPolicyStateReturns
What Page.getPermissionsPolicyState answers with.
GetResourceContentParams
Returns content of the given resource.
GetResourceContentReturns
What Page.getResourceContent answers with.
GetResourceTreeParams
Returns present frame / resource tree structure.
GetResourceTreeReturns
What Page.getResourceTree answers with.
GetSiblingSubAppsParams
Returns the list of sibling Sub-Apps sharing the same parent app if the inspected context is a Sub-App.
GetSiblingSubAppsReturns
What Page.getSiblingSubApps answers with.
GetSpellCheckCustomDictionaryParams
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.
GetSpellCheckCustomDictionaryReturns
What Page.getSpellCheckCustomDictionary answers with.
GetSubAppsParams
Returns the list of installed child Sub-Apps for the inspected parent app.
GetSubAppsReturns
What Page.getSubApps answers with.
HandleJavaScriptDialogParams
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
ImageResource
The image definition used in both icon and screenshot.
InstallabilityError
The installability error
InstallabilityErrorArgument
Experimental: may change without notice.
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.
LaunchHandler
Experimental: may change without notice.
LayoutViewport
Layout viewport position and dimensions.
LifecycleEventEvent
Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
LoadEventFiredEvent
Payload of the Page.loadEventFired event.
NavigateParams
Navigates current page to the given URL.
NavigateReturns
What Page.navigate answers with.
NavigateToHistoryEntryParams
Navigates current page to the given history entry.
NavigatedWithinDocumentEvent
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
NavigationEntry
Navigation history entry.
OriginTrial
Experimental: may change without notice.
OriginTrialToken
Experimental: may change without notice.
OriginTrialTokenWithStatus
Experimental: may change without notice.
PermissionsPolicyBlockLocator
Experimental: may change without notice.
PermissionsPolicyFeatureState
Experimental: may change without notice.
PrintToPdfParams
Print page as PDF.
PrintToPdfReturns
What Page.printToPDF answers with.
ProduceCompilationCacheParams
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.
ProtocolHandler
Experimental: may change without notice.
RelatedApplication
Experimental: may change without notice.
ReloadParams
Reloads given page optionally ignoring the cache.
RemoveScriptToEvaluateOnLoadParams
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
RemoveScriptToEvaluateOnNewDocumentParams
Removes given script from the list.
ResetNavigationHistoryParams
Resets navigation history for the current page.
ScopeExtension
Experimental: may change without notice.
ScreencastFrameAckParams
Acknowledges that a screencast frame has been received by the frontend.
ScreencastFrameEvent
Compressed image data requested by the startScreencast.
ScreencastFrameMetadata
Screencast frame metadata.
ScreencastVisibilityChangedEvent
Fired when the page with currently enabled screencast was shown or hidden `.
Screenshot
Experimental: may change without notice.
ScriptFontFamilies
Font families collection for a script.
SearchInResourceParams
Searches for given string in resource content.
SearchInResourceReturns
What Page.searchInResource answers with.
SecurityOriginDetails
Additional information about the frame document’s security origin.
SetAdBlockingEnabledParams
Enable Chrome’s experimental ad filter on all sites.
SetBypassCspParams
Enable page Content Security Policy by-passing.
SetDeviceMetricsOverrideParams
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).
SetDeviceOrientationOverrideParams
Overrides the Device Orientation.
SetDocumentContentParams
Sets given markup as the document’s HTML.
SetDownloadBehaviorParams
Set the behavior when downloading a file.
SetFontFamiliesParams
Set generic font families.
SetFontSizesParams
Set default font sizes.
SetGeolocationOverrideParams
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
SetInputVisualizationParams
Configures input visualization on the page.
SetInterceptFileChooserDialogParams
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.
SetLifecycleEventsEnabledParams
Controls whether page will emit lifecycle events.
SetPrerenderingAllowedParams
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.
SetRphRegistrationModeParams
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
SetSpcTransactionModeParams
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
SetTouchEmulationEnabledParams
Toggles mouse event-based touch event emulation.
SetWebLifecycleStateParams
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/
ShareTarget
Experimental: may change without notice.
Shortcut
Experimental: may change without notice.
StartScreenRecordingParams
Starts screencast video recording.
StartScreenRecordingReturns
What Page.startScreenRecording answers with.
StartScreencastParams
Starts sending each frame using the screencastFrame event.
StopLoadingParams
Force the page stop all navigations and pending resource fetches.
StopScreenRecordingParams
Stops screencast video recording.
StopScreenRecordingReturns
What Page.stopScreenRecording answers with.
StopScreencastParams
Stops sending each frame in the screencastFrame.
SubApp
Viewport
Viewport for capturing screenshot.
VisualViewport
Visual viewport position, dimensions, and scale.
WaitForDebuggerParams
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
WebAppManifest
Experimental: may change without notice.
WindowOpenEvent
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.

Enums§

AdFrameExplanation
Experimental: may change without notice.
AdFrameType
Indicates whether a frame has been identified as an ad.
BackForwardCacheNotRestoredReason
List of not restored reasons for back-forward cache.
BackForwardCacheNotRestoredReasonType
Types of not restored reasons for back-forward cache.
CaptureScreenshotFormat
The values format accepts on captureScreenshot.
CaptureSnapshotFormat
The values format accepts on captureSnapshot.
ClientNavigationDisposition
Experimental: may change without notice.
ClientNavigationReason
Experimental: may change without notice.
CrossOriginIsolatedContextType
Indicates whether the frame is cross-origin isolated and why it is the case.
DialogType
Javascript dialog type.
DownloadProgressState
The values state accepts on downloadProgress.
FileChooserOpenedMode
The values mode accepts on fileChooserOpened.
FrameDetachedReason
The values reason accepts on frameDetached.
FrameStartedNavigatingNavigationType
The values navigationType accepts on frameStartedNavigating.
GatedApiFeatures
Experimental: may change without notice.
NavigatedWithinDocumentNavigationType
The values navigationType accepts on navigatedWithinDocument.
NavigationType
The type of a frameNavigated event.
OriginTrialStatus
Status for an Origin Trial.
OriginTrialTokenStatus
Origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.
OriginTrialUsageRestriction
Experimental: may change without notice.
PermissionsPolicyBlockReason
Reason for a permissions policy feature to be disabled.
PermissionsPolicyFeature
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)
PrintToPdfTransferMode
The values transferMode accepts on printToPDF.
ReferrerPolicy
The referring-policy used for the navigation.
SecureContextType
Indicates whether the frame is a secure context and why it is the case.
SetDownloadBehaviorBehavior
The values behavior accepts on setDownloadBehavior.
SetRphRegistrationModeMode
The values mode accepts on setRPHRegistrationMode.
SetSpcTransactionModeMode
The values mode accepts on setSPCTransactionMode.
SetTouchEmulationEnabledConfiguration
The values configuration accepts on setTouchEmulationEnabled.
SetWebLifecycleStateState
The values state accepts on setWebLifecycleState.
StartScreenRecordingCaptureArea
The values captureArea accepts on startScreenRecording.
StartScreencastFormat
The values format accepts on startScreencast.
TransitionType
Transition type.

Type Aliases§

FrameId
Unique frame identifier.
ScriptIdentifier
Unique script identifier.