diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-03 20:51:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-03 21:53:00 +0200 |
commit | 214982026080f411ea38e1dbb1a51186d10362fe (patch) | |
tree | e085f127f47bc49a751b03efa66b1907a37889cf /Libraries/LibWeb/DOM/HTMLElement.h | |
parent | ff55d00261adc0add19e910b33896eacd33b0ec2 (diff) | |
download | serenity-214982026080f411ea38e1dbb1a51186d10362fe.zip |
LibWeb: Use HTML::AttributeNames::foo instead of FlyString("foo")
To avoid the costly instantiation of FlyStrings whenever we're looking
up attributes, use the premade HTML::AttributeNames globals. :^)
Diffstat (limited to 'Libraries/LibWeb/DOM/HTMLElement.h')
-rw-r--r-- | Libraries/LibWeb/DOM/HTMLElement.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/DOM/HTMLElement.h b/Libraries/LibWeb/DOM/HTMLElement.h index e99f5f5254..42c9fa2ffa 100644 --- a/Libraries/LibWeb/DOM/HTMLElement.h +++ b/Libraries/LibWeb/DOM/HTMLElement.h @@ -35,7 +35,7 @@ public: HTMLElement(Document&, const FlyString& tag_name); virtual ~HTMLElement() override; - String title() const { return attribute("title"); } + String title() const { return attribute(HTML::AttributeNames::title); } private: virtual bool is_html_element() const final { return true; } |