Link to anchor in note viewer from plugin panel?

I am about to release a new plugin that allows tags to be embedded in a note, and then highlighted upon request.

I'd like to add one final feature before I do, and need to be able to scroll the viewer to a set location. ScrollToHash is not suitable as it only works if there is a visible hash (#) in the note (at the start of a line), which I'm trying to avoid. ScrollIntoView is not available and I don't believe that there's any appetite to make it available for plugins.

It has been suggested that I may be able to use html anchors, i.e. <a name="anchor"></a> which would work as the anchor itself is not visible in the viewer.

If I have the anchor link and the anchor in the same note, then this works fine, but can anyone assist with getting the viewer to scroll to the anchor from a link in a plugin panel?

The triggering of html anchors is valid from page to page as the URL can be passed as well as the #anchor name, but I cannot figure out how to reference the viewer, or whether it's even possible because of the internal structure Joplin?

Failing this, could it be done via JS using an onclick event captured in webview.js? Would this be possible as there shouldn't be a problem with cross site scripting or is the plugin sandboxed from the rest of the app?