refactor: make autoHideMenuBar a property on BrowserWindows (#18555)

This commit is contained in:
Shelley Vohr 2019-06-03 09:09:47 -07:00 committed by GitHub
parent 4cb6be453a
commit 52c76d737a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 5 deletions

View file

@ -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