The WebEventsManager class is responsible for capturing events
that are triggered by the browser and notifying the game.
There are two types of events that are handled:
visibilitychange - triggered when the browser tab displaying the game is hidden or shown
resize - triggered when the browser window is resized
Adding an Event Listener
To add an event listener, you must first create a callback function that will be called when the event is triggered.
Then, you can register the callback function with the WebEventsManager instance.
Removing an Event Listener
To remove an event listener, pass a reference to your callback function: