public DomNodeInstance(EngineInstance engine, Object value) : base(engine.Jint) { _instance = engine; _value = value; Extensible = true; Prototype = engine.GetDomPrototype(value.GetType()); }
public DomConstructorInstance(EngineInstance engine, Type type) : base(engine.Jint, null, null, false) { var toString = new ClrFunctionInstance(Engine, ToString); _objectPrototype = engine.GetDomPrototype(type); _instance = engine; FastAddProperty("toString", toString, true, false, true); FastAddProperty("prototype", _objectPrototype, false, false, false); _objectPrototype.FastAddProperty("constructor", this, true, false, true); }
public DomPrototypeInstance(EngineInstance engine, Type type) : base(engine.Jint) { var baseType = type.GetTypeInfo().BaseType ?? typeof(Object); _name = type.GetOfficialName(baseType); _instance = engine; SetAllMembers(type); SetExtensionMembers(); // DOM objects can have properties added dynamically Extensible = true; Prototype = engine.GetDomPrototype(baseType); }