Blazor.Notifications icon indicating copy to clipboard operation
Blazor.Notifications copied to clipboard

Make the library offline capable for proper PWA functioning

Open thepra opened this issue 4 years ago • 0 comments

Today, through tests, I figured out that the dependency injection doesn't work for this library when the client is offline and is calling the dependency injection of INotificationService, like in this error:

Microsoft.JSInterop.JSException: error loading dynamically imported module at Microsoft.JSInterop.JSRuntime.d__15`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext() at Append.Blazor.Notifications.NotificationService.IsSupportedByBrowserAsync() at .Client.Components.Subpages.GeneralSettings.OnInitializedAsync()

Could you make it so that the loading of the js library is possible from the beginning without requiring it afterwards? immagine

I know this is a solution for library loading optimization and seem cool but given that PWA's are supposed to be capable to work offline and given this optimization, that library will never load when reaching a page that does need the notification service but never happened to cache it in the first place.

thepra avatar Oct 22 '21 18:10 thepra