add samples, fix require()

This commit is contained in:
hyb1996
2017-05-09 20:01:04 +08:00
parent 956f064737
commit e5ade55519
31 changed files with 325 additions and 135 deletions

View File

@@ -15,11 +15,9 @@ if(__engine_name__ == "rhino"){
var __asGlobal__ = function(obj, functions){
__runtime__.console.log(functions);
var len = functions.length;
for(var i = 0; i < len; i++) {
var funcName = functions[i];
__runtime__.console.log(funcName);
this[funcName] = obj[funcName].bind(obj);
}
}