I’ve wanted something like this for a long time. Very useful for reducing test cases when investigating a layout/css issue or something.
Did you know that Firefox now had support for devtools WebExtensions API too, like Chrome?
For instance chrome.devtools.panels.create
will work fine in Firefox (nightly for now I think).
You can see your extension running in Firefox here:
I think the $0
API is also be implemented, so you should in theory also be able to get the currently selected element in Firefox, but I didn’t manage to get that working in Firefox. Something might be missing still.
@rpl might be able to help getting that working.
For information @Honza has also created a set of devtools extension examples here: https://github.com/devtools-html/extension-examples
Thanks for working on this extension, I think this will be very useful. Excited if this can also work in Firefox!