fix sublime plugin issue with ui mode, object prototype pollution, try for ui api

This commit is contained in:
hyb1996
2017-05-14 23:34:38 +08:00
parent 36ef8c8396
commit 6102f6e8fe
13 changed files with 50 additions and 43 deletions

View File

@@ -13,12 +13,13 @@ if(__engine_name__ == "rhino"){
}
}
var __that__ = this;
var __asGlobal__ = function(obj, functions){
var len = functions.length;
for(var i = 0; i < len; i++) {
var funcName = functions[i];
this[funcName] = obj[funcName].bind(obj);
__that__[funcName] = obj[funcName].bind(obj);
}
}
@@ -32,4 +33,4 @@ require("__general__")(__runtime__, this);
var m = modules[i];
scope[m] = require('__' + m + '__')(scope.__runtime__, scope);
}
})(this);
})(__that__);