mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
BrowserWindow::setMenu is available on Linux.
This commit is contained in:
@@ -34,7 +34,8 @@ BrowserWindow::restart = ->
|
||||
@loadUrl(@getUrl())
|
||||
|
||||
BrowserWindow::setMenu = (menu) ->
|
||||
throw new Error('BrowserWindow.setMenu is only available on Windows') unless process.platform is 'win32'
|
||||
if process.platform is 'darwin'
|
||||
throw new Error('BrowserWindow.setMenu is not available on OS X')
|
||||
|
||||
throw new TypeError('Invalid menu') unless menu?.constructor?.name is 'Menu'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user