Message from JavaScript discussions

July 2017

— I don't think it's possible in browser JS as that kind of call, it would have to be simulated somehow

Message permanent page


And there is a problem you would get if other JS happens to block continuing execution of your JS after the sleep timer triggers

— IE, sleep in one script also has to sleep every other script, at least in the same window

— Yeah

— That's kind of what I wanted with that call

— Stop all IO in a nodejs app

— The problems would not be fun to deal with, imo... they'd have to implement it in a way that the rest of the browser JS is unaffected

Message permanent page

— Like, stuff for extensions, and other JS-based features common in browsers

— Not to mention other things the browser has to take care of things like reflows, parsing markup etc...

Message permanent page

— I think you would not be able to scoll the page either

— So yeah, sounds dicey in a browser

— Well, await works