mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibWeb: Move DOMException from DOM/ to WebIDL/
This commit is contained in:
parent
ad04d7ac9b
commit
bbaa05fcf9
49 changed files with 206 additions and 203 deletions
|
@ -93,7 +93,7 @@ WebIDL::ExceptionOr<Attr const*> NamedNodeMap::remove_named_item(StringView qual
|
|||
|
||||
// 2. If attr is null, then throw a "NotFoundError" DOMException.
|
||||
if (!attribute)
|
||||
return NotFoundError::create(global_object(), String::formatted("Attribute with name '{}' not found", qualified_name));
|
||||
return WebIDL::NotFoundError::create(global_object(), String::formatted("Attribute with name '{}' not found", qualified_name));
|
||||
|
||||
// 3. Return attr.
|
||||
return nullptr;
|
||||
|
@ -137,7 +137,7 @@ WebIDL::ExceptionOr<Attr const*> NamedNodeMap::set_attribute(Attr& attribute)
|
|||
{
|
||||
// 1. If attr’s element is neither null nor element, throw an "InUseAttributeError" DOMException.
|
||||
if ((attribute.owner_element() != nullptr) && (attribute.owner_element() != &associated_element()))
|
||||
return InUseAttributeError::create(global_object(), "Attribute must not already be in use"sv);
|
||||
return WebIDL::InUseAttributeError::create(global_object(), "Attribute must not already be in use"sv);
|
||||
|
||||
// 2. Let oldAttr be the result of getting an attribute given attr’s namespace, attr’s local name, and element.
|
||||
// FIXME: When getNamedItemNS is implemented, use that instead.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue