mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Return DOMException instead of crashing when setting attributes
This commit is contained in:
committed by
Andreas Kling
parent
6891676fce
commit
5d3b7a5ecc
@@ -554,9 +554,9 @@ DeprecatedString HTMLInputElement::type() const
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void HTMLInputElement::set_type(DeprecatedString const& type)
|
||||
WebIDL::ExceptionOr<void> HTMLInputElement::set_type(DeprecatedString const& type)
|
||||
{
|
||||
MUST(set_attribute(HTML::AttributeNames::type, type));
|
||||
return set_attribute(HTML::AttributeNames::type, type);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-simple-colour
|
||||
|
||||
Reference in New Issue
Block a user