public UserFunction CreateFunction(Scope scope, Lambda lambda) { var obj = new UserFunction(scope, lambda); var protoObj = ObjectConstructor.Construct(); protoObj.SetOwnProperty("constructor", obj); obj.Context = this; obj.Class = ObjClass.Function; obj.Prototype = FunctionConstructor.Function_prototype; obj.SetOwnProperty("prototype", protoObj); return obj; }