mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Split class names using split_html_space_chars helper function
This commit is contained in:
parent
594df4d696
commit
943743195f
2 changed files with 4 additions and 5 deletions
|
@ -10,7 +10,7 @@ use dom::element::{Element, AttributeHandlers};
|
|||
use dom::node::{Node, NodeHelpers};
|
||||
use dom::window::Window;
|
||||
use servo_util::namespace::Namespace;
|
||||
use servo_util::str::DOMString;
|
||||
use servo_util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
use serialize::{Encoder, Encodable};
|
||||
|
||||
|
@ -100,7 +100,7 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
let filter = ClassNameFilter {
|
||||
classes: classes.split(' ').map(|class| class.into_owned()).to_owned_vec()
|
||||
classes: split_html_space_chars(classes).map(|class| class.into_owned()).to_owned_vec()
|
||||
};
|
||||
HTMLCollection::create(window, root, ~filter)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue