1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:58:11 +00:00

LibWeb: Add HTMLElement wrapper

Expose the "title" attribute just to expose something. :^)
This commit is contained in:
Andreas Kling 2020-06-21 14:35:00 +02:00
parent 244b243d22
commit 1914f52371
10 changed files with 36 additions and 14 deletions

View file

@ -32,10 +32,13 @@ namespace Web {
class HTMLElement : public Element {
public:
using WrapperType = Bindings::HTMLElementWrapper;
HTMLElement(Document&, const FlyString& tag_name);
virtual ~HTMLElement() override;
String title() const { return attribute(HTML::AttributeNames::title); }
void set_title(const String& value) { set_attribute(HTML::AttributeNames::title, value); }
private:
virtual bool is_html_element() const final { return true; }