title: Alternatives for Javascript eval
body: <p>Mozilla's <a href="http://people.mozilla.com/~bsterne/content-security-policy/details.html">Content Security Policy</a> disallows the use of javascript eval function as well as inline scripts. They claim that all instances of eval can be replaced by another (hopefully safer) function. I agree in most scenarios, Javascript eval can be replaced, but I'm not sure whether the replacement is possible for every case. </p>
  
  <p>My question is twofold:</p>
  
  <ol>
  <li>Is there a generic way to replace every javascript eval function? (doesn't have to be safe)</li>
  <li>Is there a case where the Javascript eval cannot be replaced? </li>
  </ol>