feat(rhino): java object and class can custom prototype in javascript

This commit is contained in:
hyb1996
2018-04-07 13:22:41 +08:00
parent c39ba26e1f
commit af8823b10f
5 changed files with 165 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ module.exports = function(__runtime__, scope){
var __obj__ = new java.lang.Object();
for(var method in __selector__){
if(!__obj__[method] && !scope[method]){
if(!(method in __obj__) && !(method in scope)){
scope[method] = (function(method) {
return function(){
var s = selector();