How to make an event occurs when game closing?

Some things like an attention when player close game on window, how to do it? thanks
No Chance to do that from inside the engine, but you can try to modify the index.html with code for that.
Found a way to do this, however only work for web browser game https://developer.mozilla.org/en-US...slug=DOM/Mozilla_event_reference/beforeunload, tks.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-event-occurs-when-game-closing.85656/