Changes

Jump to: navigation, search

Gecko:FullScreenAPI

48 bytes added, 01:12, 30 June 2010
Examples
1. Make a video element display fullscreen when clicked and leave fullscreen when it ends.
<&lt;video src="pelican.webm" autoplay
onclick="window.requestFullScreenDisableKeys(event.target)"
onended="window.cancelFullScreen()">&gt; <&lt;/video>&gt;
2. Make a canvas element display fullscreen in response to user input. Resize the canvas to the appropriate resolution while it's fullscreen.
<&lt;script>&gt;
function redrawCanvas(c) { ... }
function resizeCanvas() {
redrawCanvas(c);
}
<&lt;/script>&gt; <&lt;canvas id="c" onfullscreenchange="resizeCanvas()"><&gt;&lt;/canvas>&gt; <&lt;button onclick="window.requestFullScreen(document.getElementById('c'))">&gt;
Go Fullscreen!
<&lt;/button>&gt;
3. Hide advertisements while the window is fullscreen.
1,295
edits

Navigation menu