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