mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove the hashmap for attributes.
This commit is contained in:
parent
528d362d09
commit
29897580e1
3 changed files with 32 additions and 52 deletions
|
@ -8,6 +8,8 @@ use dom::bindings::utils::reflect_dom_object;
|
|||
use dom::namespace::{Namespace, Null};
|
||||
use dom::window::Window;
|
||||
|
||||
use std::util;
|
||||
|
||||
pub struct Attr {
|
||||
reflector_: Reflector,
|
||||
local_name: DOMString,
|
||||
|
@ -58,6 +60,13 @@ impl Attr {
|
|||
reflect_dom_object(@mut attr, window, AttrBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn set_value(&mut self, mut value: DOMString) -> DOMString {
|
||||
util::swap(&mut self.value, &mut value);
|
||||
value
|
||||
}
|
||||
}
|
||||
|
||||
impl Attr {
|
||||
pub fn LocalName(&self) -> DOMString {
|
||||
self.local_name.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue