Hi all, thanks for checking my code out, nice to see some response.

> I think that something like this is a good candidate for the core. There's
> so many requests and things for "how can I pause my code", etc.
>
> I can't see this being all that large in size.

Matter of fact, it is not all that short, for reason's I'll come to in
a second.

> I think this makes a good first impression but the ".then" starts to
> annoy me after a while (looking at the code I can see why it's there,
> but it still "feels" superfluous <--- I don't get to use that word very
> often!):

.then and .and are entirely superfluous - they just return a reference
to the ChainCollector instance. They are they so you can stick them
anywhere in your chain for readability, and are completely optional.

> And of course, it's code is pretty heavy compared to the Pause plugin.

The crux of this thing is that I didn't write it to be a specific
plugin, I just used jQuery to demonstrate the syntactic possibilities
it opens. I wrote it to be a totally abstract, general-purpose
function queue collector as a component of another library I'm working
on. It will be used to collect event handlers, Ajax callbacks and post-
animation callbacks so you don't end up with lots of nested braces.
The reason it's quite long is that is has to be able to implement the
methods of any object given to it - most of that code is inspecting
the objects passed and figuring out what to do. More tightly-focussed
plugins will likely be smaller and more suited to their task.

Reply via email to