Please correct me if I'm wrong, but the documentation mentions no way get the element that was clicked on. There is, however, a way to get it.
contextMenu.addItem("alertElement", function () {
alert(contextMenu._elementClicked)
});
I assume the _elementClicked variable is not supposed to be accessed, as it's marked as private. Still, I thought it could be worth mentioning!
Please correct me if I'm wrong, but the documentation mentions no way get the element that was clicked on. There is, however, a way to get it.
I assume the
_elementClickedvariable is not supposed to be accessed, as it's marked as private. Still, I thought it could be worth mentioning!