[SOLVED] Is there a code to refresh a window?

My game has a quit button which would just close the application window and the code for that function is simply

Quit.prototype.onPress = function (event) {

I wanted to add a restart button for my game which would simply refresh the window. Is there a similar code to that?


However, I would consider unloading the scene and reloading the scene instead as that would be quicker than reloading the page.

1 Like