mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Implement MutationObserver.disconnect()
This commit is contained in:
parent
2c9ef9e558
commit
5bfa819038
7 changed files with 25 additions and 15 deletions
|
@ -392,6 +392,13 @@ impl Node {
|
|||
self.mutation_observers.borrow_mut()
|
||||
}
|
||||
|
||||
/// Removes the mutation observer for a given node.
|
||||
pub fn remove_mutation_observer(&self, observer: &MutationObserver) {
|
||||
self.mutation_observers.borrow_mut().retain(|reg_obs| {
|
||||
&*reg_obs.observer != observer
|
||||
})
|
||||
}
|
||||
|
||||
/// Dumps the subtree rooted at this node, for debugging.
|
||||
pub fn dump(&self) {
|
||||
self.dump_indent(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue