Use a highlighter?

Hello. I develop an add-on, Svelte Devtools, that extends devtools. I would like to display the box-model highlighter on a given DOM element. In other words I’m attempting to create the same effect as when you hover over a node in the inspector and a blue box highlights the corresponding element on the page.

I found this doc but I don’t know if there’s a way to access that api from web extensions.

Is there a way to access that api or an alternative way to use highlighters from a web extension?

Edit: Sorry, just realized I should have posted this in development.

As far as I know there are two things you can do:

  • Select the node using the eval in the devtools API, though that’ll probably switch to the inspector
  • Write your own highlighter (as a content script)