ICoreWebView2ScriptDialogOpeningEventArgs

Trait ICoreWebView2ScriptDialogOpeningEventArgs 

Source
pub trait ICoreWebView2ScriptDialogOpeningEventArgs: IUnknown {
    // Required methods
    unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT;
    unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT;
    unsafe fn get_message(&self, message: *mut LPWSTR) -> HRESULT;
    unsafe fn accept(&self) -> HRESULT;
    unsafe fn get_default_text(&self, default_text: *mut LPWSTR) -> HRESULT;
    unsafe fn get_result_text(&self, result_text: *mut LPWSTR) -> HRESULT;
    unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT;
    unsafe fn get_deferral(
        &self,
        deferral: *mut *mut *mut ICoreWebView2DeferralVTable,
    ) -> HRESULT;
}
Expand description

Event args for the ScriptDialogOpening event.

Required Methods§

Source

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

The URI of the page that requested the dialog box.

Source

unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT

The kind of JavaScript dialog box. alert, confirm, prompt, or beforeunload.

Source

unsafe fn get_message(&self, message: *mut LPWSTR) -> HRESULT

The message of the dialog box. From JavaScript this is the first parameter passed to alert, confirm, and prompt and is empty for beforeunload.

Source

unsafe fn accept(&self) -> HRESULT

The host may run this to respond with OK to confirm, prompt, and beforeunload dialogs. Do not run this method to indicate cancel. From JavaScript, this means that the confirm and beforeunload function returns TRUE if Accept is run. And for the prompt function it returns the value of ResultText if Accept is run and otherwise returns FALSE.

Source

unsafe fn get_default_text(&self, default_text: *mut LPWSTR) -> HRESULT

The second parameter passed to the JavaScript prompt dialog. The result of the prompt JavaScript function uses this value as the default value.

Source

unsafe fn get_result_text(&self, result_text: *mut LPWSTR) -> HRESULT

The return value from the JavaScript prompt function if Accept is run. This value is ignored for dialog kinds other than prompt. If Accept is not run, this value is ignored and FALSE is returned from prompt.

Source

unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT

Sets the ResultText property.

Source

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

Returns an ICoreWebView2Deferral object. Use this operation to complete the event at a later time.

Trait Implementations§

Source§

impl ComInterface for dyn ICoreWebView2ScriptDialogOpeningEventArgs

Source§

const IID: IID = IID_ICORE_WEB_VIEW2_SCRIPT_DIALOG_OPENING_EVENT_ARGS

The associated id for this interface
Source§

type VTable = ICoreWebView2ScriptDialogOpeningEventArgsVTable

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: ICoreWebView2ScriptDialogOpeningEventArgs> ProductionComInterface<C> for dyn ICoreWebView2ScriptDialogOpeningEventArgs

Source§

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

Get the vtable for a particular COM interface

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT

Source§

unsafe fn get_message(&self, message: *mut LPWSTR) -> HRESULT

Source§

unsafe fn accept(&self) -> HRESULT

Source§

unsafe fn get_default_text(&self, default_text: *mut LPWSTR) -> HRESULT

Source§

unsafe fn get_result_text(&self, result_text: *mut LPWSTR) -> HRESULT

Source§

unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT

Source§

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

Source§

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

Source§

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

Source§

unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT

Source§

unsafe fn get_message(&self, message: *mut LPWSTR) -> HRESULT

Source§

unsafe fn accept(&self) -> HRESULT

Source§

unsafe fn get_default_text(&self, default_text: *mut LPWSTR) -> HRESULT

Source§

unsafe fn get_result_text(&self, result_text: *mut LPWSTR) -> HRESULT

Source§

unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT

Source§

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

Implementors§