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

The behavior Cameron specified matches setTimeout and most developer's
expectations. I think we would need a really strong justification to diverge
here.

- James
On Jun 1, 2011 8:57 AM, "Jatinder Mann" <jmann@microsoft.com> wrote:
> 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 17:28:26 UTC