我在客户端使用 Canvas 创建了一个网站来显示动画。有时会发生动画突然停止移动,所以我在调试模式下运行应用程序并得到这个奇怪的错误:
com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@com.google.gwt.dom.client.ImageElement::getWidth()': JS value of type undefined, expected int
这种行为的原因可能是什么?一个函数怎么会突然取消定义它的返回类型?