mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix menu.popup() sample code
This commit is contained in:
@@ -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>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user