全
如何使用Java 8 Nashorn脚本js获取父方法参数
function callme(message){
print(arguments.callee.caller.arguments);
}
function callernn(){
callme("Hello");
}
callernn();发布于 2018-01-27 11:38:39
不是的。Nashorn不支持Function.caller和arguments.caller属性。
请注意,无论使用何种JavaScript/ECMAScript实现,Function.caller和arguments.caller都是非标准的/过时的。
另请参阅:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/caller
https://stackoverflow.com/questions/48453124
复制相似问题