static private CreateRootObject ( ScriptEngine engine ) : |
||
engine | ScriptEngine | The script engine associated with this object. |
return |
public static ObjectInstance Create(ScriptEngine engine, object prototype, [DefaultParameterValue(null)] ObjectInstance properties = null) { if ((prototype is ObjectInstance) == false && prototype != Null.Value) { throw new JavaScriptException(engine, "TypeError", "object prototype must be an object or null"); } ObjectInstance result; if (prototype == Null.Value) { result = ObjectInstance.CreateRootObject(engine); } else { result = ObjectInstance.CreateRawObject((ObjectInstance)prototype); } if (properties != null) { DefineProperties(result, properties); } return(result); }