The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed full-screen.
The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed full-screen.
It's not guaranteed that the element will be put into full screen mode.
If permission to enter full screen mode is granted, the document will
receive a fullscreenchange
event to let it know that it's now in full
screen mode. If permission is denied, the document receives a
fullscreenerror
event instead.
Note: Returns js.UndefOr
because implementations of older versions
of this spec may not return a Promise.
MDN