示例#1
0
 public static NSJSValue UndefinedMerge(NSJSVirtualMachine machine, NSJSValue value)
 {
     if (value == null)
     {
         return(NSJSValue.Undefined(machine));
     }
     return(value);
 }
示例#2
0
 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);
     });
 }