aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r--src/components/script/dom/htmlcollection.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/script/dom/htmlcollection.rs b/src/components/script/dom/htmlcollection.rs
index 70a94b04f43..5d5f7de0ae0 100644
--- a/src/components/script/dom/htmlcollection.rs
+++ b/src/components/script/dom/htmlcollection.rs
@@ -26,7 +26,7 @@ impl<S: Encoder<E>, E> Encodable<S, E> for ~CollectionFilter {
#[deriving(Encodable)]
pub enum CollectionTypeId {
- Static(~[JS<Element>]),
+ Static(Vec<JS<Element>>),
Live(JS<Node>, ~CollectionFilter)
}
@@ -135,6 +135,7 @@ impl HTMLCollection {
pub fn Item(&self, index: u32) -> Option<JS<Element>> {
match self.collection {
Static(ref elems) => elems
+ .as_slice()
.get(index as uint)
.map(|elem| elem.clone()),
Live(ref root, ref filter) => root.traverse_preorder()