LostBeard / SpawnDev.BlazorJS

Full Blazor WebAssembly and Javascript Interop with multithreading via WebWorkers
https://blazorjs.spawndev.com
MIT License
78 stars 6 forks source link

Wrong event subscribed in callback for OnAppInstalled #9

Closed RonPeters closed 10 months ago

RonPeters commented 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 / } }

LostBeard commented 10 months ago

Copy paste to save time got me. Thank you! I have updated the repo, I will put up an updated Nuget shortly.

LostBeard commented 10 months ago

SpawnDev.BlazorJS 2.2.2 Nuget is up with your fix and the other updates.