How override eval function in javascript?
For example: (function() { var proxied = window.eval; window.eval = function() { return proxied.apply(this, arguments); }; })(); But this code is not working. T.J. Crowder You can't. (There is a limited way of doing it, but it's quite limited and doesn't maintain the magic that bobince talks about .) eval isn't a real JavaScript function in at least one major implementation (IE's JScript, at least not through IE7; haven't tested the new IE8 version), so right off the bat you're going to run into trouble, because you won't be able to call the original via apply (not that that really matters for