ICoreWebView2Environment2

Undocumented in source.
version(Windows && inline_webview2_bindings && all)
interface ICoreWebView2Environment2 : ICoreWebView2Environment {
static const
GUID iid;
}

Members

Functions

CreateWebResourceRequest
HRESULT CreateWebResourceRequest(LPCWSTR uri, LPCWSTR method, IStream* postData, LPCWSTR headers, ICoreWebView2WebResourceRequest* request)

Create a new web resource request object. URI parameter must be absolute URI. The headers string is the raw request header string delimited by CRLF (optional in last header). It's also possible to create this object with null headers string and then use the ICoreWebView2HttpRequestHeaders to construct the headers line by line. For information on other parameters see ICoreWebView2WebResourceRequest.

Inherited Members

From ICoreWebView2Environment

CreateCoreWebView2Controller
HRESULT CreateCoreWebView2Controller(HWND parentWindow, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler)

Asynchronously create a new WebView.

CreateWebResourceResponse
HRESULT CreateWebResourceResponse(IStream* content, int statusCode, LPCWSTR reasonPhrase, LPCWSTR headers, ICoreWebView2WebResourceResponse* response)

Create a new web resource response object. The headers parameter is the raw response header string delimited by newline. It is also possible to create this object with null headers string and then use the ICoreWebView2HttpResponseHeaders to construct the headers line by line. For more information about other parameters, navigate to ICoreWebView2WebResourceResponse.

get_BrowserVersionString
HRESULT get_BrowserVersionString(LPWSTR* versionInfo)

The browser version info of the current ICoreWebView2Environment, including channel name if it is not the WebView2 Runtime. It matches the format of the GetAvailableCoreWebView2BrowserVersionString API. Channel names are beta, dev, and canary.

add_NewBrowserVersionAvailable
HRESULT add_NewBrowserVersionAvailable(ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler, EventRegistrationToken* token)

Add an event handler for the NewBrowserVersionAvailable event. NewBrowserVersionAvailable runs when a newer version of the WebView2 Runtime is installed and available using WebView2. To use the newer version of the browser you must create a new environment and WebView. The event only runs for new version from the same WebView2 Runtime from which the code is running. When not running with installed WebView2 Runtime, no event is run.

remove_NewBrowserVersionAvailable
HRESULT remove_NewBrowserVersionAvailable(EventRegistrationToken token)

Remove an event handler previously added with add_NewBrowserVersionAvailable.

Meta