mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 07:37:03 +00:00
LibWeb: Make factory method of DOM::StaticNodeList fallible
This commit is contained in:
parent
d94b59263e
commit
2411dadc35
Notes:
sideshowbarker
2024-07-17 00:11:56 +09:00
Author: https://github.com/kennethmyhra
Commit: 2411dadc35
Pull-request: https://github.com/SerenityOS/serenity/pull/17491
Reviewed-by: https://github.com/linusg ✅
5 changed files with 28 additions and 12 deletions
|
@ -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, node’s 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 node’s data after offset code units.
|
||||
// 6. Let delete offset be offset + data’s length.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue