0

When compiling code with dart dart2js, and run in chrome or firefox

void main() {
  window.onMouseDown.listen((e) => print(e.clientX));
}

Result:

Uncaught TypeError: undefined is not a function

In Dartium there is no error.

Tiago Pertile
  • 1,045
  • 2
  • 7
  • 9

1 Answers1

1

e.client.x should work.
e.clientX was available for a long time but deprecated. Maybe it was removed recently.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567