Here is the error that I am getting in Google Chrome:
Uncaught TypeError: Object #<HTMLDivElement> has no method 'webkitCancelFullScreen'
I get a similar error in Firefox.
Here is the code:
document.id('close-full-screen').addEvent('click', function() {
document.id('full-screen').webkitCancelFullScreen();
});
According to the Documentation found here,
webkitCancelFullScreenis called from thedocumentobject not a div. Thus, your code should be.Here is an example using JSFiddle. The correct code can be found here.