public static DatePrototype CreatePrototypeObject(Engine engine, DateConstructor dateConstructor) { var obj = new DatePrototype(engine) { Prototype = engine.Object.PrototypeObject, Extensible = true, PrimitiveValue = double.NaN }; obj.FastAddProperty("constructor", dateConstructor, true, false, true); return obj; }
public static DatePrototype CreatePrototypeObject(Engine engine, DateConstructor dateConstructor) { var obj = new DatePrototype(engine) { Prototype = engine.Object.PrototypeObject, Extensible = true, PrimitiveValue = double.NaN }; obj.FastAddProperty("constructor", dateConstructor, true, false, true); return(obj); }
public static DateConstructor CreateDateConstructor(Engine engine) { var obj = new DateConstructor(engine); obj.Extensible = true; // The value of the [[Prototype]] internal property of the Date constructor is the Function prototype object obj.Prototype = engine.Function.PrototypeObject; obj.PrototypeObject = DatePrototype.CreatePrototypeObject(engine, obj); obj.FastAddProperty("length", 7, false, false, false); // The initial value of Date.prototype is the Date prototype object obj.FastAddProperty("prototype", obj.PrototypeObject, false, false, false); return obj; }
public static DateConstructor CreateDateConstructor(Engine engine) { var obj = new DateConstructor(engine); obj.Extensible = true; // The value of the [[Prototype]] internal property of the Date constructor is the Function prototype object obj.Prototype = engine.Function.PrototypeObject; obj.PrototypeObject = DatePrototype.CreatePrototypeObject(engine, obj); obj.FastAddProperty("length", 7, false, false, false); // The initial value of Date.prototype is the Date prototype object obj.FastAddProperty("prototype", obj.PrototypeObject, false, false, false); return(obj); }