LibHTML: Implement the universal selector ("*")

This commit is contained in:
Andreas Kling 2019-11-19 18:22:12 +01:00
parent 516708aab2
commit 56dad2272c
Notes: sideshowbarker 2024-07-19 11:08:31 +09:00
4 changed files with 12 additions and 0 deletions

View file

@ -224,6 +224,12 @@ public:
consume_whitespace_or_comments();
}
if (peek() == '*') {
type = Selector::Component::Type::Universal;
consume_one();
return Selector::Component { type, Selector::Component::PseudoClass::None, relation, String() };
}
if (peek() == '.') {
type = Selector::Component::Type::Class;
consume_one();