FrontendDeveloper.in

JavaScript question detail

How do you implement zero timeout in modern browsers

You can't use setTimeout(fn, 0) to execute the code immediately due to minimum delay of greater than 0ms. But you can use window.postMessage() to achieve this behavior.

Back to all JavaScript questions
Get LinkedIn Premium at Rs 399