summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
diff options
context:
space:
mode:
authorPrestonLTaylor <95388976+PrestonLTaylor@users.noreply.github.com>2023-05-25 20:37:57 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-26 05:23:09 +0200
commit5d3b7a5ecca912ca1ebba379bc076492e7c565b5 (patch)
treead1f4b16ab284b9e61adf6662440bb7dc27758e2 /Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
parent6891676fceb1ae8aab849c0c48fd96868777adf4 (diff)
downloadserenity-5d3b7a5ecca912ca1ebba379bc076492e7c565b5.zip
LibWeb: Return DOMException instead of crashing when setting attributes
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
index 2ec5e4c762..c8344fcd3a 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
@@ -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