Skip to content

Instantly share code, notes, and snippets.

@augusto-altman
Created September 21, 2014 19:35
  • Select an option

Select an option

A javascript implementation of the eval function using the blob native api.
function magicEval(code){
var script = document.createElement("script");
script.src = URL.createObjectURL(new Blob([code], {type: 'text/javascript'}));
script.type = "text/javascript";
document.getElementsByTagName('head')[0].appendChild(script);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment