1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Merge pull request #247 from StoryCloud/safe-screenfull-check

safely check for screenfull
This commit is contained in:
Jake Hartnell 2015-08-13 09:22:58 +01:00
commit 1bf014b34a

View file

@ -38,11 +38,11 @@ EPUBJS.reader.ControlsController = function(book) {
}
});
$fullscreen.on("click", function() {
screenfull.toggle($('#container')[0]);
});
if(typeof screenfull !== 'undefined') {
$fullscreen.on("click", function() {
screenfull.toggle($('#container')[0]);
});
if(screenfull) {
document.addEventListener(screenfull.raw.fullscreenchange, function() {
fullscreen = screenfull.isFullscreen;
if(fullscreen) {