diff options
Diffstat (limited to 'Libraries/LibWeb/DOM/Element.h')
-rw-r--r-- | Libraries/LibWeb/DOM/Element.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index 547b6b21e3..70f93dbdc5 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -50,6 +50,7 @@ public: bool has_attribute(const FlyString& name) const { return !attribute(name).is_null(); } String attribute(const FlyString& name) const; + String get_attribute(const FlyString& name) const { return attribute(name); } void set_attribute(const FlyString& name, const String& value); void set_attributes(Vector<Attribute>&&); @@ -80,6 +81,9 @@ public: String inner_html() const; void set_inner_html(StringView); + String id() const { return attribute(HTML::AttributeNames::id); } + void set_id(const String& value) { set_attribute(HTML::AttributeNames::id, value); } + protected: RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override; |