diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-24 13:25:42 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-24 13:25:42 +0200 |
commit | d1fdc1a2cfdb6dc2992a8690cbc5f9a082c7fc1a (patch) | |
tree | 363aeb3b1f80567792173504d520629c00271a68 /Libraries | |
parent | 8f31331e685db26a85b01cf3d0d12c7939b2370a (diff) | |
download | serenity-d1fdc1a2cfdb6dc2992a8690cbc5f9a082c7fc1a.zip |
LibWeb: Use [Reflect] for Element.id and Element.className :^)
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/DOM/Element.h | 6 | ||||
-rw-r--r-- | Libraries/LibWeb/DOM/Element.idl | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/Libraries/LibWeb/DOM/Element.h b/Libraries/LibWeb/DOM/Element.h index b99edfd74e..f9b6f3e70c 100644 --- a/Libraries/LibWeb/DOM/Element.h +++ b/Libraries/LibWeb/DOM/Element.h @@ -84,12 +84,6 @@ 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); } - - String class_name() const { return attribute(HTML::AttributeNames::class_); } - void set_class_name(const String& value) { set_attribute(HTML::AttributeNames::class_, value); } - protected: RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) override; diff --git a/Libraries/LibWeb/DOM/Element.idl b/Libraries/LibWeb/DOM/Element.idl index f2d9d3cba3..b9495a23c8 100644 --- a/Libraries/LibWeb/DOM/Element.idl +++ b/Libraries/LibWeb/DOM/Element.idl @@ -6,8 +6,8 @@ interface Element : Node { void setAttribute(DOMString qualifiedName, DOMString value); attribute DOMString innerHTML; - attribute DOMString id; - attribute DOMString className; + [Reflect] attribute DOMString id; + [Reflect=class] attribute DOMString className; } |