1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 17:45:07 +00:00

LibWeb: Return DOMException instead of crashing when setting attributes

This commit is contained in:
PrestonLTaylor 2023-05-25 20:37:57 +01:00 committed by Andreas Kling
parent 6891676fce
commit 5d3b7a5ecc
24 changed files with 57 additions and 51 deletions

View file

@ -440,10 +440,10 @@ DeprecatedString HTMLHyperlinkElementUtils::href() const
}
// https://html.spec.whatwg.org/multipage/links.html#dom-hyperlink-href
void HTMLHyperlinkElementUtils::set_href(DeprecatedString href)
WebIDL::ExceptionOr<void> HTMLHyperlinkElementUtils::set_href(DeprecatedString href)
{
// The href attribute's setter must set this element's href content attribute's value to the given value.
set_hyperlink_element_utils_href(move(href));
return set_hyperlink_element_utils_href(move(href));
}
// https://html.spec.whatwg.org/multipage/links.html#update-href