1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

LibWeb: Move ExceptionOr from DOM/ to WebIDL/

This is a concept fully defined in the Web IDL spec and doesn't belong
in the DOM directory/namespace - not even DOMException, despite the name
:^)
This commit is contained in:
Linus Groh 2022-09-25 17:03:42 +01:00
parent c0eda77928
commit ad04d7ac9b
107 changed files with 441 additions and 440 deletions

View file

@ -80,13 +80,13 @@ Attr const* NamedNodeMap::get_named_item(StringView qualified_name) const
}
// https://dom.spec.whatwg.org/#dom-namednodemap-setnameditem
ExceptionOr<Attr const*> NamedNodeMap::set_named_item(Attr& attribute)
WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_named_item(Attr& attribute)
{
return set_attribute(attribute);
}
// https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
ExceptionOr<Attr const*> NamedNodeMap::remove_named_item(StringView qualified_name)
WebIDL::ExceptionOr<Attr const*> NamedNodeMap::remove_named_item(StringView qualified_name)
{
// 1. Let attr be the result of removing an attribute given qualifiedName and element.
auto const* attribute = remove_attribute(qualified_name);
@ -133,7 +133,7 @@ Attr const* NamedNodeMap::get_attribute(StringView qualified_name, size_t* item_
}
// https://dom.spec.whatwg.org/#concept-element-attributes-set
ExceptionOr<Attr const*> NamedNodeMap::set_attribute(Attr& attribute)
WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_attribute(Attr& attribute)
{
// 1. If attrs element is neither null nor element, throw an "InUseAttributeError" DOMException.
if ((attribute.owner_element() != nullptr) && (attribute.owner_element() != &associated_element()))