1.1 --- a/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/Canvas.java Mon Mar 04 16:15:38 2013 +0100
1.2 +++ b/javaquery/api/src/main/java/org/apidesign/bck2brwsr/htmlpage/api/Canvas.java Mon Mar 04 16:17:44 2013 +0100
1.3 @@ -18,6 +18,7 @@
1.4 package org.apidesign.bck2brwsr.htmlpage.api;
1.5
1.6 import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.7 +import static org.apidesign.bck2brwsr.htmlpage.api.Element.getAttribute;
1.8
1.9 /**
1.10 *
1.11 @@ -34,15 +35,17 @@
1.12 }
1.13
1.14 public int getHeight() {
1.15 - return (Integer) getAttribute(this, "height");
1.16 + Object ret = getAttribute(this, "height");
1.17 + return (ret instanceof Number) ? ((Number)ret).intValue(): Integer.MIN_VALUE;
1.18 }
1.19
1.20 public void setWidth(int width) {
1.21 setAttribute(this, "width", width);
1.22 }
1.23
1.24 - public int getWidth() {
1.25 - return (Integer) getAttribute(this, "width");
1.26 + public int getwidtht() {
1.27 + Object ret = getAttribute(this, "width");
1.28 + return (ret instanceof Number) ? ((Number)ret).intValue(): Integer.MIN_VALUE;
1.29 }
1.30
1.31 @JavaScriptBody(