4 ms·
Not exactly sure why you got downvoted. Perhaps people should actually say why they think eval is a bad idea. My guess is it's something to do with cross site
by gnode 10y ago
Not exactly sure why you got downvoted. Perhaps people should actually say why they think eval is a bad idea.
My guess is it's something to do with cross site scripting. I can see advantages to using XMLHttpRequest in conjuction with eval in some cases, such as being able to monitor script download progress with the onprogress event.
- yuhong 10y agoThe fun thing is that XMLHttpRequest is much better designed as an API. The poor design of the script element objects caused problems when HTML5 tried to standardize it: https://hsivonen.fi/script-execution/ https://hsivonen.fi/script-execution/