Click or drag to resize

PageClient Methods

Version 94.4.20

The PageClient type exposes the following members.

Methods
  NameDescription
Public methodAddCompilationCacheAsync
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
Public methodAddScriptToEvaluateOnNewDocumentAsync
Evaluates given script in every frame upon creation (before loading frame's scripts).
Public methodBringToFrontAsync
Brings page to front (activates tab).
Public methodCaptureScreenshotAsync
Capture page screenshot.
Public methodCaptureSnapshotAsync
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
Public methodClearCompilationCacheAsync
Clears seeded compilation cache.
Public methodCloseAsync
Tries to close page, running its beforeunload hooks, if any.
Public methodCrashAsync
Crashes renderer on the IO thread, generates minidumps.
Public methodCreateIsolatedWorldAsync
Creates an isolated world for the given frame.
Public methodDisableAsync
Disables page domain notifications.
Public methodEnableAsync
Enables page domain notifications.
Protected methodEnumToString(Enum) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(ContentEncoding) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(CSPViolationType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(DisabledImageType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(PermissionType) (Inherited from DevToolsDomainBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGenerateTestReportAsync
Generates a report for testing.
Public methodGetAppManifestAsync
GetAppManifest
Public methodGetFrameTreeAsync
Returns present frame tree structure.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetInstallabilityErrorsAsync
GetInstallabilityErrors
Public methodGetLayoutMetricsAsync
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
Public methodGetManifestIconsAsync
GetManifestIcons
Public methodGetNavigationHistoryAsync
Returns navigation history for the current page.
Public methodGetOriginTrialsAsync
Get Origin Trials on given frame.
Public methodGetPermissionsPolicyStateAsync
Get Permissions Policy state on given frame.
Public methodGetResourceContentAsync
Returns content of the given resource.
Public methodGetResourceTreeAsync
Returns present frame / resource tree structure.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHandleJavaScriptDialogAsync
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNavigateAsync
Navigates current page to the given URL.
Public methodNavigateToHistoryEntryAsync
Navigates current page to the given history entry.
Public methodPrintToPDFAsync
Print page as PDF.
Public methodProduceCompilationCacheAsync
Requests backend to produce compilation cache for the specified scripts. Unlike setProduceCompilationCache, this allows client to only produce cache for specific scripts. `scripts` are appeneded to the list of scripts for which the cache for would produced. Disabling compilation cache with `setProduceCompilationCache` would reset all pending cache requests. The list may also 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`.
Public methodReloadAsync
Reloads given page optionally ignoring the cache.
Public methodRemoveScriptToEvaluateOnNewDocumentAsync
Removes given script from the list.
Public methodResetNavigationHistoryAsync
Resets navigation history for the current page.
Public methodScreencastFrameAckAsync
Acknowledges that a screencast frame has been received by the frontend.
Public methodSearchInResourceAsync
Searches for given string in resource content.
Public methodSetAdBlockingEnabledAsync
Enable Chrome's experimental ad filter on all sites.
Public methodSetBypassCSPAsync
Enable page Content Security Policy by-passing.
Public methodSetDocumentContentAsync
Sets given markup as the document's HTML.
Public methodSetFontFamiliesAsync
Set generic font families.
Public methodSetFontSizesAsync
Set default font sizes.
Public methodSetInterceptFileChooserDialogAsync
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.
Public methodSetLifecycleEventsEnabledAsync
Controls whether page will emit lifecycle events.
Public methodSetProduceCompilationCacheAsync
Forces compilation cache to be generated for every subresource script. See also: `Page.produceCompilationCache`.
Public methodSetWebLifecycleStateAsync
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/
Public methodStartScreencastAsync
Starts sending each frame using the `screencastFrame` event.
Public methodStopLoadingAsync
Force the page stop all navigations and pending resource fetches.
Public methodStopScreencastAsync
Stops sending each frame in the `screencastFrame`.
Protected methodToBase64String (Inherited from DevToolsDomainBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWaitForDebuggerAsync
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
Top
See Also