mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibWeb: Implement the Element classList attribute
And ensure it is updated (if it exists) when the 'class' attribute is changed.
This commit is contained in:
parent
d24ae8063b
commit
14349f058a
3 changed files with 14 additions and 0 deletions
|
@ -58,6 +58,8 @@ public:
|
|||
size_t attribute_list_size() const { return m_attributes->length(); }
|
||||
NonnullRefPtr<NamedNodeMap> const& attributes() const { return m_attributes; }
|
||||
|
||||
RefPtr<DOMTokenList> const& class_list();
|
||||
|
||||
DOM::ExceptionOr<bool> matches(StringView selectors) const;
|
||||
|
||||
int client_top() const;
|
||||
|
@ -140,6 +142,7 @@ private:
|
|||
RefPtr<CSS::StyleProperties> m_specified_css_values;
|
||||
HashMap<String, CSS::StyleComputer::CustomPropertyResolutionTuple> m_custom_properties;
|
||||
|
||||
RefPtr<DOMTokenList> m_class_list;
|
||||
Vector<FlyString> m_classes;
|
||||
|
||||
RefPtr<ShadowRoot> m_shadow_root;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue