public static FunctionPrototype CreatePrototypeObject(Engine engine) { var obj = new FunctionPrototype(engine); obj.Extensible = true; // The value of the [[Prototype]] internal property of the Function prototype object is the standard built-in Object prototype object obj.Prototype = engine.Object.PrototypeObject; obj.FastAddProperty("length", 0, false, false, false); return obj; }
public static FunctionPrototype CreatePrototypeObject(Engine engine) { var obj = new FunctionPrototype(engine); obj.Extensible = true; // The value of the [[Prototype]] internal property of the Function prototype object is the standard built-in Object prototype object obj.Prototype = engine.Object.PrototypeObject; obj.FastAddProperty("length", 0, false, false, false); return(obj); }
public static FunctionConstructor CreateFunctionConstructor(Engine engine) { var obj = new FunctionConstructor(engine); obj.Extensible = true; // The initial value of Function.prototype is the standard built-in Function prototype object obj.PrototypeObject = FunctionPrototype.CreatePrototypeObject(engine); // The value of the [[Prototype]] internal property of the Function constructor is the standard built-in Function prototype object obj.Prototype = obj.PrototypeObject; obj.FastAddProperty("prototype", obj.PrototypeObject, false, false, false); obj.FastAddProperty("length", 1, false, false, false); return(obj); }