/// <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); } }
public void CheckPermission() { Interop ??= new JSInterop <MockNotification>(JSRuntime); _ = BrowserNotification.CheckPermission(Interop, this); }
private async Task CheckPermission() { Interop ??= new JSInterop <Notifications>(JSRuntime); await BrowserNotification.CheckPermission(Interop, this, nameof(GetPermissionCallback)); }