1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibWeb: Port Element::set_attribute_value from ByteString

Also making set_attribute_ns take a String instead of a FlyString as
this is only used as an Attr value and no FlyString properties are used.
This commit is contained in:
Shannon Booth 2024-01-03 12:47:38 +13:00 committed by Andreas Kling
parent 285bca1633
commit fa1ef30985
3 changed files with 8 additions and 8 deletions

View file

@ -659,7 +659,7 @@ void ConnectionFromClient::set_dom_node_tag(i32 node_id, String const& name)
auto new_element = Web::DOM::create_element(element.document(), name, element.namespace_uri(), element.prefix(), element.is_value()).release_value_but_fixme_should_propagate_errors();
element.for_each_attribute([&](auto const& attribute) {
new_element->set_attribute_value(attribute.local_name(), attribute.value().to_byte_string(), attribute.prefix(), attribute.namespace_uri());
new_element->set_attribute_value(attribute.local_name(), attribute.value(), attribute.prefix(), attribute.namespace_uri());
});
while (auto* child_node = element.first_child()) {