public override IScriptable GetPrototype()
 {
     if (prototype == null)
     {
         prototype = ScriptableObject.getClassPrototype(this.ParentScope, "Array");
     }
     return(prototype);
 }
Exemple #2
0
        internal static object NewWithSpecial(Context cx, IScriptable scope, object [] args)
        {
            ScriptRuntime.checkDeprecated(cx, "With");
            scope = ScriptableObject.GetTopLevelScope(scope);
            BuiltinWith thisObj = new BuiltinWith();

            thisObj.SetPrototype(args.Length == 0 ? ScriptableObject.getClassPrototype(scope, "Object") : ScriptConvert.ToObject(cx, scope, args [0]));
            thisObj.ParentScope = scope;
            return(thisObj);
        }