mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Forward webview visibility change events from browser process
This commit is contained in:
@@ -110,7 +110,9 @@ BrowserWindow.prototype._init = function () {
|
||||
const newState = this.isVisible() && !this.isMinimized()
|
||||
if (isVisible !== newState) {
|
||||
isVisible = newState
|
||||
this.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', isVisible ? 'visible' : 'hidden')
|
||||
const visibilityState = isVisible ? 'visible' : 'hidden'
|
||||
this.webContents.send('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', visibilityState)
|
||||
this.webContents.emit('-window-visibility-change', visibilityState)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user