mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
LibWeb: Make factory method of DOM::ElementFactory fallible
This commit is contained in:
parent
a2381a672d
commit
ff92324fa5
Notes:
sideshowbarker
2024-07-16 23:53:14 +09:00
Author: https://github.com/kennethmyhra
Commit: ff92324fa5
Pull-request: https://github.com/SerenityOS/serenity/pull/17542
15 changed files with 115 additions and 111 deletions
|
@ -112,7 +112,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLTableCellElement>> HTMLTableRowElement:
|
|||
return WebIDL::IndexSizeError::create(realm(), "Index is negative or greater than the number of cells");
|
||||
|
||||
// 2. Let table cell be the result of creating an element given this tr element's node document, td, and the HTML namespace.
|
||||
auto& table_cell = static_cast<HTMLTableCellElement&>(*DOM::create_element(document(), HTML::TagNames::td, Namespace::HTML));
|
||||
auto& table_cell = static_cast<HTMLTableCellElement&>(*TRY(DOM::create_element(document(), HTML::TagNames::td, Namespace::HTML)));
|
||||
|
||||
// 3. If index is equal to −1 or equal to the number of items in cells collection, then append table cell to this tr element.
|
||||
if (index == -1 || index == cells_collection_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue