Position electron Menu

I am trying to find a way to position a native Menu (spawned from the main-process in an electron app).

Consider the following scenario:

I have a button [B] in a top-right position. Upon clicking it I want to show a Menu but align the topright corner of the menu with the bottomright corner of the button.

 _____________________
|               __|_B_|
|              |_menu_|
|              |______|
|              |______|
|              |______|
|                     |
|_____________________|

There is x and y which can be set in the Menu.popup function, but since there is no information about the width/height or any ability to set the menu anchor-position. I see no way to achieve this.

An alternative would be to use a renderer-side menu, but that would require extra effort to make it accessible for assistive technology etc.. So I was hoping I could find a way to make this work.

I would love to know any idea’s or workarounds for this.