ICoreWebView2NavigationStartingEventArgs

Trait ICoreWebView2NavigationStartingEventArgs 

Source
pub trait ICoreWebView2NavigationStartingEventArgs: IUnknown {
    // Required methods
    unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT;
    unsafe fn get_is_user_initiated(
        &self,
        is_user_initiated: *mut BOOL,
    ) -> HRESULT;
    unsafe fn get_is_redirected(&self, is_redirected: *mut BOOL) -> HRESULT;
    unsafe fn get_request_headers(
        &self,
        request_headers: *mut *mut *mut ICoreWebView2HttpRequestHeadersVTable,
    ) -> HRESULT;
    unsafe fn get_cancel(&self, cancel: *mut BOOL) -> HRESULT;
    unsafe fn put_cancel(&self, cancel: BOOL) -> HRESULT;
    unsafe fn get_navigation_id(&self, navigation_id: *mut u64) -> HRESULT;
}
Expand description

Event args for the NavigationStarting event.

Required Methods§

Source

unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT

The uri of the requested navigation.

Source

unsafe fn get_is_user_initiated(&self, is_user_initiated: *mut BOOL) -> HRESULT

TRUE when the navigation was initiated through a user gesture as opposed to programmatic navigation by page script. Navigations initiated via WebView2 APIs are considered as user initiated.

Source

unsafe fn get_is_redirected(&self, is_redirected: *mut BOOL) -> HRESULT

TRUE when the navigation is redirected.

Source

unsafe fn get_request_headers( &self, request_headers: *mut *mut *mut ICoreWebView2HttpRequestHeadersVTable, ) -> HRESULT

The HTTP request headers for the navigation.

> [!NOTE]\n> You are not able to modify the HTTP request headers in a NavigationStarting event.

Source

unsafe fn get_cancel(&self, cancel: *mut BOOL) -> HRESULT

The host may set this flag to cancel the navigation. If set, the navigation is not longer present and the content of the current page is intact. For performance reasons, GET HTTP requests may happen, while the host is responding. You may set cookies and use part of a request for the navigation. Cancellation for navigation to about:blank or frame navigation to srcdoc is not supported. Such attempts are ignored.

Source

unsafe fn put_cancel(&self, cancel: BOOL) -> HRESULT

Sets the Cancel property.

Source

unsafe fn get_navigation_id(&self, navigation_id: *mut u64) -> HRESULT

The ID of the navigation.

Trait Implementations§

Source§

impl ComInterface for dyn ICoreWebView2NavigationStartingEventArgs

Source§

const IID: IID = IID_ICORE_WEB_VIEW2_NAVIGATION_STARTING_EVENT_ARGS

The associated id for this interface
Source§

type VTable = ICoreWebView2NavigationStartingEventArgsVTable

A COM compatible V-Table
Source§

type Super = dyn IUnknown

The interface that this interface inherits from
Source§

fn is_iid_in_inheritance_chain(riid: &GUID) -> bool

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

impl<C: ICoreWebView2NavigationStartingEventArgs> ProductionComInterface<C> for dyn ICoreWebView2NavigationStartingEventArgs

Source§

fn vtable<O: Offset>() -> Self::VTable

Get the vtable for a particular COM interface

Implementations on Foreign Types§

Source§

impl<T: ICoreWebView2NavigationStartingEventArgs + ComInterface + ?Sized> ICoreWebView2NavigationStartingEventArgs for ComPtr<T>

Source§

unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT

Source§

unsafe fn get_is_user_initiated(&self, is_user_initiated: *mut BOOL) -> HRESULT

Source§

unsafe fn get_is_redirected(&self, is_redirected: *mut BOOL) -> HRESULT

Source§

unsafe fn get_request_headers( &self, request_headers: *mut *mut *mut ICoreWebView2HttpRequestHeadersVTable, ) -> HRESULT

Source§

unsafe fn get_cancel(&self, cancel: *mut BOOL) -> HRESULT

Source§

unsafe fn put_cancel(&self, cancel: BOOL) -> HRESULT

Source§

unsafe fn get_navigation_id(&self, navigation_id: *mut u64) -> HRESULT

Source§

impl<T: ICoreWebView2NavigationStartingEventArgs + ComInterface + ?Sized> ICoreWebView2NavigationStartingEventArgs for ComRc<T>

Source§

unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT

Source§

unsafe fn get_is_user_initiated(&self, is_user_initiated: *mut BOOL) -> HRESULT

Source§

unsafe fn get_is_redirected(&self, is_redirected: *mut BOOL) -> HRESULT

Source§

unsafe fn get_request_headers( &self, request_headers: *mut *mut *mut ICoreWebView2HttpRequestHeadersVTable, ) -> HRESULT

Source§

unsafe fn get_cancel(&self, cancel: *mut BOOL) -> HRESULT

Source§

unsafe fn put_cancel(&self, cancel: BOOL) -> HRESULT

Source§

unsafe fn get_navigation_id(&self, navigation_id: *mut u64) -> HRESULT

Implementors§