aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 5e86a33c698..83abd6c0e01 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -865,9 +865,9 @@ impl<'a> AttributeHandlers for &'a Element {
fn get_attribute(self, namespace: &Namespace, local_name: &Atom) -> Option<Root<Attr>> {
let mut attributes = RootedVec::new();
self.get_attributes(local_name, &mut attributes);
- attributes.iter()
- .map(|attr| attr.root())
- .find(|attr| attr.r().namespace() == namespace)
+ attributes.r().iter()
+ .find(|attr| attr.namespace() == namespace)
+ .map(|attr| Root::from_ref(*attr))
}
// https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name