refactor: make autoHideMenuBar a property on BrowserWindows (#18555)
This commit is contained in:
parent
4cb6be453a
commit
52c76d737a
5 changed files with 31 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
'use strict'
|
||||
|
||||
const electron = require('electron')
|
||||
const { WebContentsView, TopLevelWindow } = electron
|
||||
const { WebContentsView, TopLevelWindow, deprecate } = electron
|
||||
const { BrowserWindow } = process.electronBinding('window')
|
||||
|
||||
Object.setPrototypeOf(BrowserWindow.prototype, TopLevelWindow.prototype)
|
||||
|
@ -191,4 +191,7 @@ Object.assign(BrowserWindow.prototype, {
|
|||
}
|
||||
})
|
||||
|
||||
// Deprecations
|
||||
deprecate.fnToProperty(BrowserWindow.prototype, 'autoHideMenuBar', '_isMenuBarAutoHide', '_setAutoHideMenuBar')
|
||||
|
||||
module.exports = BrowserWindow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue