mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce RootedVec<JS<T>>::r()
This commit is contained in:
parent
658c3d05ae
commit
389a9ff643
4 changed files with 24 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue