is it possible for a Webextension to interact with a DOM node via a contextmenu entry?
The API looks pretty limited to me: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/OnClickData
Well, following the click you could inject a content script.
The major problem I see is that you obviously don't get a reference to the target element, but you don't even get the coordinates and frameId of the clicked element ...
WebExtensions unfortunately doesn't implement anything equivalent to Add-on SDK's SelectorContext. I was able to hack something equivalent using HTML5's <menu type="context"> feature (which works on Firefox but not on Chromium). My implementation of it starts here. Admittedly it's not very readable. Basically it's a text highlighter add-on. The hiliteNode function wraps each marked text node in a <span class="prostetnic" contextmenu="prostetnic-###"> element. It then creates a context menu for each such span. This HTML5 context menu appears separately from the WebExtensions context menu, which is confusing. It's the best I could do, that I've figured out so far, anyway. Yeah, I miss SDK.
<span class="prostetnic" contextmenu="prostetnic-###">
I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1357651