mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rename many name arguments to local_name
This commit is contained in:
parent
254207730e
commit
561ec7e21d
4 changed files with 62 additions and 63 deletions
|
@ -194,9 +194,10 @@ impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
|
|||
element.set_custom_attribute(to_snake_case(name), value)
|
||||
}
|
||||
|
||||
fn get_custom_attr(self, name: DOMString) -> Option<DOMString> {
|
||||
fn get_custom_attr(self, local_name: DOMString) -> Option<DOMString> {
|
||||
let element: JSRef<Element> = ElementCast::from_ref(self);
|
||||
element.get_attribute(&ns!(""), &Atom::from_slice(&to_snake_case(name))).map(|attr| {
|
||||
let local_name = Atom::from_slice(&to_snake_case(local_name));
|
||||
element.get_attribute(&ns!(""), &local_name).map(|attr| {
|
||||
let attr = attr.root();
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let attr = attr.r();
|
||||
|
@ -205,10 +206,10 @@ impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
|
|||
})
|
||||
}
|
||||
|
||||
fn delete_custom_attr(self, name: DOMString) {
|
||||
fn delete_custom_attr(self, local_name: DOMString) {
|
||||
let element: JSRef<Element> = ElementCast::from_ref(self);
|
||||
let name = Atom::from_slice(&to_snake_case(name));
|
||||
element.remove_attribute(&ns!(""), &name);
|
||||
let local_name = Atom::from_slice(&to_snake_case(local_name));
|
||||
element.remove_attribute(&ns!(""), &local_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue