diff options
author | Luke Wilde <lukew@serenityos.org> | 2022-07-11 16:39:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-11 22:35:08 +0200 |
commit | 1ca8782c99ac5c0578b759d7a331673508cedc54 (patch) | |
tree | c06d9118bd38858c5bda9fa0af49021c1982ab87 /Userland/Libraries | |
parent | 56cfd5ced85f5a8332a9788ed6b0306742abc48b (diff) | |
download | serenity-1ca8782c99ac5c0578b759d7a331673508cedc54.zip |
LibWeb: Implement "characterData" mutation record for MutationObserver
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/CharacterData.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp index aaf5e79e6f..ab1e134271 100644 --- a/Userland/Libraries/LibWeb/DOM/CharacterData.cpp +++ b/Userland/Libraries/LibWeb/DOM/CharacterData.cpp @@ -6,7 +6,9 @@ #include <LibWeb/DOM/CharacterData.h> #include <LibWeb/DOM/Document.h> +#include <LibWeb/DOM/MutationType.h> #include <LibWeb/DOM/Range.h> +#include <LibWeb/DOM/StaticNodeList.h> namespace Web::DOM { @@ -59,7 +61,8 @@ ExceptionOr<void> CharacterData::replace_data(size_t offset, size_t count, Strin if (offset + count > length) count = length - offset; - // FIXME: 4. Queue a mutation record of "characterData" for node with null, null, node’s data, « », « », null, and null. + // 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({}), StaticNodeList::create({}), nullptr, nullptr); // 5. Insert data into node’s data after offset code units. // 6. Let delete offset be offset + data’s length. |