Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it. If not in fullscreen, this will request the browser to enter fullscreen mode.
If the browser does not support this, a
FULLSCREEN_UNSUPPORTED event will be emitted.
This method must be called from a user-input gesture, such as
pointerdown. You cannot launch
games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked
from fullscreen unless the iframe has the
The FullscreenOptions dictionary is used to provide configuration options when entering full screen.