Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are probably confusing ES spec with DOM spec, if not, at least I cannot find anything in ES spec even remotely related to how anything built on top would have to be asynchronous.


The concept of an event loop and event loop 'turns' is backed into ES promises the last time I read the draft spec and kept up with the spec discussions. It's not something you can polyfill in older versions of JS, it's a platform feature designed around how browsers work.


Hmm, do you recall where the ES promises spec lives? I can't find it in the ES6 draft ( http://people.mozilla.org/~jorendorff/es6-draft.html ), but it's in the DOM spec ( http://dom.spec.whatwg.org/#promises ). ES6 does end up having iterators, which does look useful for promises, though... see task.js.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: