If the browser is executing JavaScript on a web page and it encounters invalid JavaScript
(e.g. somerandomthingy;) Does execution of JavaScript stop at that point, or do async operations continue. Also do JavaScript events still work (e.g. onclick).
If the browser is executing JavaScript on a web page and it encounters invalid
Share
Yes, except asynchronous ones. http://jsfiddle.net/pimvdb/R4dfJ/3/
DIY:
So:
aandbhave been setchas not been setAs for ‘does onclick still work’ – well, if the handler is set in code that runs (i.e. before an error) it does; in case it is put after error code it won’t bind the handler so events won’t work.