mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:18:14 +00:00
LibWeb: Support more advanced selectors in document.querySelectorAll()
I made some mistakes in the selector parsing code. It's now able to parse selectors composed of multiple complex selectors, instead of just one complex selector.
This commit is contained in:
parent
c1c56b1131
commit
06aec9667e
4 changed files with 21 additions and 17 deletions
|
@ -315,6 +315,8 @@ NonnullRefPtrVector<Element> Document::query_selector_all(const StringView& sele
|
|||
if (!selector.has_value())
|
||||
return {};
|
||||
|
||||
dump_selector(selector.value());
|
||||
|
||||
NonnullRefPtrVector<Element> elements;
|
||||
for_each_in_subtree_of_type<Element>([&](auto& element) {
|
||||
if (SelectorEngine::matches(selector.value(), element)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue