Provide a console tool to easily search the page including the shadow roots
Categories
(DevTools :: Console, enhancement, P2)
Tracking
(firefox135 fixed)
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: julienw, Assigned: nchevobbe, Mentored)
Details
Attachments
(1 file)
Currently looking into shadow roots isn't straightforward from the Web Console. It should be easier.
Comment 1•1 year ago
|
||
$$$ would be cool. If not supported via a secret chrome-only API, it can be implemented in js, but this needs manually looping on the elements to find the shadow root, and then recurse inside the shadow dom.
Comment 2•11 months ago
|
||
Could be useful to end users and firefox engineers.
Nicolas is offering to mentor this one, not an easy bug but should be doable with guidance.
Comment 3•11 months ago
|
||
To register a new console command, you can copy the existing implementation of $$:
https://searchfox.org/mozilla-central/rev/55837bbe3e47f9b4fa91ef83a44b53823626f01d/devtools/server/actors/webconsole/commands/manager.js#471-509
and you should get a new console command working out of the box.
| Assignee | ||
Comment 4•11 months ago
|
||
This is based on $$ but extends it so it also look for potential matches in
the shadow DOM, recursively.
A test is added, as well as some documentation for the helper.
Updated•11 months ago
|
Description
•