我发现Javascript中的严格模式有些奇怪.
use strict在所有,arguments.callee.use strict在我自己的代码中使用,在一个函数范围内.当我调用库提供的其中一个函数时,它会抛出一个错误.然而,
use strict我删除了所有不相关的东西并将代码缩减为此(在jsFiddle上的在线演示):
// This comes from the minified external JS library.
// It creates a global object "foo".
(function () {
foo = {};
foo.bar = function (e) {
return function () {
var a5 = arguments.callee;
while (a5) {
a5 = a5.caller // Error on this line in all browsers except Chrome …Run Code Online (Sandbox Code Playgroud)