This question is really, really specific and I'm not sure if anyone will know the answer but here goes.
I'm currently building a website, and I'd like to embed HTML5 games in certain pagesa website, but I need to be able to detect when the game has ended so I can run some of my own JavaScript.
Looking at the output of some game engines (Construct 2, for example) reveals a nightmare of code that I couldn't hope to tweak so that it fires off an event when done.
Is this an unrealistic goalHow can I detect when a game has ended?