diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 4eb53998809..60f9e378931 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -718,8 +718,8 @@ impl Element { &self.prefix } - pub fn attrs(&self) -> Ref>> { - self.attrs.borrow() + pub fn attrs(&self) -> Ref<[JS]> { + Ref::map(self.attrs.borrow(), |attrs| &**attrs) } pub fn style_attribute(&self) -> &DOMRefCell>>> {