1,295
edits
Changes
→Examples
1. Make a video element display fullscreen when clicked and leave fullscreen when it ends.
onclick="window.requestFullScreenDisableKeys(event.target)"
onended="window.cancelFullScreen()">> <</video>>
2. Make a canvas element display fullscreen in response to user input. Resize the canvas to the appropriate resolution while it's fullscreen.
function redrawCanvas(c) { ... }
function resizeCanvas() {
redrawCanvas(c);
}
Go Fullscreen!
3. Hide advertisements while the window is fullscreen.