Reason why generators do not have references to themselves?

Bradley Meck bradley.meck at
Thu Jan 23 14:14:54 PST 2014

I was playing around with generators / looking at await for promises and
notices a very difficult thing revolving around generators not having a
reference to themselves.


I have to end up wrapping the generator function to get a reference to the
generator for passing to nested functions.

Is there a reason the execution context is not a generator / there is no
reference back to the generator during [[call]]?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list