aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlimageelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmlimageelement.rs')
-rw-r--r--src/components/script/dom/htmlimageelement.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/htmlimageelement.rs b/src/components/script/dom/htmlimageelement.rs
index f0ceeb89434..1fcd4a9a0a5 100644
--- a/src/components/script/dom/htmlimageelement.rs
+++ b/src/components/script/dom/htmlimageelement.rs
@@ -144,9 +144,9 @@ impl HTMLImageElement {
to_px(rect.size.width) as u32
}
- pub fn SetWidth(&mut self, abstract_self: &JS<HTMLImageElement>, width: u32) -> ErrorResult {
+ pub fn SetWidth(&mut self, abstract_self: &JS<HTMLImageElement>, width: u32) {
let mut elem: JS<Element> = ElementCast::from(abstract_self);
- elem.set_attr(~"width", width.to_str())
+ elem.set_uint_attribute("width", width)
}
pub fn Height(&self, abstract_self: &JS<HTMLImageElement>) -> u32 {
@@ -160,9 +160,9 @@ impl HTMLImageElement {
to_px(rect.size.height) as u32
}
- pub fn SetHeight(&mut self, abstract_self: &JS<HTMLImageElement>, height: u32) -> ErrorResult {
+ pub fn SetHeight(&mut self, abstract_self: &JS<HTMLImageElement>, height: u32) {
let mut elem: JS<Element> = ElementCast::from(abstract_self);
- elem.set_attr(~"height", height.to_str())
+ elem.set_uint_attribute("height", height)
}
pub fn NaturalWidth(&self) -> u32 {