Use Web API `beforeunload` event to trigger the confirm dialog  > [!NOTE] > Originally posted on [Discord](https://discord.com/channels/1284581928254701718/1407573596217413702/1407573596217413702)