W3C home > Mailing lists > Public > public-web-perf@w3.org > June 2011

RE: ISSUE-6: (duplicate callbacks): Spec needs to clarify expected behavior for duplicate calls of the same callback [Request Animation Frame]

From: Jatinder Mann <jmann@microsoft.com>
Date: Wed, 1 Jun 2011 15:56:17 +0000
To: Cameron McCormack <cam@mcc.id.au>, Web Performance Working Group WG <public-web-perf@w3.org>
Message-ID: <EE4C13A1D11CFA49A58343DE361B0B0406859D31@TK5EX14MBXC254.redmond.corp.microsoft.com>
Cameron,

When I raised this issue, I was actually hoping that we would consider removing duplicate callbacks from the animation frame request callback list, if multiple calls to requestAnimationFrame were made with the same callback. Considering the callbacks would be returned serially, a web dev can already do this by specifying a single callback and having a loop within the callback.

Thoughts?

Jatinder 

-----Original Message-----
From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Cameron McCormack
Sent: Tuesday, May 31, 2011 8:26 PM
To: Web Performance Working Group WG
Subject: Re: ISSUE-6: (duplicate callbacks): Spec needs to clarify expected behavior for duplicate calls of the same callback [Request Animation Frame]

Web Performance Working Group Issue Tracker:
> ISSUE-6: (duplicate callbacks): Spec needs to clarify expected 
> behavior for duplicate calls of the same callback [Request Animation 
> Frame]
> 
> http://www.w3.org/2010/webperf/track/issues/6


I made the animation frame request callback list an explicit list of (handle-id, callback, cancelled-flag) triples and updated the requestAnimationFrame & cancelRequestAnimationFrame descriptions appropriately.  This makes it so that cancelRequestAnimationFrame cancels a single instance of the callback in the list.

I’ve also added some text to the note box just below the definition of the requestAnimationFrame method pointing out that multiple entries in the list with the same callback will exist if you call requestAnimationFrame more than once with the same callback.

(I can’t remember who raised this issue initially; might’ve been Jatinder or Nic.)

--
Cameron McCormack ≝ http://mcc.id.au/



Received on Wednesday, 1 June 2011 15:56:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 15:56:46 GMT