`Menu.addItem()`: Support asynchronous callback functions?

There are two main reasons why it is not async:

  • Sorting, which happens on show
  • native menus, like used in the linked discussions cannot be updated, they need to be fully recompiled and retriggered.

“Native menus” is a setting in Apperance, it is not exclusive to macOS.

When using your second solution the menu will close & open again when a Promise is resolved, which results in bad UX.

1 Like