diff options
Diffstat (limited to 'src/components/script/dom/element.rs')
-rw-r--r-- | src/components/script/dom/element.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs index df9ecb20430..55cec200304 100644 --- a/src/components/script/dom/element.rs +++ b/src/components/script/dom/element.rs @@ -430,6 +430,16 @@ impl Element { self.set_string_attribute(abstract_self, "id", id); } + // http://dom.spec.whatwg.org/#dom-element-classname + pub fn ClassName(&self, _abstract_self: &JS<Element>) -> DOMString { + self.get_string_attribute("class") + } + + // http://dom.spec.whatwg.org/#dom-element-classname + pub fn SetClassName(&mut self, abstract_self: &JS<Element>, class: DOMString) { + self.set_string_attribute(abstract_self, "class", class); + } + // http://dom.spec.whatwg.org/#dom-element-attributes pub fn Attributes(&mut self, abstract_self: &JS<Element>) -> JS<AttrList> { match self.attr_list { |