【发布时间】:2014-10-10 09:05:25
【问题描述】:
使用 dart dart2js 编译代码,并在 chrome 或 firefox 中运行时
void main() {
window.onMouseDown.listen((e) => print(e.clientX));
}
结果:
Uncaught TypeError: undefined is not a function
在 Dartium 中没有错误。
【问题讨论】:
使用 dart dart2js 编译代码,并在 chrome 或 firefox 中运行时
void main() {
window.onMouseDown.listen((e) => print(e.clientX));
}
结果:
Uncaught TypeError: undefined is not a function
在 Dartium 中没有错误。
【问题讨论】:
e.client.x 应该可以工作。e.clientX 可以使用很长时间,但已被弃用。也许它最近被删除了。
【讨论】: