Beispiel #1
0
 public async Task FixOnbeforeunload()
 {
     if (_DontAskjJustExecute)
     {
         await ConfirmExitJsInterop.UnsetOnbeforeunload();
     }
     else
     {
         await ConfirmExitJsInterop.SetOnbeforeunload();
     }
 }
Beispiel #2
0
 protected void Confirm()
 {
     Task.Run(async() =>
     {
         bool letsGo = await ConfirmExitJsInterop
                       .ConfirmExit(BlazorConfirmDialog.Message ?? "Are you sure?");
         if (letsGo)
         {
             BlazorConfirmDialog.OnSuccessDelegate?.Invoke();
         }
     });
 }