Make Element::attrs return a Ref<[_]>

This commit is contained in:
Anthony Ramine 2016-11-30 13:44:13 +01:00
parent 03e04179ae
commit 2fcb908daa

View file

@ -718,8 +718,8 @@ impl Element {
&self.prefix
}
pub fn attrs(&self) -> Ref<Vec<JS<Attr>>> {
self.attrs.borrow()
pub fn attrs(&self) -> Ref<[JS<Attr>]> {
Ref::map(self.attrs.borrow(), |attrs| &**attrs)
}
pub fn style_attribute(&self) -> &DOMRefCell<Option<Arc<RwLock<PropertyDeclarationBlock>>>> {