I've e across this message in JSLint...
document.write can be a form of eval.
and was wondering exactly how so?
The JSLint instructions page states:
The eval function...provide access to the JavaScript piler. This is sometimes necessary, but in most cases it indicates the presence of extremely bad coding....
So, how does document.write
"provide access to the JavaScript piler" then?
Thanks
I've e across this message in JSLint...
document.write can be a form of eval.
and was wondering exactly how so?
The JSLint instructions page states:
The eval function...provide access to the JavaScript piler. This is sometimes necessary, but in most cases it indicates the presence of extremely bad coding....
So, how does document.write
"provide access to the JavaScript piler" then?
Thanks
Share Improve this question asked Mar 30, 2011 at 15:59 Mutation PersonMutation Person 30.5k18 gold badges100 silver badges165 bronze badges 1- See this answer: stackoverflow./a/15048239/798677 – That Brazilian Guy Commented May 16, 2017 at 21:33
1 Answer
Reset to default 14What does your browser do with this?
document.write('<script type="text/javascript">window.alert("evaled " + (1 + 2))</script>');