mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibWeb: Use [Reflect] for Element.id and Element.className :^)
This commit is contained in:
parent
8f31331e68
commit
d1fdc1a2cf
Notes:
sideshowbarker
2024-07-19 04:38:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d1fdc1a2cfd
2 changed files with 2 additions and 8 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue