3 ms·
I don't know if Electron has an API for menus, but the HTML elements that let you add items to the native contextmenu were scrapped, and every browser I know of
by easrng 5y ago
I don't know if Electron has an API for menus, but the HTML elements that let you add items to the native contextmenu were scrapped, and every browser I know of renders their own menus on Windows/Linux anyway. There is not a way to add a native contextmenu unless you do something cursed like positioning an invisible <select> where the mouse is and opening it on right click.
Edit: Never mind, there is no way to open a <select> with JS.
- marcellus23 5y agoI know, but other Electron apps manage to do it (VS Code, Postman), so there must be a way. edit: some quick googling reveals there is an API for this https://www.electronjs.org/docs/latest/api/menu#class-menu https://www.electronjs.org/docs/latest/api/menu#class-menu