Which will trigger the callback if the the target event name has ever
been triggered. This is helpful when doing things like coordinating
startup between disjoint modules.
However, I'm not sure once or ensure type features really belong in
the core of node. They are easy enough to add if you need them right
now.
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
The context of this inside g is g, iirc. I think it should probably
be self in that case not this. Something else that would be
good to see is support for thisArg.
@ryah: thoughts on supporting a thisArg?
Yours,
Micheil Smith
--
BrandedCode.com
Nope, it's fine, though a bit excessive.
Event listeners are by default called in the this-context of the
emitter, so the "self" variable shouldn't be necessary.
--i
Sure, I'll take it. Can you provide it as an attachment?
--i
Thanks. Landed in a6ee3bac85c84c1a24c1a2aa621f77ba5d1c0bb9.