mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add fullscreen exit to toggle callback
This commit is contained in:
parent
040960c067
commit
670b116b93
1 changed files with 7 additions and 1 deletions
|
@ -388,7 +388,13 @@
|
|||
}
|
||||
|
||||
toggleFullscreen() {
|
||||
this.media.requestFullscreen();
|
||||
const fullscreenEnabled = document.fullscreenEnabled && document.fullscreenElement;
|
||||
|
||||
if (fullscreenEnabled) {
|
||||
document.exitFullscreen();
|
||||
} else {
|
||||
this.media.requestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
changeVolume() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue