[HighResolutionTime] performance.now() value depends on the document, which can cause problems

Right now, the value returned by performance.now() depends on the Window 
the performance object came from.  This means that any code working with 
multiple subframes and trying to use performance.now() has to be 
extremely careful: the value will differ in different subframes 
depending on when they were last loaded.  This behavior has already 
bitten the editor of the requestAnimationFrame spec, and I expect it to 
bite web authors.

The bad news is that I'm not sure how to fix this problem.  :(  One 
option is to walk up the window.parent chain as long as the ancestors 
are same-origin, but that would make the .now() method a lot slower...

-Boris

Received on Monday, 14 May 2012 18:07:58 UTC