1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibWeb: Port MutationObserver interface from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-09-06 14:28:15 +12:00 committed by Tim Flynn
parent 8531d11fab
commit 0ce5a920f7
3 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ struct MutationObserverInit {
bool subtree { false };
Optional<bool> attribute_old_value;
Optional<bool> character_data_old_value;
Optional<Vector<DeprecatedString>> attribute_filter;
Optional<Vector<String>> attribute_filter;
};
// https://dom.spec.whatwg.org/#mutationobserver

View file

@ -1,7 +1,7 @@
#import <DOM/MutationRecord.idl>
#import <DOM/Node.idl>
[Exposed=Window, UseDeprecatedAKString]
[Exposed=Window]
interface MutationObserver {
constructor(MutationCallback callback);

View file

@ -1502,7 +1502,7 @@ void Node::queue_mutation_record(FlyString const& type, DeprecatedString attribu
// then:
if (!(node.ptr() != this && !options.subtree)
&& !(type == MutationType::attributes && (!options.attributes.has_value() || !options.attributes.value()))
&& !(type == MutationType::attributes && options.attribute_filter.has_value() && (!attribute_namespace.is_null() || !options.attribute_filter->contains_slow(attribute_name)))
&& !(type == MutationType::attributes && options.attribute_filter.has_value() && (!attribute_namespace.is_null() || !options.attribute_filter->contains_slow(attribute_name.view())))
&& !(type == MutationType::characterData && (!options.character_data.has_value() || !options.character_data.value()))
&& !(type == MutationType::childList && !options.child_list)) {
// 1. Let mo be registereds observer.