mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
auto merge of #2048 : Ms2ger/servo/set_uint_attribute, r=jdm
This commit is contained in:
commit
a65ff6089a
3 changed files with 10 additions and 6 deletions
|
@ -206,6 +206,7 @@ pub trait AttributeHandlers {
|
|||
fn set_url_attribute(&mut self, name: &str, value: DOMString);
|
||||
fn get_string_attribute(&self, name: &str) -> DOMString;
|
||||
fn set_string_attribute(&mut self, name: &str, value: DOMString);
|
||||
fn set_uint_attribute(&mut self, name: &str, value: u32);
|
||||
}
|
||||
|
||||
pub trait AfterSetAttrListener {
|
||||
|
@ -418,6 +419,11 @@ impl AttributeHandlers for JS<Element> {
|
|||
assert!(name == name.to_ascii_lower());
|
||||
assert!(self.set_attribute(Null, name.to_owned(), value).is_ok());
|
||||
}
|
||||
|
||||
fn set_uint_attribute(&mut self, name: &str, value: u32) {
|
||||
assert!(name == name.to_ascii_lower());
|
||||
assert!(self.set_attribute(Null, name.to_owned(), value.to_str()).is_ok());
|
||||
}
|
||||
}
|
||||
|
||||
impl Element {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue