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

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. :^)
This commit is contained in:
Andreas Kling 2020-06-03 20:51:28 +02:00
parent ff55d00261
commit 2149820260
16 changed files with 71 additions and 43 deletions

View file

@ -35,8 +35,8 @@ public:
HTMLAnchorElement(Document&, const FlyString& tag_name);
virtual ~HTMLAnchorElement() override;
String href() const { return attribute("href"); }
String target() const { return attribute("target"); }
String href() const { return attribute(HTML::AttributeNames::href); }
String target() const { return attribute(HTML::AttributeNames::target); }
};
template<>