Skip to content

Commit

Permalink
I think document.documentElement is what I actually want
Browse files Browse the repository at this point in the history
  • Loading branch information
sz3 committed Mar 5, 2021
1 parent 7247339 commit f8408b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ var _renderTime = 0;

function toggleFullscreen()
{
var elem = document.body;
if (document.fullscreenElement) {
document.exitFullscreen();
}
else {
elem.requestFullscreen();
document.documentElement.requestFullscreen();
}
}

Expand Down

0 comments on commit f8408b3

Please sign in to comment.