Add overridable tree binding/unbinding behaviour.

This commit is contained in:
Josh Matthews 2014-02-13 08:50:28 +05:30 committed by Ms2ger
parent f5d1907195
commit 6388dec996
3 changed files with 39 additions and 10 deletions

View file

@ -727,4 +727,22 @@ impl VirtualMethods for JS<Element> {
self.notify_attribute_changed(name);
}
fn bind_to_tree(&mut self) {
match self.super_type() {
Some(ref mut s) => s.bind_to_tree(),
_ => (),
}
self.bind_to_tree_impl();
}
fn unbind_from_tree(&mut self) {
match self.super_type() {
Some(ref mut s) => s.unbind_from_tree(),
_ => (),
}
self.unbind_from_tree_impl();
}
}