mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
parent
47744d95ad
commit
7fa7936657
9 changed files with 237 additions and 101 deletions
|
@ -148,6 +148,7 @@ impl AttrMethods for Attr {
|
|||
impl Attr {
|
||||
pub fn set_value(&self, mut value: AttrValue, owner: &Element) {
|
||||
assert!(Some(owner) == self.owner().r());
|
||||
owner.will_mutate_attr();
|
||||
mem::swap(&mut *self.value.borrow_mut(), &mut value);
|
||||
if self.identifier.namespace == ns!("") {
|
||||
vtable_for(owner.upcast()).attribute_mutated(
|
||||
|
@ -155,6 +156,10 @@ impl Attr {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn identifier(&self) -> &AttrIdentifier {
|
||||
&self.identifier
|
||||
}
|
||||
|
||||
pub fn value(&self) -> Ref<AttrValue> {
|
||||
self.value.borrow()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue