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...
Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?...
I have a question about the single threaded nature of Javascript.  console.log("1"); setTimeout(function(){console.log("2");},3000); console.log("3"); setTimeout(function(){console.log("4");},1000);   The result of t...
I'm curious about the possibility of damaging localStorage entry by overwriting it in two browser tabs simultaneously. Should I create a mutex for local storage? I was already thinking of such pseudo-class:  LocalStorageMan.prototype.v = LocalSto...
Does anyone know what the memory and threading models are in nodejs?  In particular, is ii++ atomic? Does it behave as if ii were volatile in Java 1.5, in Java 1.4, in C, or not at all?...
So I have a large JSON object i'm returning from the server, then building a datatable from it and displaying it on the form. This usually takes a few seconds.. so I was thinking of a loading bar.  I have the logic behind the loading bar, however...
I've been working on a problem with doing a synchronous call to JavaScript in a WebView (with a return value) and trying to narrow down the where and why of why it's not working. It seems to be that the WebView thread is blocking while the ma...
I have a CPU intensive work to do and i don't want to degrade the user experience. since web workers (http://ejohn.org/blog/web-workers/) are a new feature and are not supported by all browsers, i thought to open an iframe with an HTML + JS that...
Lets asume I have a code like the following:  var shared = 100; function workWithIt(){     shared += 100; }  setTimeout(workWithIt, 500); setTimeout(workWithIt, 500);   Ideally, this piece of code should add 200 to the variable shared, which is 300 a...
Is it possible to call multiple functions at the same time?  E.g.  var executed = false; // loop 1 func(); // loop 2 func();  function func(){     if (executed) return;     executed = true;     alert(1); }   Can func() be executed 2 times at once?...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.