public static NSJSValue UndefinedMerge(NSJSVirtualMachine machine, NSJSValue value) { if (value == null) { return(NSJSValue.Undefined(machine)); } return(value); }
public virtual void DefineProperty(string key, NSJSFunctionCallback get, NSJSFunctionCallback set) { this.InternalDefineProperty(key, (machine, function) => { NSJSValue[] s = new NSJSValue[] { this, NSJSString.New(machine, key), get == null ? NSJSValue.Undefined(machine) : NSJSFunction.New(machine, get), set == null ? NSJSValue.Undefined(machine) : NSJSFunction.New(machine, set), }; function.Call(s); }); }