From 444fe8bf1fd940bb1b2a0c961bd053accf338e86 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 10 Jun 2014 13:29:09 +0800 Subject: [PATCH] :memo: Fix the outdated menu example, closed #389. --- docs/api/menu.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/api/menu.md b/docs/api/menu.md index 54825d6fefe3..49fb507c63d0 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -4,12 +4,16 @@ The `Menu` class is used to create native menus that can be used as application menu and context menu. Each menu is consisted of multiple menu items, and each menu item can have a submenu. -An example of creating a menu dynamically and show it when user right clicks +An example of creating a menu dynamically in web page by using the +[remote](remote.md) module, and show it when user right clicks the page: -```javascript -var Menu = require('menu'); -var MenuItem = require('menu-item'); +```html + + ``` Another example of creating the application menu with the simple template API: ```javascript +// main.js var template = [ { label: 'Atom Shell',