Created
September 3, 2014 15:36
-
-
Save cowboy/7d20e19b207b8802ad8e to your computer and use it in GitHub Desktop.
JavaScript: don't forget about indirect eval, kiddos
This file contains 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(){ console.log( eval('this') ); }.call({a:1})) | |
// Object {a: 1} | |
(function(){ console.log( (0,eval)('this') ); }.call({a:1})) | |
// Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment