mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
Call old Element::{get, set}_attr() from new Element::{Get, Set}Attribute()
This commit is contained in:
parent
2ad350531a
commit
cba0caf7a5
1 changed files with 7 additions and 3 deletions
|
@ -311,15 +311,19 @@ impl Element {
|
||||||
pub fn SetId(&self, _id: &DOMString) {
|
pub fn SetId(&self, _id: &DOMString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn GetAttribute(&self, _name: &DOMString) -> DOMString {
|
pub fn GetAttribute(&self, name: &DOMString) -> DOMString {
|
||||||
null_string
|
match self.get_attr(name.get_ref()) {
|
||||||
|
Some(val) => str(val.to_owned()),
|
||||||
|
None => null_string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn GetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> DOMString {
|
pub fn GetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> DOMString {
|
||||||
null_string
|
null_string
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn SetAttribute(&mut self, _name: &DOMString, _value: &DOMString, _rv: &mut ErrorResult) {
|
pub fn SetAttribute(&mut self, name: &DOMString, value: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
self.set_attr(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn SetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString, _value: &DOMString, _rv: &mut ErrorResult) {
|
pub fn SetAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString, _value: &DOMString, _rv: &mut ErrorResult) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue