diff options
Diffstat (limited to 'components/script/dom/documentfragment.rs')
-rw-r--r-- | components/script/dom/documentfragment.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs index 1334bff1da0..471da29be51 100644 --- a/components/script/dom/documentfragment.rs +++ b/components/script/dom/documentfragment.rs @@ -55,9 +55,9 @@ impl DocumentFragmentMethods for DocumentFragment { // https://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid fn GetElementById(&self, id: DOMString) -> Option<Root<Element>> { let node = self.upcast::<Node>(); - let id = Atom::from_slice(&id); + let id = Atom::from(&*id); node.traverse_preorder().filter_map(Root::downcast::<Element>).find(|descendant| { - match descendant.get_attribute(&ns!(""), &atom!(id)) { + match descendant.get_attribute(&ns!(), &atom!("id")) { None => false, Some(attr) => *attr.value().as_atom() == id, } |