Trait webview2_sys::ICoreWebView2_2[][src]

pub trait ICoreWebView2_2: ICoreWebView2 {
    unsafe fn add_web_resource_response_received(
        &self,
        event_handler: *mut *mut ICoreWebView2WebResourceResponseReceivedEventHandlerVTable,
        token: *mut EventRegistrationToken
    ) -> HRESULT;
unsafe fn remove_web_resource_response_received(
        &self,
        token: EventRegistrationToken
    ) -> HRESULT;
unsafe fn navigate_with_web_resource_request(
        &self,
        request: *mut *mut ICoreWebView2WebResourceRequestVTable
    ) -> HRESULT;
unsafe fn add_domcontent_loaded(
        &self,
        event_handler: *mut *mut ICoreWebView2DOMContentLoadedEventHandlerVTable,
        token: *mut EventRegistrationToken
    ) -> HRESULT;
unsafe fn remove_domcontent_loaded(
        &self,
        token: EventRegistrationToken
    ) -> HRESULT;
unsafe fn get_cookie_manager(
        &self,
        cookie_manager: *mut *mut *mut ICoreWebView2CookieManagerVTable
    ) -> HRESULT;
unsafe fn get_environment(
        &self,
        environment: *mut *mut *mut ICoreWebView2EnvironmentVTable
    ) -> HRESULT; }
Expand description

A continuation of the ICoreWebView2 interface.

Required methods

Add an event handler for the WebResourceResponseReceived event. WebResourceResponseReceived is raised when the WebView receives the response for a request for a web resource (any URI resolution performed by the WebView; such as HTTP/HTTPS, file and data requests from redirects, navigations, declarations in HTML, implicit favicon lookups, and fetch API usage in the document). The host app can use this event to view the actual request and response for a web resource. There is no guarantee about the order in which the WebView processes the response and the host app’s handler runs. The app’s handler will not block the WebView from processing the response. \snippet ScenarioAuthentication.cpp WebResourceResponseReceived

Remove an event handler previously added with add_WebResourceResponseReceived.

Navigates using a constructed WebResourceRequest object. This lets you provide post data or additional request headers during navigation. The headers in the WebResourceRequest override headers added by WebView2 runtime except for Cookie headers. Method can only be either “GET” or “POST”. Provided post data will only be sent only if the method is “POST” and the uri scheme is HTTP(S). \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest

Add an event handler for the DOMContentLoaded event. DOMContentLoaded is raised when the initial html document has been parsed. This aligns with the the document’s DOMContentLoaded event in html.

\snippet ScenarioDOMContentLoaded.cpp DOMContentLoaded

Remove an event handler previously added with add_DOMContentLoaded.

Gets the cookie manager object associated with this ICoreWebView2. See ICoreWebView2CookieManager.

\snippet ScenarioCookieManagement.cpp CookieManager

Exposes the CoreWebView2Environment used to create this CoreWebView2.

Trait Implementations

A COM compatible V-Table

The interface that this interface inherits from

The associated id for this interface

Check whether a given IID is in the inheritance hierarchy of this interface

Get the vtable for a particular COM interface

Implementations on Foreign Types

Implementors