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

LibWeb: Set an attribute's owning element when it is known

This commit is contained in:
Timothy Flynn 2021-10-15 12:03:08 -04:00 committed by Linus Groh
parent e01dfaac9a
commit 454d218716
3 changed files with 7 additions and 6 deletions

View file

@ -82,7 +82,7 @@ ExceptionOr<void> Element::set_attribute(const FlyString& name, const String& va
if (auto* attribute = find_attribute(name))
attribute->set_value(value);
else
m_attributes.append(Attribute::create(document(), name, value));
m_attributes.append(Attribute::create(document(), name, value, this));
parse_attribute(name, value);
return {};