mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Port DOMException interface from DeprecatedString to String
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/41928c2902 Pull-request: https://github.com/SerenityOS/serenity/pull/20968
@@ -54,7 +54,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 WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of rows");
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of rows"_fly_string);
|
||||
|
||||
// 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&>(*TRY(DOM::create_element(document(), TagNames::tr, Namespace::HTML)));
|
||||
@@ -78,7 +78,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 WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of rows");
|
||||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than or equal to the number of rows"_fly_string);
|
||||
|
||||
// 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) {
|
||||
|
||||
Reference in New Issue
Block a user