Re: [HighResolutionTime] value depends on the document, which can cause problems

On Mon, May 14, 2012 at 11:07 AM, Boris Zbarsky <> wrote:
> Right now, the value returned by depends on the Window the
> performance object came from.  This means that any code working with
> multiple subframes and trying to use 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...

You'd only need to do that the first is accessed. So
performance doesn't seem like a problem.

/ Jonas

Received on Monday, 14 May 2012 19:24:01 UTC