-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn the highlighter into a separate layer, so it impacts the page less #3
Comments
Of course, if there was a WebExtension API to just use the built-in DevTools highlighter, that would be awesome too. |
@captainbrosset it is not in the roadmap, but it would be an interesting devtools API to prototype |
@captainbrosset do you think prototyping an API like the built in devtools highlighter is a good approach to solve this issue? or should we figure out a somthing simpler pertaining just the use case? |
I think experimenting with a built-in highlighter API would be really good. In Firefox, there's a way to expose new (non-standard) WebExtension APIs and bundle them in another addon. This way we can play with a new API, and if it turns out to be really useful, make a case for having it added for real to the WebExtension APIs supported in Firefox. The pros I can see are:
But there is a drawback:
I think it's still worth trying it out, but obviously requires knowledge of the internals of Firefox and DevTools. It would be better to do this in a separate issue, and I'd be interested in looking at it myself. So, as a conclusion, in this issue, I think we should continue as planned, by doing something like what I said in the first comment. |
Right now the highlighter (the thing that is displayed in content, to show which elements matched) is using an outline and pseudo-element:
It's bad because that means the outline isn't always visible, and these styles may interfere with styles already declared on a particular element.
The idea here would be to draw this highlighter in a separate layer instead. Stick an absolutely positioned element somewhere at the end of the
<body>
element and use that as the container.That, in turn, means it's going to be much harder to make the highlighter appear at the right place, but at least it should always work.
The text was updated successfully, but these errors were encountered: