mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 04:34: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
|
@ -105,10 +105,10 @@ DeprecatedString HTMLBaseElement::href() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/semantics.html#dom-base-href
|
||||
void HTMLBaseElement::set_href(DeprecatedString const& href)
|
||||
WebIDL::ExceptionOr<void> HTMLBaseElement::set_href(DeprecatedString const& href)
|
||||
{
|
||||
// The href IDL attribute, on setting, must set the href content attribute to the given new value.
|
||||
MUST(set_attribute(AttributeNames::href, href));
|
||||
return set_attribute(AttributeNames::href, href);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue