Microsoft.Web.WebView2.Core Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Classes
| Name | Description |
|---|---|
| CoreWebView2 |
WebView2 enables you to host web content using the latest Microsoft Edge browser and web technology. |
| CoreWebView2AcceleratorKeyPressedEventArgs |
Event args for the AcceleratorKeyPressed event. |
| CoreWebView2BasicAuthenticationRequestedEventArgs |
Event args for the BasicAuthenticationRequested event. Will contain the request that led to the HTTP authorization challenge, the challenge and allows the host to provide authentication response or cancel the request. |
| CoreWebView2BasicAuthenticationResponse |
Represents a Basic HTTP authentication response that contains a user name and a password as according to RFC7617 (https://tools.ietf.org/html/rfc7617). |
| CoreWebView2BrowserExtension |
Browser extension installed on current profile. |
| CoreWebView2BrowserProcessExitedEventArgs |
Event args for the BrowserProcessExited event. |
| CoreWebView2Certificate |
Represents a certificate and provides access to its metadata. |
| CoreWebView2ClientCertificate |
Represents a client certificate that provides access to the client certificate metadata. |
| CoreWebView2ClientCertificateRequestedEventArgs |
Event args for the ClientCertificateRequested event. |
| CoreWebView2ClusterEnvironmentCreateResult |
The result of establishing or attaching to a shared cluster environment. |
| CoreWebView2ClusterEnvironmentOptions |
The options used to establish or attach to a shared WebView2 cluster environment, identified by a well-known ClusterName that cooperating hosts agree on. Only options that can be shared process-wide are present. The first host to establish a cluster for a given ClusterName pins these options for as long as the cluster's browser process stays alive; once that browser exits the next host may pin a different set. |
| CoreWebView2CompositionController |
This class is an extension of the CoreWebView2Controller class to support visual hosting. |
| CoreWebView2ContentLoadingEventArgs |
Event args for the ContentLoading event. |
| CoreWebView2ContextMenuItem |
Represents a context menu item of a context menu displayed by WebView. |
| CoreWebView2ContextMenuRequestedEventArgs |
Event args for the ContextMenuRequested event. |
| CoreWebView2ContextMenuTarget |
Represents the information regarding the context menu target. Includes the context selected and the appropriate data used for the actions of a context menu. |
| CoreWebView2Controller |
The owner of the CoreWebView2 object that provides support for resizing, showing and hiding, focusing, and other functionality related to windowing and composition. |
| CoreWebView2ControllerOptions |
Used to manage profile options that are created by CreateCoreWebView2ControllerOptions(). |
| CoreWebView2Cookie |
Provides a set of properties that are used to manage a CoreWebView2Cookie. |
| CoreWebView2CookieList |
A list of CoreWebView2Cookies. |
| CoreWebView2CookieManager |
Creates, adds or updates, gets, or views the cookies. |
| CoreWebView2CrashReport |
Provides crash signature data captured at the moment of process failure.
|
| CoreWebView2CustomSchemeRegistration |
Represents the registration of a custom scheme with the CoreWebView2Environment. |
| CoreWebView2DedicatedWorker |
Represents a dedicated worker in WebView2 and provides methods and properties for interacting with it, such as getting the script URI, posting messages, managing events related to the creation of child workers, termination, etc. |
| CoreWebView2DedicatedWorkerCreatedEventArgs |
Event args for DedicatedWorkerCreated, DedicatedWorkerCreated, and DedicatedWorkerCreated events. |
| CoreWebView2Deferral |
This is used to complete deferrals on event args that support getting deferrals using the |
| CoreWebView2DevToolsProtocolEventReceivedEventArgs |
Event args for the DevToolsProtocolEventReceived event. |
| CoreWebView2DevToolsProtocolEventReceiver |
A Receiver is created for a particular DevTools Protocol event and allows you to subscribe and unsubscribe from that event. |
| CoreWebView2DiagnosticMonitor |
A diagnostic monitor that receives diagnostic signals from all layers - WebView, Profile, and Environment. Created via CreateDiagnosticMonitor(). Each monitor has its own filters and event handlers, allowing multiple independent consumers, for example one for telemetry and one for a debug panel. The monitor is active from creation until it is released. Releasing the monitor automatically stops all events and clears all filters. Implements IClosable for deterministic cleanup. |
| CoreWebView2DiagnosticReceivedEventArgs |
Event args for the DiagnosticReceived event. Each instance represents a single diagnostic signal. |
| CoreWebView2DOMContentLoadedEventArgs |
Event args for the DOMContentLoaded event. |
| CoreWebView2DownloadOperation |
Represents a download operation. Gives access to a download's metadata and supports a user canceling, pausing, or resuming a download. |
| CoreWebView2DownloadStartingEventArgs |
Event args for the DownloadStarting event. |
| CoreWebView2Environment |
This represents the WebView2 Environment. WebViews created from an environment run on the Browser process specified with environment parameters and objects created from an environment should be used in the same environment. Using it in different environments are not guaranteed to be compatible and may fail. |
| CoreWebView2EnvironmentOptions |
Options used to create WebView2 Environment. Default values will use your defaulted Edge WebView2 Runtime binaries and user data folder. |
| CoreWebView2ExecuteScriptResult |
The result for ExecuteScriptWithResultAsync(String). |
| CoreWebView2File |
Representation of a DOM File object passed via WebMessage. |
| CoreWebView2FileSystemHandle |
Representation of a DOM FileSystemHandle object. |
| CoreWebView2Find |
Provides methods and properties for finding and navigating through text in the web view. This class allows for finding text, navigation between matches, and customization of the find UI. |
| CoreWebView2FindOptions |
Defines the options for a find session in the WebView2 control. This class provides the necessary properties to configure a find session. |
| CoreWebView2Frame |
CoreWebView2Frame provides direct access to the iframes information and handling. You can get a CoreWebView2Frame by handling the FrameCreated event. |
| CoreWebView2FrameCreatedEventArgs |
Event args for the FrameCreated and FrameCreated events. |
| CoreWebView2FrameInfo |
Provides a set of properties for a frame in the CoreWebView2. |
| CoreWebView2HostObjectAsyncMethodContinuation | |
| CoreWebView2HttpHeadersCollectionIterator |
Iterator for a collection of HTTP headers. |
| CoreWebView2HttpRequestHeaders |
HTTP request headers. |
| CoreWebView2HttpResponseHeaders |
HTTP response headers. |
| CoreWebView2InitializationCompletedEventArgs |
Event args for the CoreWebView2InitializationCompleted event. |
| CoreWebView2LaunchingExternalUriSchemeEventArgs |
Event args for the LaunchingExternalUriScheme event. |
| CoreWebView2MoveFocusRequestedEventArgs |
Event args for the MoveFocusRequested event. |
| CoreWebView2NavigationCompletedEventArgs |
Event args for the NavigationCompleted event. |
| CoreWebView2NavigationStartingEventArgs |
Event args for the NavigationStarting event. |
| CoreWebView2NewWindowRequestedEventArgs |
Event args for the NewWindowRequested event. |
| CoreWebView2NonClientRegionChangedEventArgs |
Event args for the NonClientRegionChanged event. |
| CoreWebView2Notification |
An object that represents an HTML Notification object. |
| CoreWebView2NotificationReceivedEventArgs |
Event args for the NotificationReceived event. |
| CoreWebView2OriginFeatureSetting |
Represents a feature setting configuration for an origin. |
| CoreWebView2PermissionRequestedEventArgs |
Event args for the PermissionRequested event. |
| CoreWebView2PermissionSetting |
Provides a set of properties for a permission setting. |
| CoreWebView2PointerInfo |
This mostly represents a combined win32 |
| CoreWebView2PrintSettings |
Settings used by the PrintAsync(CoreWebView2PrintSettings), PrintToPdfAsync(String, CoreWebView2PrintSettings), and PrintToPdfStreamAsync(CoreWebView2PrintSettings) methods. |
| CoreWebView2ProcessExtendedInfo |
Provides a set of properties for a process list with extended information in the CoreWebView2Environment. |
| CoreWebView2ProcessFailedEventArgs |
Event args for the ProcessFailed event. |
| CoreWebView2ProcessInfo |
Provides a set of properties for a process list in the CoreWebView2Environment. |
| CoreWebView2Profile | |
| CoreWebView2RestartRequestedEventArgs |
Event args for the RestartRequested event. |
| CoreWebView2SaveAsUIShowingEventArgs |
Event args for the SaveAsUIShowing event. |
| CoreWebView2SaveFileSecurityCheckStartingEventArgs |
Event args for the SaveFileSecurityCheckStarting event. |
| CoreWebView2ScreenCaptureStartingEventArgs |
Event args for the ScreenCaptureStarting and ScreenCaptureStarting events. |
| CoreWebView2ScriptDialogOpeningEventArgs |
Event args for the ScriptDialogOpening event. |
| CoreWebView2ScriptException |
This represents a JavaScript exception. |
| CoreWebView2ServerCertificateErrorDetectedEventArgs |
Event args for the ServerCertificateErrorDetected event. |
| CoreWebView2ServiceWorker |
Represents a service worker in WebView2 and provides methods and properties for interacting with it, such as getting the script URI, posting messages to it, etc. |
| CoreWebView2ServiceWorkerActivatedEventArgs |
Event args for the ServiceWorkerActivated event. |
| CoreWebView2ServiceWorkerManager |
Manages registrations for service workers in WebView2. |
| CoreWebView2ServiceWorkerRegisteredEventArgs |
Event args for the ServiceWorkerRegistered event. |
| CoreWebView2ServiceWorkerRegistration |
Represents a service worker registration in WebView2 and provides methods and properties for interacting with it, such as getting the scope URI, active service worker, listening for service worker activation, unregistering events, etc. |
| CoreWebView2Settings |
Defines properties that enable, disable, or modify WebView features. |
| CoreWebView2SharedBuffer |
A shared memory based buffer object that is created by CreateSharedBuffer(UInt64). The object is presented to script as ArrayBuffer when posted to script with PostSharedBufferToScript(CoreWebView2SharedBuffer, CoreWebView2SharedBufferAccess, String). |
| CoreWebView2SharedWorker |
Represents a shared worker in WebView2 and provides methods and properties for interacting with it, such as listening to destroying events, getting the script URI, origin, and top-level origin of the worker, etc. |
| CoreWebView2SharedWorkerCreatedEventArgs |
Event args for the SharedWorkerCreated event. |
| CoreWebView2SharedWorkerManager |
Manages the shared workers associated with a CoreWebView2Profile. |
| CoreWebView2SourceChangedEventArgs |
Event args for the SourceChanged event. |
| CoreWebView2SpellCheckSuggestion |
Represents a spelling correction for the current context menu target. The object remains readable while retained. Its CommandId is valid only for the originating context menu request and must be assigned before that request's deferral is completed. |
| CoreWebView2Texture |
The texture that the host writes to so that the Renderer will render on it. |
| CoreWebView2TextureStream |
CoreWebView2 Texture Stream. |
| CoreWebView2TextureStreamErrorReceivedEventArgs |
Texture stream error event argument. |
| CoreWebView2TextureStreamWebTextureReceivedEventArgs |
The event args for the |
| CoreWebView2UpdateRuntimeResult |
The UpdateRuntime operation result. |
| CoreWebView2WebMessageReceivedEventArgs |
Event args for the WebMessageReceived event. |
| CoreWebView2WebResourceRequest |
An HTTP request used with the WebResourceRequested event. |
| CoreWebView2WebResourceRequestedEventArgs |
Event args for the WebResourceRequested event. |
| CoreWebView2WebResourceResponse |
An HTTP response used with the WebResourceRequested event. |
| CoreWebView2WebResourceResponseReceivedEventArgs |
Event args for the WebResourceResponseReceived event. |
| CoreWebView2WebResourceResponseView |
View of the HTTP representation for a web resource response. |
| CoreWebView2WebTexture |
Web Texture that receives from the Javascript. |
| CoreWebView2WindowControlsOverlay |
Provides methods and properties which allow you to enable and configure the WebView2 Window Controls Overlay. The Overlay is a region on the top right/left of the webview window which contains the caption buttons (minimize, maximize, restore, close). Enabling the Overlay allows for custom app title bars to be rendered completely inside the webview window. This API is designed to be used in addition to the other non-client
region APIs and features. These include |
| CoreWebView2WindowFeatures |
The window features for a WebView popup window. |
| EdgeNotFoundException |
The exception that is thrown when an Edge installation is missing. |
| WebView2RuntimeNotFoundException |
The exception that is thrown when a WebView2 Runtime installation is missing. |
Structs
| Name | Description |
|---|---|
| CoreWebView2Color |
A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2. Each component takes a value from 0 to 255, with 0 being no intensity and 255 being the highest intensity. |
| CoreWebView2Matrix4x4 |
Matrix that represents a 3D transform. This transform is used to calculate correct coordinates when calling CreateCoreWebView2PointerInfoFromPointerId. This is equivalent to a D2D1_MATRIX_4X4_F |
| CoreWebView2PhysicalKeyStatus |
Contains the information packed into the LPARAM sent to a Win32 key event. |
Enums
| Name | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CoreWebView2AllowedPortRangeScope |
Specifies the scope for port configuration. |
||||||||||||
| CoreWebView2BoundsMode |
Mode for how the Bounds property is interpreted in relation to the RasterizationScale property. |
||||||||||||
| CoreWebView2BrowserProcessExitKind |
Specifies the browser process exit type used in the CoreWebView2BrowserProcessExitedEventArgs. |
||||||||||||
| CoreWebView2BrowsingDataKinds |
Specifies the datatype for the ClearBrowsingDataAsync(CoreWebView2BrowsingDataKinds) and ClearBrowsingDataAsync(CoreWebView2BrowsingDataKinds, DateTime, DateTime) methods. |
||||||||||||
| CoreWebView2CapturePreviewImageFormat |
Specifies the image format for the CapturePreviewAsync(CoreWebView2CapturePreviewImageFormat, Stream) method. |
||||||||||||
| CoreWebView2CertificateKind |
The kind of the CoreWebView2Certificate. |
||||||||||||
| CoreWebView2ChannelSearchKind |
The channel search kind determines the order that release channels are searched for during environment creation. The default behavior is to search for and use the most stable channel found on the device. The order from most to least stable is: WebView2 Runtime -> Beta -> Dev -> Canary. Switch the order to prefer the least stable channel in order to perform pre-release testing. See CoreWebView2ReleaseChannels for descriptions of channels. |
||||||||||||
| CoreWebView2ClientCertificateKind |
The kind of the CoreWebView2ClientCertificate. |
||||||||||||
| CoreWebView2ClusterEnvironmentStatus |
The outcome of establishing or attaching to a shared cluster environment. |
||||||||||||
| CoreWebView2ContextMenuItemKind |
Specifies the menu item kind for the Kind property. |
||||||||||||
| CoreWebView2ContextMenuTargetKind |
Indicates the kind of context for which the context menu was created for the Kind property. This enum will always represent the active element that caused the context menu request. If there is a selection with multiple images, audio and text, for example, the element that the end user right clicks on within this selection will be the option represented by this enum. |
||||||||||||
| CoreWebView2CookieSameSiteKind |
Kind of cookie SameSite status used in the CoreWebView2Cookie. These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#. Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07 |
||||||||||||
| CoreWebView2DefaultDownloadDialogCornerAlignment |
The default download dialog can be aligned to any of the WebView corners by setting the DefaultDownloadDialogCornerAlignment property. The default position is top-right corner. |
||||||||||||
| CoreWebView2DiagnosticCategory |
Specifies the category of diagnostic event. Each value defines its own JSON schemas for the filter accepted by SetDiagnosticFilter(CoreWebView2DiagnosticCategory, String) and for the details returned by DetailsAsJson. |
||||||||||||
| CoreWebView2DiagnosticScope |
Specifies the scope that originated a diagnostic event. |
||||||||||||
| CoreWebView2DownloadInterruptReason |
The reason why the CoreWebView2DownloadOperation was interrupted. |
||||||||||||
| CoreWebView2DownloadState |
The state of the CoreWebView2DownloadOperation. |
||||||||||||
| CoreWebView2EnhancedSecurityModeLevel |
Enhanced Security Mode levels.
Replaced by |
||||||||||||
| CoreWebView2EnhancedSecurityModeState |
Enhanced Security Mode state. |
||||||||||||
| CoreWebView2FaviconImageFormat |
Specifies the image format to use for favicon. Look at GetFaviconAsync(CoreWebView2FaviconImageFormat) for more details. |
||||||||||||
| CoreWebView2FileSystemHandleKind |
Kind of CoreWebView2FileSystemHandle as described in FileSystemHandle.kind. |
||||||||||||
| CoreWebView2FileSystemHandlePermission |
Allowed permissions of a CoreWebView2FileSystemHandle as described in FileSystemHandle.requestPermission(). |
||||||||||||
| CoreWebView2FrameKind |
Indicates the frame type used in the CoreWebView2FrameInfo. |
||||||||||||
| CoreWebView2HostResourceAccessKind |
Kind of cross origin resource access allowed for host resources during download. Note that other normal access checks like same origin DOM access check and Content Security Policy still apply. The following table illustrates the host resource cross origin access according to
access context and
|
||||||||||||
| CoreWebView2KeyEventKind |
Specifies the key event kind that raises an AcceleratorKeyPressed event. |
||||||||||||
| CoreWebView2MemoryUsageTargetLevel |
Specifies memory usage target level of WebView. |
||||||||||||
| CoreWebView2MouseEventKind |
Mouse event kind used by SendMouseInput(CoreWebView2MouseEventKind, CoreWebView2MouseEventVirtualKeys, UInt32, Point) to convey the kind of mouse event being sent to WebView. The values of this enum align with the matching WM_* window messages. |
||||||||||||
| CoreWebView2MouseEventVirtualKeys |
Mouse event virtual keys associated with a CoreWebView2MouseEventKind for SendMouseInput(CoreWebView2MouseEventKind, CoreWebView2MouseEventVirtualKeys, UInt32, Point). These values can be combined into a bit flag if more than one virtual key is pressed for the event. The values of this enum align with the matching MK_* mouse keys. |
||||||||||||
| CoreWebView2MoveFocusReason |
Specifies the reason for moving focus. |
||||||||||||
| CoreWebView2NavigationKind |
Specifies the navigation kind of each navigation. |
||||||||||||
| CoreWebView2NonClientRegionKind |
This enum contains values representing possible regions a given point lies within. The values of this enum align with the matching WM_NCHITTEST* window message return values. |
||||||||||||
| CoreWebView2OriginFeature |
Specifies the feature types that can be configured for origins. |
||||||||||||
| CoreWebView2OriginFeatureState |
Specifies the state of an origin feature. |
||||||||||||
| CoreWebView2PdfToolbarItems |
Specifies the PDF toolbar item types used for the HiddenPdfToolbarItems property. |
||||||||||||
| CoreWebView2PermissionKind |
Indicates the type of a permission request. |
||||||||||||
| CoreWebView2PermissionState |
Specifies the response to a permission request. |
||||||||||||
| CoreWebView2PointerEventKind |
Pointer event kind used by SendPointerInput(CoreWebView2PointerEventKind, CoreWebView2PointerInfo) to convey the kind of pointer event being sent to WebView. The values of this enum align with the matching WM_POINTER* window messages. |
||||||||||||
| CoreWebView2PreferredColorScheme |
An enum to represent the options for WebView2 color scheme: auto, light, or dark. |
||||||||||||
| CoreWebView2PrintCollation |
Specifies the collation for a print. |
||||||||||||
| CoreWebView2PrintColorMode |
Specifies the color mode for a print. |
||||||||||||
| CoreWebView2PrintDialogKind |
Specifies the print dialog kind. |
||||||||||||
| CoreWebView2PrintDuplex |
Specifies the duplex option for a print. |
||||||||||||
| CoreWebView2PrintMediaSize |
Specifies the media size for a print. |
||||||||||||
| CoreWebView2PrintOrientation |
The orientation for printing, used by the Orientation property. |
||||||||||||
| CoreWebView2PrintStatus |
Indicates the status for printing. |
||||||||||||
| CoreWebView2ProcessFailedKind |
Specifies the process failure type used in the CoreWebView2ProcessFailedEventArgs. The values in this enum make reference to the process kinds in the Chromium architecture. For more information about what these processes are and what they do, see Browser Architecture - Inside look at modern web browser. |
||||||||||||
| CoreWebView2ProcessFailedReason |
Specifies the process failure reason used in the CoreWebView2ProcessFailedEventArgs. For process failures where a process has exited, it indicates the type of issue that produced the process exit. |
||||||||||||
| CoreWebView2ProcessKind |
Specifies the process kind used in CoreWebView2ProcessInfo. The values in this enum make reference to the process kinds in the Chromium architecture. For more information about what these processes are and what they do, see Browser Architecture - Inside look at modern web browser. |
||||||||||||
| CoreWebView2ReleaseChannels |
Specifies the WebView2 release channel. |
||||||||||||
| CoreWebView2RestartRequestedPriority |
Specifies the restart requested priority level. |
||||||||||||
| CoreWebView2SaveAsKind |
Specifies Kind selection options. For HTML documents, we support 3 Save As kinds: HtmlOnly, SingleFile and Complete. For non-HTML documents, you must use Default. MIME types of |
||||||||||||
| CoreWebView2SaveAsUIResult |
Status of a programmatic Save As call. Indicates the result of the ShowSaveAsUIAsync() method. |
||||||||||||
| CoreWebView2ScriptDialogKind |
Specifies the JavaScript dialog type used in the CoreWebView2ScriptDialogOpeningEventArgs. |
||||||||||||
| CoreWebView2ScrollbarStyle |
Set ScrollBar style on CoreWebView2EnvironmentOptions during environment creation. |
||||||||||||
| CoreWebView2ServerCertificateErrorAction |
Specifies the action type when server certificate error is detected to be used in the CoreWebView2ServerCertificateErrorDetectedEventArgs. |
||||||||||||
| CoreWebView2SharedBufferAccess |
Specifies the desired access from script to CoreWebView2SharedBuffer. |
||||||||||||
| CoreWebView2TextDirectionKind |
Indicates the text direction of the notification. |
||||||||||||
| CoreWebView2TextureStreamErrorKind |
Kinds of errors that can be reported by the |
||||||||||||
| CoreWebView2TrackingPreventionLevel |
Tracking prevention levels. |
||||||||||||
| CoreWebView2TransportProtocolKind |
Specifies the transport protocol for port configuration. |
||||||||||||
| CoreWebView2UpdateRuntimeStatus |
Status of UpdateRuntime operation result. |
||||||||||||
| CoreWebView2WebErrorStatus |
Indicates the error status values for web navigations. |
||||||||||||
| CoreWebView2WebResourceContext |
Specifies the web resource request contexts. |
||||||||||||
| CoreWebView2WebResourceRequestSourceKinds |
Specifies the source of WebResourceRequested. |