mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 20:04:59 +00:00
LibWeb: Return DOMException instead of crashing when setting attributes
This commit is contained in:
parent
6891676fce
commit
5d3b7a5ecc
24 changed files with 57 additions and 51 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue