Trait webview2_sys::ICoreWebView2ScriptDialogOpeningEventArgs [−][src]
pub trait ICoreWebView2ScriptDialogOpeningEventArgs: IUnknown {
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
The URI of the page that requested the dialog box.
unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT
unsafe fn get_kind(&self, kind: *mut ScriptDialogKind) -> HRESULT
The kind of JavaScript dialog box. alert
, confirm
, prompt
, or
beforeunload
.
unsafe fn get_message(&self, message: *mut LPWSTR) -> HRESULT
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
.
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
.
unsafe fn get_default_text(&self, default_text: *mut LPWSTR) -> HRESULT
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.
unsafe fn get_result_text(&self, result_text: *mut LPWSTR) -> HRESULT
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.
unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT
unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT
Sets the ResultText
property.
unsafe fn get_deferral(
&self,
deferral: *mut *mut *mut ICoreWebView2DeferralVTable
) -> HRESULT
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
A COM compatible V-Table
Check whether a given IID is in the inheritance hierarchy of this interface