dominikh / go-js-dom

MIT License
248 stars 42 forks source link

v2: RequestAnimationFrame callback argument type misleading #79

Closed bergwerf closed 4 years ago

bergwerf commented 4 years ago

The current arguments expects a time.Duration which is an int64 that should measure time deltas in nanoseconds. However requestAnimationFrame is said to give millisecond time points relative to some variable time origin. Perhaps it is better to change the type into int (or whatever is best compatible with JS).

bergwerf commented 4 years ago

I was a bit too soon to conclude, the returned values are actually nanoseconds. Since they represent the duration since the JavaScript time origin, this type is ok.