JavaScript Menus for Native-Looking Applications

Using web technologies for the GUI of a desktop applicationmakes a lot of sense: they’re portable, familiar, and powerful.A popular option is to use a comprehensive framework such asElectron.However, you might want the option of using a regular desktop browser —maybe you want to be able to access your application remotely,or you might prefer a lighter-weight embedded browser such aswebview.
For a native-looking application you probably want menus:a top menubar as well as a pop-up (context) menu.While the various embedded platforms(such as Electron) each have their own APIs for menus,there is no standard JavaScript API.The DomTerm terminal emulatorcan be run with a small Electron wrapper(in which case it uses Electron menus), but it can also runin a plain browser like Firefox or Chrome.So I looked around for a lightweight menu library that wouldwork in a desktop browser,but I didn’t find anything I liked: They were unmaintained, or too big, or depended on some other library(such as jQuery), or were incomplete (popup menus but no menubarsupport, or missing keyboard navigation), or had anAPI too different from Electron’s relatively simple one.