Trait webview2_sys::ICoreWebView2_4[][src]

pub trait ICoreWebView2_4: ICoreWebView2_3 {
    unsafe fn add_frame_created(
        &self,
        event_handler: *mut *mut ICoreWebView2FrameCreatedEventHandlerVTable,
        token: *mut EventRegistrationToken
    ) -> HRESULT;
unsafe fn remove_frame_created(
        &self,
        token: EventRegistrationToken
    ) -> HRESULT;
unsafe fn add_download_starting(
        &self,
        event_handler: *mut *mut ICoreWebView2DownloadStartingEventHandlerVTable,
        token: *mut EventRegistrationToken
    ) -> HRESULT;
unsafe fn remove_download_starting(
        &self,
        token: EventRegistrationToken
    ) -> HRESULT; }
Expand description

A continuation of the ICoreWebView2_3 interface to support FrameCreated and DownloadStarting events.

Required methods

Raised when a new iframe is created. Use the CoreWebView2Frame.add_Destroyed to listen for when this iframe goes away.

Remove an event handler previously added with add_FrameCreated.

Add an event handler for the DownloadStarting event. This event is raised when a download has begun, blocking the default download dialog, but not blocking the progress of the download.

The host can choose to cancel a download, change the result file path, and hide the default download dialog. If the host chooses to cancel the download, the download is not saved, no dialog is shown, and the state is changed to COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED with interrupt reason COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED. Otherwise, the download is saved to the default path after the event completes, and default download dialog is shown if the host did not choose to hide it. The host can change the visibility of the download dialog using the Handled property. If the event is not handled, downloads complete normally with the default dialog shown.

\snippet ScenarioCustomDownloadExperience.cpp DownloadStarting

Remove an event handler previously added with add_DownloadStarting.

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