Minor tweaks

This commit is contained in:
Sam Potts
2015-07-25 20:29:19 +10:00
parent e9cdbfb8da
commit a0d2d5cd24
6 changed files with 9 additions and 6 deletions

View File

@ -559,9 +559,8 @@
fullscreen.isFullScreen = function(element) {
if(typeof element == "undefined") {
element = document;
element = document.body;
}
switch (this.prefix) {
case "":
return document.fullscreenElement == element;
@ -572,6 +571,9 @@
}
};
fullscreen.requestFullScreen = function(element) {
if(typeof element == "undefined") {
element = document.body;
}
return (this.prefix === "") ? element.requestFullScreen() : element[this.prefix + (this.prefix == "ms" ? "RequestFullscreen" : "RequestFullScreen")]();
};
fullscreen.cancelFullScreen = function() {