mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement From<DOMString> for Atom
This commit is contained in:
parent
f7fb035188
commit
0adfb08089
20 changed files with 44 additions and 38 deletions
|
@ -56,7 +56,7 @@ impl NamedNodeMapMethods for NamedNodeMap {
|
|||
fn GetNamedItemNS(&self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
-> Option<Root<Attr>> {
|
||||
let ns = namespace_from_domstring(namespace);
|
||||
self.owner.get_attribute(&ns, &Atom::from(&*local_name))
|
||||
self.owner.get_attribute(&ns, &Atom::from(local_name))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-namednodemap-setnameditem
|
||||
|
@ -79,7 +79,7 @@ impl NamedNodeMapMethods for NamedNodeMap {
|
|||
fn RemoveNamedItemNS(&self, namespace: Option<DOMString>, local_name: DOMString)
|
||||
-> Fallible<Root<Attr>> {
|
||||
let ns = namespace_from_domstring(namespace);
|
||||
self.owner.remove_attribute(&ns, &Atom::from(&*local_name))
|
||||
self.owner.remove_attribute(&ns, &Atom::from(local_name))
|
||||
.ok_or(Error::NotFound)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue