-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update or make an alternate version for the ES6 generators API #28
Comments
Note that it's fairly easy to support both APIs at once, as a stopgap measure. |
It should also be pretty straight forward to wrap a SpiderMonkey generator in an object that exposes the ES6 API. |
Just to play around with this and generators in node, I did this as well as updating it to work with node's module system. The change to work with the updated protocol was trivial, only requiring modification to https://github.com/Benvie/task.js/commit/ae74dca4caf0122bc0d99bcef73beba252a9b9c4 |
Thanks @Benvie, let me experiment in node. Anyone working on supporting both APIs? |
See #33 for pull request. |
The ES6 generators and iterators API is a little different from the one initially implemented in Firefox, which dates back to an earlier design. Update task.js to work with the new API, which can now be tested in the latest build of V8:
http://wingolog.org/archives/2013/05/08/generators-in-v8
We should hopefully start implementing the new generators API soon in SpiderMonkey as well, so that the new version of task.js can then be used.
The text was updated successfully, but these errors were encountered: