Add support for dynamic bgcolor change

This commit is contained in:
Stuart Nelson 2017-10-05 10:41:49 +02:00
parent f2879a568d
commit 3b4deb4388
4 changed files with 52 additions and 0 deletions

View file

@ -125,6 +125,14 @@ impl VirtualMethods for HTMLBodyElement {
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool {
if attr.local_name() == &local_name!("bgcolor") {
return true;
}
self.super_type().unwrap().attribute_affects_presentational_hints(attr)
}
fn bind_to_tree(&self, tree_in_doc: bool) {
if let Some(ref s) = self.super_type() {
s.bind_to_tree(tree_in_doc);