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

LibWeb: Port AttributeNames to FlyString

This commit is contained in:
Shannon Booth 2023-10-08 11:42:00 +13:00 committed by Tim Flynn
parent 6a3f27509f
commit e4f8c59210
93 changed files with 148 additions and 149 deletions

View file

@ -61,7 +61,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> OptionConstructor::construct
// 4. If value is given, then set an attribute value for option using "value" and value.
if (vm.argument_count() > 1) {
auto value = TRY(vm.argument(1).to_deprecated_string(vm));
auto value = TRY(vm.argument(1).to_string(vm));
MUST(option_element->set_attribute(HTML::AttributeNames::value, value));
}
@ -69,7 +69,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> OptionConstructor::construct
if (vm.argument_count() > 2) {
auto default_selected = vm.argument(2).to_boolean();
if (default_selected) {
MUST(option_element->set_attribute(HTML::AttributeNames::selected, ""));
MUST(option_element->set_attribute(HTML::AttributeNames::selected, String {}));
}
}