mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibWeb: Add Element.tagName and Element.className
This commit is contained in:
parent
a64033e581
commit
a014b2930e
2 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,9 @@ public:
|
||||||
String id() const { return attribute(HTML::AttributeNames::id); }
|
String id() const { return attribute(HTML::AttributeNames::id); }
|
||||||
void set_id(const String& value) { set_attribute(HTML::AttributeNames::id, value); }
|
void set_id(const String& value) { set_attribute(HTML::AttributeNames::id, value); }
|
||||||
|
|
||||||
|
String class_name() const { return attribute(HTML::AttributeNames::class_); }
|
||||||
|
void set_class_name(const String& value) { set_attribute(HTML::AttributeNames::class_, value); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
|
RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
interface Element : Node {
|
interface Element : Node {
|
||||||
|
|
||||||
|
readonly attribute DOMString tagName;
|
||||||
|
|
||||||
DOMString? getAttribute(DOMString qualifiedName);
|
DOMString? getAttribute(DOMString qualifiedName);
|
||||||
void setAttribute(DOMString qualifiedName, DOMString value);
|
void setAttribute(DOMString qualifiedName, DOMString value);
|
||||||
|
|
||||||
attribute DOMString innerHTML;
|
attribute DOMString innerHTML;
|
||||||
attribute DOMString id;
|
attribute DOMString id;
|
||||||
|
attribute DOMString className;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue