Email or username:

Password:

Forgot your password?
FirefoxDevTools

Inflation strikes again, but this time you might actually like it!

The console input already had `$(selector)` (alias for `document.querySelector(selector)`) and `$$(selector)` (~ `Array.from(document.querySelectorAll(selector))`)

In @firefoxnightly (135), there is now a `$$$(selector)` helper, that returns an array of elements matching the selector, including those in the ShadowDOM.

Hopefully this will make working with Web Components a bit easier 🙂

2 comments
Kilian Valkhof

@FirefoxDevTools @firefoxnightly does it scope the selector to rootNodes or also cross the shadow boundary?

(eg will "div p" match a div>web-c>p?)

FirefoxDevTools

@Kilian @firefoxnightly the selector is scoped to the root node, so it doesn't cross the shadow boundary. It would be interesting to do it, but might be a bit complex, especially with things like :has()

Go Up