mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-10 10:36:30 +00:00
LibWeb: Return DOMException instead of crashing when setting attributes
This commit is contained in:
committed by
Andreas Kling
parent
6891676fce
commit
5d3b7a5ecc
@@ -87,9 +87,9 @@ HTMLButtonElement::TypeAttributeState HTMLButtonElement::type_state() const
|
||||
return HTMLButtonElement::TypeAttributeState::Submit;
|
||||
}
|
||||
|
||||
void HTMLButtonElement::set_type(DeprecatedString const& type)
|
||||
WebIDL::ExceptionOr<void> HTMLButtonElement::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/interaction.html#dom-tabindex
|
||||
|
||||
Reference in New Issue
Block a user