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
commit 1914f52371
Notes: sideshowbarker 2024-07-19 05:29:36 +09:00
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; }