Source code

Revision control

Copy as Markdown

Other Tools

// Function#caller restrictions as proposed by
function caller() {
return caller.caller;
}
assertEq(caller(), null);
assertEq(Reflect.apply(caller, undefined, []), null);
assertEq([0].map(caller)[0], null);
(function strict() {
"use strict";
assertEq(caller(), null);
})();
(async function() {
assertEq(caller(), null);
})();
assertEq(function*() {
yield caller();
}().next().value, null);
if (typeof reportCompare === "function") {
reportCompare(true, true);
}