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:
commit
1bf014b34a
1 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue