public static ArrayPrototype CreatePrototypeObject(Engine engine, ArrayConstructor arrayConstructor) { var obj = new ArrayPrototype(engine) { Extensible = true, Prototype = engine.Object.PrototypeObject }; obj.FastAddProperty("length", 0, true, false, false); obj.FastAddProperty("constructor", arrayConstructor, true, false, true); return(obj); }
public static ArrayPrototype CreatePrototypeObject(Engine engine, ArrayConstructor arrayConstructor) { var obj = new ArrayPrototype(engine) { Extensible = true, Prototype = engine.Object.PrototypeObject }; obj.FastAddProperty("length", 0, true, false, false); obj.FastAddProperty("constructor", arrayConstructor, true, false, true); return obj; }
public static ArrayPrototype CreatePrototypeObject(Engine engine, ArrayConstructor arrayConstructor) { var obj = new ArrayPrototype(engine) { Extensible = true, Prototype = engine.Object.PrototypeObject }; obj.FastAddProperty("length", 0, true, false, false); obj.SetOwnProperty("constructor", new PropertyDescriptor(arrayConstructor, PropertyFlag.NonEnumerable)); return(obj); }