Make Node and Element rare_data an Option

This commit is contained in:
Fernando Jiménez Moreno 2019-03-08 17:03:34 +01:00
parent f6069630d2
commit 6bf1ca20a2
8 changed files with 181 additions and 120 deletions

View file

@ -318,20 +318,18 @@ impl MutationObserverMethods for MutationObserver {
// Step 8
if add_new_observer {
target
.registered_mutation_observers()
.push(RegisteredObserver {
observer: DomRoot::from_ref(self),
options: ObserverOptions {
attributes,
attribute_old_value,
character_data,
character_data_old_value,
subtree,
attribute_filter,
child_list,
},
});
target.add_mutation_observer(RegisteredObserver {
observer: DomRoot::from_ref(self),
options: ObserverOptions {
attributes,
attribute_old_value,
character_data,
character_data_old_value,
subtree,
attribute_filter,
child_list,
},
});
self.node_list.borrow_mut().push(DomRoot::from_ref(target));
}