Webplayer - action on leave page

I would like to save the game state when the user leaves the web page.

I thought I had seen a delegate for this, but I’ve searched and cannot find it.

Is there a way to do this?

I’m currently exploring sending a message from the browser, but I hate having to rely on the hugely varying nature of browsers for something so important as saving the player’s game state.

MonoBehaviour.OnApplicationQuit is the message I was after.