1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:18:11 +00:00

LibWeb: Handle currently ignored WebIDL::ExceptionOr<T>s

This commit is contained in:
Linus Groh 2022-10-30 17:50:04 +00:00
parent f01d90aa63
commit acfb546048
38 changed files with 153 additions and 149 deletions

View file

@ -45,7 +45,7 @@ JS::ThrowCompletionOr<JS::Object*> AudioConstructor::construct(FunctionObject&)
auto audio = DOM::create_element(document, HTML::TagNames::audio, Namespace::HTML);
// 3. Set an attribute value for audio using "preload" and "auto".
audio->set_attribute(HTML::AttributeNames::preload, "auto"sv);
MUST(audio->set_attribute(HTML::AttributeNames::preload, "auto"sv));
auto src_value = vm.argument(0);
@ -53,7 +53,7 @@ JS::ThrowCompletionOr<JS::Object*> AudioConstructor::construct(FunctionObject&)
// (This will cause the user agent to invoke the object's resource selection algorithm before returning.)
if (!src_value.is_undefined()) {
auto src = TRY(src_value.to_string(vm));
audio->set_attribute(HTML::AttributeNames::src, move(src));
MUST(audio->set_attribute(HTML::AttributeNames::src, move(src)));
}
// 5. Return audio.