Closed shutej closed 9 years ago
I don't think we should add DOMHighResTimeStamp at all. Instead, we should use Go's time.Time -- RequestAnimationFrame should wrap the callback in its own function, that accepts the DOMHighResTimeStamp (as a *js.Object), converts it to a time.Time, and calls the real callback with it.
AddEventListener is a good example of the idea. It takes a js.Object and turns it into an Event, we'd do the same just for js.Object -> time.Time
I think I got this right? PTAL
Sorry, I didn't realise that the timestamp was relative to the start of the application, not an absolute time. We want to use time.Duration instead of time.Time then. Apart from that, your changes look good.
(I think this fixes duration?)
Merged as bbbde021f90d13a4ccb948794bf8319b7b5aa337 onwards - thank you..
In particular, advice on wrapping the DOMHighResTimeStamp would be helpful?