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§
Sourceunsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT
unsafe fn get_uri(&self, uri: *mut LPWSTR) -> HRESULT
The URI of the page that requested the dialog box.
Sourceunsafe 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.
Sourceunsafe 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.
Sourceunsafe fn accept(&self) -> HRESULT
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.
Sourceunsafe 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.
Sourceunsafe 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.
Sourceunsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT
unsafe fn put_result_text(&self, result_text: LPCWSTR) -> HRESULT
Sets the ResultText property.
Sourceunsafe 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.