diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-13 20:21:12 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-18 17:03:49 +0100 |
commit | e7a9f44df941ef41809ab833fdb5d2b07b8be823 (patch) | |
tree | 6d7771d0d5dcf896ae221b653e34e02ae1250ac2 /components/script/dom/domtokenlist.rs | |
parent | 6490d1e1c59c6de3d7ef030c209ad33e22bc6b26 (diff) | |
download | servo-e7a9f44df941ef41809ab833fdb5d2b07b8be823.tar.gz servo-e7a9f44df941ef41809ab833fdb5d2b07b8be823.zip |
Fix DOMStringMap's stringifier behaviour according to the spec
It should just return its associated attribute's value, if any.
https://github.com/whatwg/dom/issues/105
Diffstat (limited to 'components/script/dom/domtokenlist.rs')
-rw-r--r-- | components/script/dom/domtokenlist.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs index 6c1c931c407..dd7eb17ba74 100644 --- a/components/script/dom/domtokenlist.rs +++ b/components/script/dom/domtokenlist.rs @@ -12,7 +12,7 @@ use dom::bindings::reflector::{Reflector, reflect_dom_object}; use dom::element::Element; use dom::node::window_from_node; use string_cache::Atom; -use util::str::{DOMString, HTML_SPACE_CHARACTERS, str_join}; +use util::str::{DOMString, HTML_SPACE_CHARACTERS}; #[dom_struct] pub struct DOMTokenList { @@ -129,10 +129,9 @@ impl DOMTokenListMethods for DOMTokenList { } } - // https://dom.spec.whatwg.org/#stringification-behavior + // https://dom.spec.whatwg.org/#concept-dtl-serialize fn Stringifier(&self) -> DOMString { - let tokenlist = self.element.get_tokenlist_attribute(&self.local_name); - DOMString::from(str_join(&tokenlist, "\x20")) + self.element.get_string_attribute(&self.local_name) } // check-tidy: no specs after this line |