From 88809b0e0ba69f879ba1332520affb440fb1383b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 15 Nov 2016 10:53:36 -0800 Subject: [PATCH] Document reload and toggledevtools roles --- docs/api/menu-item.md | 2 ++ docs/api/menu.md | 12 ++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/api/menu-item.md b/docs/api/menu-item.md index 5b5324df031c..2c8a9c895c8d 100644 --- a/docs/api/menu-item.md +++ b/docs/api/menu-item.md @@ -56,6 +56,8 @@ The `role` property can have following values: * `minimize` - Minimize current window * `close` - Close current window * `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 * `resetzoom` - Reset the focused page's zoom level to the original size * `zoomin` - Zoom in the focused page by 10% diff --git a/docs/api/menu.md b/docs/api/menu.md index b4e80689ad47..3150d8ad55b4 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -137,18 +137,10 @@ const template = [ label: 'View', submenu: [ { - label: 'Reload', - accelerator: 'CmdOrCtrl+R', - click (item, focusedWindow) { - if (focusedWindow) focusedWindow.reload() - } + role: 'reload' }, { - label: 'Toggle Developer Tools', - accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I', - click (item, focusedWindow) { - if (focusedWindow) focusedWindow.webContents.toggleDevTools() - } + role: 'toggledevtools' }, { type: 'separator'