headless mode: fullscreen button works
This commit is contained in:
parent
f308f50165
commit
04941261b5
1 changed files with 13 additions and 1 deletions
|
|
@ -138,7 +138,19 @@ init = function(session,callback) {
|
|||
},
|
||||
{
|
||||
label:'Fullscreen',
|
||||
click:function(){ipc.send('fullscreen')},
|
||||
click:function(){
|
||||
if (webFrame) {
|
||||
ipc.send('fullscreen')
|
||||
} else {
|
||||
var isInFullScreen = document.webkitIsFullScreen
|
||||
|
||||
if (isInFullScreen) {
|
||||
document.webkitExitFullscreen()
|
||||
} else {
|
||||
document.documentElement.webkitRequestFullScreen()
|
||||
}
|
||||
}
|
||||
},
|
||||
icon:'tv'
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue