1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +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

@ -2677,14 +2677,14 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::@attribute.setter_callback@)
if (attribute.extended_attributes.contains("Reflect")) {
if (attribute.type->name() != "boolean") {
attribute_generator.append(R"~~~(
impl->set_attribute(HTML::AttributeNames::@attribute.reflect_name@, cpp_value);
MUST(impl->set_attribute(HTML::AttributeNames::@attribute.reflect_name@, cpp_value));
)~~~");
} else {
attribute_generator.append(R"~~~(
if (!cpp_value)
impl->remove_attribute(HTML::AttributeNames::@attribute.reflect_name@);
else
impl->set_attribute(HTML::AttributeNames::@attribute.reflect_name@, String::empty());
MUST(impl->set_attribute(HTML::AttributeNames::@attribute.reflect_name@, String::empty()));
)~~~");
}
} else {