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&g...
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 am thinking about it and this is what I came up with:  Let's say we have a code like this:  console.clear(); console.log("a"); setTimeout(function(){console.log("b");},1000); console.log("c"); setTimeout(function(){con...
The following figure is taken from Chapter 3 of the book Secrets of the JavaScript Ninja by Jon Resig. Here the author is explaining the browser event loop.    The book has to say this :     It’s important to note that the browser mechanism that pu...
My understanding is that the full microtask task queue is processed after each macrotask.  If that is the case, why does the setTimeout callback get executed after the Promise microtasks in the following snippet of JavaScript?  console.log('start...
I've recently seen a presentation on the JS event loop which is, frankly, brilliant, but I have a lingering question now about the JS call stack. If you think about the global execution context as, say, main(), is main() never resolved? My reason...
Hey hava googled and tried every thing - but nothing seems to work, so now i will ask you guys:  How do i make my Node app. from stop exiting - when i like it to keep running and wait for response from a Web Socket connection? As you can see i have t...
GENERAL GOAL  I’d like to know how the following pieces of a javascript environment interconnect as a system.     Javascript Engine Event Loop Event Queue   We can limit this to a browser environment since node has been covered in another article (...
So, I've been thinking about a brain teaser - what if I had a large object I for some reason had to iterate through in node js, and didn't want to block the event loop while I was doing that?  Here's an off-the-top-of-my-head example, I&#...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.