mirror of
https://github.com/RGBCube/serenity
synced 2025-07-01 11:22:12 +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:
parent
ff55d00261
commit
2149820260
16 changed files with 71 additions and 43 deletions
|
@ -388,7 +388,7 @@ static RefPtr<Document> create_image_document(const ByteBuffer& data, const URL&
|
|||
html_element->append_child(body_element);
|
||||
|
||||
auto image_element = create_element(document, "img");
|
||||
image_element->set_attribute("src", url.to_string());
|
||||
image_element->set_attribute(HTML::AttributeNames::src, url.to_string());
|
||||
body_element->append_child(image_element);
|
||||
|
||||
return document;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue