Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1b41cc5725
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 1.156 kb
<!DOCTYPE html>
function enterFullScreen() {
var element = document.getElementById("fullscreen");
element.innerText = "Press the space bar.";
var consoleDiv = document.getElementById("console");
consoleDiv.innerHTML = "<span style='color:red'>FAIL</span>";
document.addEventListener("keydown", function(event) {
consoleDiv.innerHTML = "<span style='color:green'>PASS</span>";
}, true);
element.addEventListener("webkitfullscreenchange", function(event) {
if (!document.webkitIsFullScreen)
element.innerText = "";
}, false);
<p>This test checks that keyboard events are received by an element in full screen mode. To run the test, press the 'Enter Full Screen' button then press the space bar. The test passes if the element exists full screen and you see the word 'PASS' below.</p>
<button onclick="enterFullScreen()">Enter Full Screen</button>
<div id="fullscreen"></div>
<div id="console"></div>
Jump to Line
Something went wrong with that request. Please try again.