all browsers (except chrome) throw when the .caller
of .caller
is accessed on line 18
Last active
February 15, 2017 09:24
-
-
Save patrickkettner/8825ff8411063ac0d40cd27f8d188f65 to your computer and use it in GitHub Desktop.
Chrome Bug(?)
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Chrome Bug?</title> | |
<script> | |
function A() { | |
"use strict"; | |
B(); | |
} | |
function B() { | |
eval('C.call();'); | |
}; | |
function C() { | |
document.documentElement.style.backgroundColor = 'green'; | |
C.caller.caller | |
document.documentElement.style.backgroundColor = 'red'; | |
} | |
A() | |
</script> | |
</head> | |
<body></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment