Fix "a serious bug" in the bind_to_tree functions

This commit is contained in:
Michael Howell 2016-12-06 00:42:29 +00:00
parent 479a2c1217
commit f8121ae60d
2 changed files with 9 additions and 3 deletions

View file

@ -71,7 +71,10 @@ impl VirtualMethods for HTMLHeadElement {
fn super_type(&self) -> Option<&VirtualMethods> {
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
fn bind_to_tree(&self, _tree_in_doc: bool) {
fn bind_to_tree(&self, tree_in_doc: bool) {
if let Some(ref s) = self.super_type() {
s.bind_to_tree(tree_in_doc);
}
load_script(self);
}
}