You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose an API for context menus, using the same menu code as menubar popups.
The function needs to take a menu definition, a position, and orientation (directions it should fly out).
Something like:
popupMenu({menu: contextMenu,from: {x: event.clientX,y: event.clientY},// {x, y} (or Event?), or DOMRect (or Element) so it can pop from different spots according to which direction it ends up popping direction: "down right",// preferred direction - may flip or reposition to fit within boundsrepositionWithinBounds: DOMRectorElementorfalse,// defaults to page viewport (taking into account scrollbars); false forces the direction you specify to apply})
Can look at other menu APIs for inspiration/validation.
The text was updated successfully, but these errors were encountered:
Expose an API for context menus, using the same menu code as menubar popups.
The function needs to take a menu definition, a position, and orientation (directions it should fly out).
Something like:
Can look at other menu APIs for inspiration/validation.
The text was updated successfully, but these errors were encountered: