|
|
|
|
|
by spion
4856 days ago
|
|
If you want this problem solved, vote on the generators issue in v8: http://code.google.com/p/v8/issues/detail?id=2355 If v8 implements this, both Firefox and Chrome as well as node.js will have yield, enabling libraries like taskjs [1] to be used. From taskjs.org: spawn(function*() {
var data = yield $.ajax(url);
$('#result').html(data);
var status = $('#status').html('Download complete.');
yield status.fadeIn().promise();
yield sleep(2000);
status.fadeOut();
});
[1]: http://taskjs.org/ |
|