I need to write an application that runs some mixed JavaScript code. What I mean by โmixedโ is that some of the code is mine and some are external. My code will call some external code, but I would like to hide the call stack. In other words, in such a scenario:
function myFunc()
{
extFunc();
}
function extFunc()
{
if (arguments.callee.caller == null)
{
console.log("okay");
}
}
I would like the last "if" to evaluate to true. Can this be done in plain JavaScript?
source
share