- From: Mikko Rantalainen <mikko.rantalainen@peda.net>
- Date: Thu, 20 Oct 2011 15:27:44 +0300
2011-10-19 17:45 EEST: Glenn Maynard: > b.onclick = function(e) { > if(document.fullscreen) > document.exitFullscreen(); > else > gameDiv.enterFullScreen(); > } In fact, the most obvious code should be b.onclick = function(e) { if(gameDiv.fullscreen) gameDiv.exitFullscreen(); else gameDiv.enterFullScreen(); } > If F11-fullscreen sets document.fullscreen, this breaks; enterFullScreen > would never be called. Yes. If the web developer is going to fullscreen a single element, he should test if that element is fullscreen instead of testing if the whole document is fullscreen, IMHO. -- Mikko
Received on Thursday, 20 October 2011 05:27:44 UTC