1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibWeb: Use FlyString for create_element() namespace strings

This commit is contained in:
Andreas Kling 2023-11-04 09:46:23 +01:00
parent 8f82bd044b
commit f052823f5f
21 changed files with 65 additions and 64 deletions

View file

@ -43,7 +43,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> AudioConstructor::construct(
auto& document = window.associated_document();
// 2. Let audio be the result of creating an element given document, audio, and the HTML namespace.
auto audio = TRY(Bindings::throw_dom_exception_if_needed(vm, [&]() { return DOM::create_element(document, HTML::TagNames::audio, Namespace::HTML); }));
auto audio = TRY(Bindings::throw_dom_exception_if_needed(vm, [&]() { return DOM::create_element(document, HTML::TagNames::audio, MUST(FlyString::from_deprecated_fly_string(Namespace::HTML))); }));
// 3. Set an attribute value for audio using "preload" and "auto".
MUST(audio->set_attribute(HTML::AttributeNames::preload, "auto"_string));