Created
September 21, 2014 19:35
A javascript implementation of the eval function using the blob native api.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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