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...
Clause 2.2.4 of the promise/a+ spec says:     onFulfilled or onRejected must not be called until the execution   context stack contains only platform code.   Then in the notes it states that:     Here “platform code” means engine, environment,...
I can not understand how the following code run. Why "1" is after "b" but "h" is after "3"? Should'n the order is: a, b, 1, 2, h, 3? Some article said that the difference between "event loop queue" and "...
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...
So it turns out the while loop blocks the event loop in JavaScript, which prevents it from being a viable solution to creating a run loop if you want your application to respond to external / async events.  My question is, what techniques are used to...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.