Add a style property to HTMLElement.

This commit is contained in:
Josh Matthews 2014-09-18 15:34:55 -04:00
parent 2cfa8e85a6
commit 2e14b653bf
5 changed files with 62 additions and 9 deletions

View file

@ -4,8 +4,8 @@
use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods;
use dom::bindings::error::{ErrorResult, Fallible};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::bindings::js::JSRef;
use dom::bindings::utils::{Reflectable, Reflector};
use servo_util::str::DOMString;
use string_cache::atom::Atom;
use std::ascii::AsciiExt;
@ -44,6 +44,14 @@ fn get_declaration(_property: &Atom) -> Option<Declaration> {
None
}
impl CSSStyleDeclaration {
pub fn new_inherited() -> CSSStyleDeclaration {
CSSStyleDeclaration {
reflector_: Reflector::new()
}
}
}
impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
fn CssText(self) -> DOMString {
"".to_string()