[][src]Trait webview2_sys::ICoreWebView2NewWindowRequestedEventArgs

pub trait ICoreWebView2NewWindowRequestedEventArgs: IUnknown {
    unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT;
unsafe fn put_new_window(
        &self,
        new_window: *mut *mut ICoreWebView2VTable
    ) -> HRESULT;
unsafe fn get_new_window(
        &self,
        new_window: *mut *mut *mut ICoreWebView2VTable
    ) -> HRESULT;
unsafe fn put_handled(&self, handled: BOOL) -> HRESULT;
unsafe fn get_handled(&self, handled: *mut BOOL) -> HRESULT;
unsafe fn get_is_user_initiated(
        &self,
        is_user_initiated: *mut BOOL
    ) -> HRESULT;
unsafe fn get_deferral(
        &self,
        deferral: *mut *mut *mut ICoreWebView2DeferralVTable
    ) -> HRESULT; }

Event args for the NewWindowRequested event. The event is fired when content inside webview requested to a open a new window (through window.open() and so on.)

Required methods

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

The target uri of the NewWindowRequest.

unsafe fn put_new_window(
    &self,
    new_window: *mut *mut ICoreWebView2VTable
) -> HRESULT

Sets a WebView as a result of the NewWindowRequest. The target webview should not be navigated. If the NewWindow is set, its top level window will return as the opened WindowProxy.

unsafe fn get_new_window(
    &self,
    new_window: *mut *mut *mut ICoreWebView2VTable
) -> HRESULT

Gets the new window.

unsafe fn put_handled(&self, handled: BOOL) -> HRESULT

Sets whether the NewWindowRequestedEvent is handled by host. If this is false and no NewWindow is set, the WebView will open a popup window and it will be returned as opened WindowProxy. If set to true and no NewWindow is set for a window.open call, the opened WindowProxy will be for an dummy window object and no window will load. Default is false.

unsafe fn get_handled(&self, handled: *mut BOOL) -> HRESULT

Gets whether the NewWindowRequestedEvent is handled by host.

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

IsUserInitiated is true when the new window request was initiated through a user gesture such as clicking an anchor tag with target.

unsafe fn get_deferral(
    &self,
    deferral: *mut *mut *mut ICoreWebView2DeferralVTable
) -> HRESULT

Obtain an ICoreWebView2Deferral object and put the event into a deferred state. You can use the ICoreWebView2Deferral object to complete the window open request at a later time. While this event is deferred the opener window will be returned a WindowProxy to an unnavigated window, which will navigate when the deferral is complete.

Loading content...

Trait Implementations

impl ComInterface for dyn ICoreWebView2NewWindowRequestedEventArgs[src]

type VTable = ICoreWebView2NewWindowRequestedEventArgsVTable

A COM compatible V-Table

type Super = dyn IUnknown

The interface that this interface inherits from

impl<C: ICoreWebView2NewWindowRequestedEventArgs> ProductionComInterface<C> for dyn ICoreWebView2NewWindowRequestedEventArgs[src]

Implementations on Foreign Types

impl<T: ICoreWebView2NewWindowRequestedEventArgs + ComInterface + ?Sized> ICoreWebView2NewWindowRequestedEventArgs for ComRc<T>[src]

impl<T: ICoreWebView2NewWindowRequestedEventArgs + ComInterface + ?Sized> ICoreWebView2NewWindowRequestedEventArgs for ComPtr<T>[src]

Loading content...

Implementors

Loading content...