LibWeb: Move DOMException from DOM/ to WebIDL/

This commit is contained in:
Linus Groh 2022-09-25 17:28:46 +01:00
parent ad04d7ac9b
commit bbaa05fcf9
Notes: sideshowbarker 2024-07-17 06:38:09 +09:00
49 changed files with 206 additions and 203 deletions

View file

@ -43,7 +43,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLTableRowElement>> HTMLTableSectionEleme
// 1. If index is less than 1 or greater than the number of elements in the rows collection, throw an "IndexSizeError" DOMException.
if (index < -1 || index > rows_collection_size)
return DOM::IndexSizeError::create(global_object(), "Index is negative or greater than the number of rows");
return WebIDL::IndexSizeError::create(global_object(), "Index is negative or greater than the number of rows");
// 2. Let table row be the result of creating an element given this element's node document, tr, and the HTML namespace.
auto& table_row = static_cast<HTMLTableRowElement&>(*DOM::create_element(document(), TagNames::tr, Namespace::HTML));
@ -67,7 +67,7 @@ WebIDL::ExceptionOr<void> HTMLTableSectionElement::delete_row(long index)
// 1. If index is less than 1 or greater than or equal to the number of elements in the rows collection, then throw an "IndexSizeError" DOMException.
if (index < -1 || index >= rows_collection_size)
return DOM::IndexSizeError::create(global_object(), "Index is negative or greater than or equal to the number of rows");
return WebIDL::IndexSizeError::create(global_object(), "Index is negative or greater than or equal to the number of rows");
// 2. If index is 1, then remove the last element in the rows collection from this element, or do nothing if the rows collection is empty.
if (index == -1) {