Closed RonPeters closed 10 months ago
I believe the wrong event is subscribed to on this line of code: https://github.com/LostBeard/SpawnDev.BlazorJS/blob/d4a804038ef8e644805983868980d88a86351d3e/SpawnDev.BlazorJS/JSObjects/Window.cs#L181 public JSEventCallback OnAppInstalled { get => new JSEventCallback(o => AddEventListener("afterprint", o), o => RemoveEventListener("afterprint", o)); set { / set MUST BE HERE TO ENABLE += -= operands / } }
Should be: public JSEventCallback OnAppInstalled { get => new JSEventCallback(o => AddEventListener("appinstalled", o), o => RemoveEventListener("appinstalled", o)); set { / set MUST BE HERE TO ENABLE += -= operands / } }
Copy paste to save time got me. Thank you! I have updated the repo, I will put up an updated Nuget shortly.
SpawnDev.BlazorJS 2.2.2 Nuget is up with your fix and the other updates.
I believe the wrong event is subscribed to on this line of code: https://github.com/LostBeard/SpawnDev.BlazorJS/blob/d4a804038ef8e644805983868980d88a86351d3e/SpawnDev.BlazorJS/JSObjects/Window.cs#L181 public JSEventCallback OnAppInstalled { get => new JSEventCallback(o => AddEventListener("afterprint", o), o => RemoveEventListener("afterprint", o)); set { / set MUST BE HERE TO ENABLE += -= operands / } }
Should be: public JSEventCallback OnAppInstalled { get => new JSEventCallback(o => AddEventListener("appinstalled", o), o => RemoveEventListener("appinstalled", o)); set { / set MUST BE HERE TO ENABLE += -= operands / } }