diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index 4df11e57754..08a0ee45763 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -92,7 +92,7 @@ pub struct Document { window: @mut Window, doctype: DocumentType, title: ~str, - idmap: HashMap<~str, AbstractNode> + idmap: HashMap> } impl Document { @@ -326,7 +326,7 @@ impl Document { } pub fn register_nodes_with_id(&mut self, root: &AbstractNode) { - foreach_ided_elements(root, |id: &~str, abstract_node: &AbstractNode| { + foreach_ided_elements(root, |id: &DOMString, abstract_node: &AbstractNode| { // TODO: "in tree order, within the context object's tree" // http://dom.spec.whatwg.org/#dom-document-getelementbyid. self.idmap.find_or_insert(id.clone(), *abstract_node); @@ -334,7 +334,7 @@ impl Document { } pub fn unregister_nodes_with_id(&mut self, root: &AbstractNode) { - foreach_ided_elements(root, |id: &~str, _| { + foreach_ided_elements(root, |id: &DOMString, _| { // TODO: "in tree order, within the context object's tree" // http://dom.spec.whatwg.org/#dom-document-getelementbyid. self.idmap.pop(id); @@ -366,7 +366,7 @@ impl Document { #[inline(always)] fn foreach_ided_elements(root: &AbstractNode, - callback: &fn(&~str, &AbstractNode)) { + callback: &fn(&DOMString, &AbstractNode)) { for node in root.traverse_preorder() { if !node.is_element() { continue;