Difference between microtask and macrotask within an event loop context

I’ve just finished reading the Promises/A+ specification and stumbled upon the terms microtask and macrotask: see http://promisesaplus.com/#notes I’ve never heard of these terms before, and now I’m curious what the difference could be? I’ve already tried to find some information on the web, but all I’ve found is this post from the w3.org Archives (which … Read more

Why is setTimeout(fn, 0) sometimes useful?

I’ve recently run into a rather nasty bug, wherein the code was loading a <select> dynamically via JavaScript. This dynamically loaded <select> had a pre-selected value. In IE6, we already had code to fix the selected <option>, because sometimes the <select>‘s selectedIndex value would be out of sync with the selected <option>‘s index attribute, as … Read more