mirror of
https://github.com/servo/servo.git
synced 2025-10-18 09:19:16 +01:00
Implement Element.className
This commit is contained in:
parent
3933d17262
commit
6274ecba07
6 changed files with 50 additions and 14 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue