Click or drag to resize

PageClient Class

Version 106.0.290
Actions and events related to the inspected page belong to the page domain.
Inheritance Hierarchy

Namespace:  CefSharp.DevTools.Page
Assembly:  CefSharp (in CefSharp.dll) Version: 106.0.290.0 (106.0.290.0)
Syntax
public class PageClient : DevToolsDomainBase

The PageClient type exposes the following members.

Constructors
  NameDescription
Public methodPageClient
Page
Top
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 methodGetAppIdAsync
Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
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. `scripts` are appeneded 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`.
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 methodSetSPCTransactionModeAsync
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
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
Events
  NameDescription
Public eventBackForwardCacheNotUsed
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.
Public eventCompilationCacheProduced
Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.
Public eventDocumentOpened
Fired when opening document to write to.
Public eventDomContentEventFired
DomContentEventFired
Public eventFileChooserOpened
Emitted only when `page.interceptFileChooser` is enabled.
Public eventFrameAttached
Fired when frame has been attached to its parent.
Public eventFrameDetached
Fired when frame has been detached from its parent.
Public eventFrameNavigated
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
Public eventFrameRequestedNavigation
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
Public eventFrameResized
FrameResized
Public eventFrameStartedLoading
Fired when frame has started loading.
Public eventFrameStoppedLoading
Fired when frame has stopped loading.
Public eventInterstitialHidden
Fired when interstitial page was hidden
Public eventInterstitialShown
Fired when interstitial page was shown
Public eventJavascriptDialogClosed
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
Public eventJavascriptDialogOpening
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
Public eventLifecycleEvent
Fired for top level page lifecycle events such as navigation, load, paint, etc.
Public eventLoadEventFired
LoadEventFired
Public eventNavigatedWithinDocument
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
Public eventPrerenderAttemptCompleted
Fired when a prerender attempt is completed.
Public eventScreencastFrame
Compressed image data requested by the `startScreencast`.
Public eventScreencastVisibilityChanged
Fired when the page with currently enabled screencast was shown or hidden `.
Public eventWindowOpen
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
Top
See Also