diff options
author | bors-servo <release+servo@mozilla.com> | 2014-03-15 05:47:18 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-03-15 05:47:18 -0400 |
commit | 508fe57f8dc4cedf9f4035b4e6311bf97d674adb (patch) | |
tree | 6727c622bb06fe772303d0cca880afe01a3a8f2a /src/components/script/dom/element.rs | |
parent | 06e22f13aef66e0f221d872dc007f0141057e33a (diff) | |
parent | 6274ecba07a8570d6bb7f2296fb549fb48faba1b (diff) | |
download | servo-508fe57f8dc4cedf9f4035b4e6311bf97d674adb.tar.gz servo-508fe57f8dc4cedf9f4035b4e6311bf97d674adb.zip |
auto merge of #1907 : brunoabinader/servo/element-classname, r=Ms2ger
Removes stub implementation from HTMLElement & implements logic in Element WebIDL.
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 { |