Document reload and toggledevtools roles
This commit is contained in:
parent
88959079bd
commit
88809b0e0b
2 changed files with 4 additions and 10 deletions
|
@ -56,6 +56,8 @@ The `role` property can have following values:
|
||||||
* `minimize` - Minimize current window
|
* `minimize` - Minimize current window
|
||||||
* `close` - Close current window
|
* `close` - Close current window
|
||||||
* `quit`- Quit the application
|
* `quit`- Quit the application
|
||||||
|
* `reload` - Reload the current window
|
||||||
|
* `toggledevtools` - Toggle developer tools in the current window
|
||||||
* `togglefullscreen`- Toggle full screen mode on the current window
|
* `togglefullscreen`- Toggle full screen mode on the current window
|
||||||
* `resetzoom` - Reset the focused page's zoom level to the original size
|
* `resetzoom` - Reset the focused page's zoom level to the original size
|
||||||
* `zoomin` - Zoom in the focused page by 10%
|
* `zoomin` - Zoom in the focused page by 10%
|
||||||
|
|
|
@ -137,18 +137,10 @@ const template = [
|
||||||
label: 'View',
|
label: 'View',
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'Reload',
|
role: 'reload'
|
||||||
accelerator: 'CmdOrCtrl+R',
|
|
||||||
click (item, focusedWindow) {
|
|
||||||
if (focusedWindow) focusedWindow.reload()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Toggle Developer Tools',
|
role: 'toggledevtools'
|
||||||
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
|
|
||||||
click (item, focusedWindow) {
|
|
||||||
if (focusedWindow) focusedWindow.webContents.toggleDevTools()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
|
|
Loading…
Reference in a new issue