Exemplo n.º 1
0
 /// <summary>
 /// OnAfterRenderAsync 方法
 /// </summary>
 /// <param name="firstRender"></param>
 /// <returns></returns>
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (firstRender)
     {
         Interop = new JSInterop <Notifications>(JSRuntime);
         await BrowserNotification.CheckPermission(Interop, this, nameof(GetPermissionCallback), false);
     }
 }
Exemplo n.º 2
0
 public void CheckPermission()
 {
     Interop ??= new JSInterop <MockNotification>(JSRuntime);
     _ = BrowserNotification.CheckPermission(Interop, this);
 }
Exemplo n.º 3
0
 private async Task CheckPermission()
 {
     Interop ??= new JSInterop <Notifications>(JSRuntime);
     await BrowserNotification.CheckPermission(Interop, this, nameof(GetPermissionCallback));
 }