Browse Source

fix menu.popup() sample code

Charles Kerr 7 years ago
parent
commit
35e90f742b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/api/menu.md

+ 1 - 1
docs/api/menu.md

@@ -259,7 +259,7 @@ menu.append(new MenuItem({label: 'MenuItem2', type: 'checkbox', checked: true}))
 
 window.addEventListener('contextmenu', (e) => {
   e.preventDefault()
-  menu.popup(remote.getCurrentWindow())
+  menu.popup({window: remote.getCurrentWindow()})
 }, false)
 </script>
 ```