fullscreen
Opens or closes an element in fullscreen mode.
- Use
Document.querySelector()
andElement.requestFullscreen()
to open the given element in fullscreen. - Use
Document.exitFullscreen()
to exit fullscreen mode. - Omit the second argument,
el
, to usebody
as the default element. - Omit the first element,
mode
, to open the element in fullscreen mode by default.