How to add an item to the Bookmarks contextual menu?

There is no “on(‘bookmarks-menu’…” method and none of the other menu methods are triggered when showing the contextual menu on a bookmark pane item.

Answering my own question with a somewhat hacky method:

this.registerDomEvent(window,'mouseup', function (e) {
    let menu = Array.from(this.activeDocument.body.children).find(child => child.className === 'menu');
    // only one “.menu” is open at a time
    // add checks to determine that the menu is the one you want
    // and create and insert your menu item