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

Re: [RequestAnimationFrame] cancelRequestAnimationFrame is an odd name

From: James Robinson <jamesr@google.com>
Date: Tue, 6 Dec 2011 21:59:10 -0800
Message-ID: <CAD73mdKD6hPnHttV9us6gJJ5qaOvUmM0gJKN3H4ApNOe1GKa+w@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-web-perf@w3.org
On Tue, Dec 6, 2011 at 8:10 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> The name is a bit odd, if only because it's not really symmetric with
> requestAnimationFrame.  It took me a bit of staring at it to understand
> what it might actually mean.
>
> Would it make more sense to call this cancelAnimationFrame?  Or if we want
> to emphasize that only one request is being canceled, perhaps
> cancelAnimationFrameRequest?


Either sound fine to me.  The goal is to attempt some sort of symmetry with
setTimeout/clearTimeout and setInterval/clearInterval.  I'm not sure if
"request"/"cancel" are an ideal pair but I didn't come up with the
"request" bit in the first place :).

I think cancelAnimationFrame() would be a solid improvement on the status
quo.  Does anyone object to this name?  If not I'll make an edit later this
week.  These names are all so long and unwieldy that I'm afraid all
libraries and authors will alias them anyway but that ship may have sailed.

- James

>
>
> -Boris
>
>
>
Received on Wednesday, 7 December 2011 05:59:40 UTC

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