Trait webview2_sys::ICoreWebView2NewWindowRequestedEventArgs[][src]

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;
unsafe fn get_window_features(
        &self,
        value: *mut *mut *mut ICoreWebView2WindowFeaturesVTable
    ) -> HRESULT; }

Event args for the NewWindowRequested event. The event is run 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[src]

The target uri of the new window requested.

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

Sets a WebView as a result of the NewWindowRequested. The target WebView should not be navigated. If the NewWindow is set, the top-level window returns as the opened WindowProxy.

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

Gets the new window.

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

Sets whether the NewWindowRequested event is handled by host. If this is FALSE and no NewWindow is set, the WebView opens a popup window and it returns as opened WindowProxy. If set to TRUE and no NewWindow is set for window.open, the opened WindowProxy is for an testing window object and no window loads. The default value is FALSE.

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

Gets whether the NewWindowRequested event is handled by host.

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

TRUE when the new window request was initiated through a user gesture such as selecting an anchor tag with target. The Microsoft Edge popup blocker is disabled for WebView so the app is able to use this flag to block non-user initiated popups.

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

Obtain an ICoreWebView2Deferral object and put the event into a deferred state. Use the ICoreWebView2Deferral object to complete the window open request at a later time. While this event is deferred the opener window returns a WindowProxy to an un-navigated window, which navigates when the deferral is complete.

unsafe fn get_window_features(
    &self,
    value: *mut *mut *mut ICoreWebView2WindowFeaturesVTable
) -> HRESULT
[src]

Window features specified by the window.open. The features should be considered for positioning and sizing of new webview windows.

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...