I am looking to get the key of the menu item which was clicked in a list of contextmenu's, does anyone know how, this is how I create the context menu:
for(var i=0; i<10; i++) {
appAPI.contextMenu.add("key_" + i, 'Test', function (data) {
console.log('clicked with key: ', data);
}, ["all"]);
}
Why do you need to get the key? ContextMenu listeners are declared per key, so you know which key it is. Using your code:
[Disclosure] I am a Crossrider employee