How to create a 'real' JavaScript array in Rhino

前端 未结 2 991
庸人自扰
庸人自扰 2021-01-05 12:23

Okay, I\'m a little stumped. I\'m probably missing something blatantly obvious but apparently I just can\'t see the forest for the trees:

I\'m trying to call a JavaS

2条回答
  •  孤独总比滥情好
    2021-01-05 12:53

    For those who are intentionally creating a different subclass of the array implementation, and therefore can't use cx.newArray, what you can do is: add this line ScriptRuntime.setBuiltinProtoAndParent(fArgs, scope, TopLevel.Builtins.Array);

提交回复
热议问题