/// Shows a dialog with a yes/no question.
Shows a dialog with a yes/no question.
Shows a dialog with a yes / no question .
pub fn ask<D: ApplicationDispatcherExt + 'static>(
  webview_manager: &crate::WebviewManager<D>,
  title: String,
  message: String,
  callback: String,
  error: String,
) -> crate::Result<()> {
  crate::execute_promise_sync(
    webview_manager,
    move || match ask_dialog(message, title) {
      DialogSelection::Yes => crate::Result::Ok(true),
      _ => crate::Result::Ok(false),
    },
    callback,
    error,
  );
  Ok(())
}
pub fn ask < D : ApplicationDispatcherExt + ' static > ( webview_manager : & crate :: WebviewManager < D > , title : String , message : String , callback : String , error : String , ) -> crate :: Result < ( ) > { crate :: execute_promise_sync ( webview_manager , move | | match ask_dialog ( message , title ) { DialogSelection :: Yes => crate :: Result :: Ok ( true ) , _ => crate :: Result :: Ok ( false ) , } , callback , error , ) ; Ok ( ( ) ) }
Shows a dialog with a yes/no question.
Shows a dialog with a yes / no question .
webview_manager
&crate::WebviewManager<D>
title
String
message
String
callback
String
error
String