1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibWeb: Make factory method of DOM::StaticNodeList fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 07:44:06 +01:00 committed by Linus Groh
parent d94b59263e
commit 2411dadc35
5 changed files with 28 additions and 12 deletions

View file

@ -71,7 +71,9 @@ WebIDL::ExceptionOr<void> CharacterData::replace_data(size_t offset, size_t coun
count = length - offset;
// 4. Queue a mutation record of "characterData" for node with null, null, nodes data, « », « », null, and null.
queue_mutation_record(MutationType::characterData, {}, {}, m_data, StaticNodeList::create(realm(), {}), StaticNodeList::create(realm(), {}), nullptr, nullptr);
auto added_node_list = TRY(StaticNodeList::create(realm(), {}));
auto removed_node_list = TRY(StaticNodeList::create(realm(), {}));
queue_mutation_record(MutationType::characterData, {}, {}, m_data, added_node_list, removed_node_list, nullptr, nullptr);
// 5. Insert data into nodes data after offset code units.
// 6. Let delete offset be offset + datas length.