RequestAnimationFrame not passing timestamp in IE #4593
Labels
closed-duplicate
Closed in favor of an existing report
web-libraries
Issues impacting dart:html, etc., libraries
This issue was originally filed by [email protected]
dart2js:
When the browser (like IE) does not support window.requestAnimationFrame, window.setTimeout() is used, to simulate the same result:
this.requestAnimationFrame = function(callback) {
return window.setTimeout(callback, 16 /* 16ms ~= 60fps */);
};
But this will not pass the timestamp.
However the dart api states that the callback passes an integer with the timestamp:
typedef bool RequestAnimationFrameCallback(int time);
This will result in a crash when you start doing things like "b = time - a" because time is undefined.
It's easy to find a workaround but a better solution would be to make sure the parameter time != null.
The text was updated successfully, but these errors were encountered: