mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
LibWeb: Generate Element bindings from IDL :^)
Had to do a bunch more hacking on WrapperGenerator to support this. We now support attribute setters as well.
This commit is contained in:
parent
5eb39a5f61
commit
a64033e581
7 changed files with 103 additions and 289 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue