mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibHTML: Implement some attribute selector support
This patch adds a[foo] and a[foo=bar] attribute selectors. Note that an attribute selector is an optional part of a selector component, and not a component on its own.
This commit is contained in:
parent
54a6ae9201
commit
8946e50986
6 changed files with 115 additions and 8 deletions
|
@ -33,6 +33,16 @@ public:
|
|||
Relation relation { Relation::None };
|
||||
|
||||
String value;
|
||||
|
||||
enum class AttributeMatchType {
|
||||
None,
|
||||
HasAttribute,
|
||||
ExactValueMatch,
|
||||
};
|
||||
|
||||
AttributeMatchType attribute_match_type { AttributeMatchType::None };
|
||||
String attribute_name;
|
||||
String attribute_value;
|
||||
};
|
||||
|
||||
explicit Selector(Vector<Component>&&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue