I like cancelAnimationFrame too, or some other variety where we don't use "request" as part of the cancel function. This will align better with the existing naming convention of timers which use [set|clear]API. I am not sure I have a better "cancel" name either. Other options I came up with are abort or dismiss, or even cancel as WebDevs are already used to that name.
-Karen
From: James Robinson [mailto:jamesr@google.com]
Sent: Tuesday, December 06, 2011 9:59 PM
To: Boris Zbarsky
Cc: public-web-perf@w3.org
Subject: Re: [RequestAnimationFrame] cancelRequestAnimationFrame is an odd name
On Tue, Dec 6, 2011 at 8:10 PM, Boris Zbarsky <bzbarsky@mit.edu<mailto: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