let target;
function contextMenuListener(evt) {
target = evt.target
}
Which requires injection on every page.
For the latter, I have to use the "all" ContextType, which unfortunately adds the menu item to places it isn't needed (e.g. [popup] action), which can cause confusion.
I believe these are the best solutions (at least since I last checked) for the listed questions, but they're a bit inconvenient.
(Especially as I look toward dynamic script injection, based on user action, which a lack of TargetElement prevents)
N.B. Totally understand that these aren't mission critical, so just generally asking.
Any info would be appreciated!