mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibWeb: Port MutationObserver interface from DeprecatedString to String
This commit is contained in:
parent
8531d11fab
commit
0ce5a920f7
3 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ struct MutationObserverInit {
|
||||||
bool subtree { false };
|
bool subtree { false };
|
||||||
Optional<bool> attribute_old_value;
|
Optional<bool> attribute_old_value;
|
||||||
Optional<bool> character_data_old_value;
|
Optional<bool> character_data_old_value;
|
||||||
Optional<Vector<DeprecatedString>> attribute_filter;
|
Optional<Vector<String>> attribute_filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#mutationobserver
|
// https://dom.spec.whatwg.org/#mutationobserver
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#import <DOM/MutationRecord.idl>
|
#import <DOM/MutationRecord.idl>
|
||||||
#import <DOM/Node.idl>
|
#import <DOM/Node.idl>
|
||||||
|
|
||||||
[Exposed=Window, UseDeprecatedAKString]
|
[Exposed=Window]
|
||||||
interface MutationObserver {
|
interface MutationObserver {
|
||||||
|
|
||||||
constructor(MutationCallback callback);
|
constructor(MutationCallback callback);
|
||||||
|
|
|
@ -1502,7 +1502,7 @@ void Node::queue_mutation_record(FlyString const& type, DeprecatedString attribu
|
||||||
// then:
|
// then:
|
||||||
if (!(node.ptr() != this && !options.subtree)
|
if (!(node.ptr() != this && !options.subtree)
|
||||||
&& !(type == MutationType::attributes && (!options.attributes.has_value() || !options.attributes.value()))
|
&& !(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::characterData && (!options.character_data.has_value() || !options.character_data.value()))
|
||||||
&& !(type == MutationType::childList && !options.child_list)) {
|
&& !(type == MutationType::childList && !options.child_list)) {
|
||||||
// 1. Let mo be registered’s observer.
|
// 1. Let mo be registered’s observer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue