Skip to content

Commit

Permalink
Call old Element::{get, set}_attr() from new Element::{Get, Set}Attri…
Browse files Browse the repository at this point in the history
…bute()
  • Loading branch information
ILyoan authored and metajack committed Aug 15, 2013
1 parent 2ad3505 commit cba0caf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/script/dom/element.rs
Expand Up @@ -311,15 +311,19 @@ impl Element {
pub fn SetId(&self, _id: &DOMString) {
}

pub fn GetAttribute(&self, _name: &DOMString) -> DOMString {
null_string
pub fn GetAttribute(&self, name: &DOMString) -> DOMString {
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 {
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) {
Expand Down

5 comments on commit cba0caf

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from metajack, me
at metajack@cba0caf

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging metajack/servo/style_setter = cba0caf into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metajack/servo/style_setter = cba0caf merged ok, testing candidate = d1bee3f

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = d1bee3f

Please sign in to comment.