Add insertRule() and deleteRule() on CSSStyleSheet

This commit is contained in:
Manish Goregaokar 2016-11-15 15:41:29 -08:00
parent c4b7cc863e
commit 1d20d75cb2
5 changed files with 160 additions and 10 deletions

View file

@ -73,6 +73,12 @@ impl CSSRule {
StyleCssRule::Viewport(s) => Root::upcast(CSSViewportRule::new(window, parent, s)),
}
}
/// Sets owner sheet/rule to null
pub fn disown(&self) {
self.parent.set(None);
// should set parent rule to None when we add parent rule support
}
}
impl CSSRuleMethods for CSSRule {