W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2012

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 May 2012 14:07:29 -0400
Message-ID: <4FB149E1.5020506@mit.edu>
To: public-web-perf@w3.org
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...

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:32 UTC