Lines Matching refs:prototype
43 // SECTION1: define getter/setter directly on an object (not its prototype)
74 // SECTION2: define getter/setter in Object.prototype
75 Object.prototype.nameSETS = 0;
76 Object.prototype.nameGETS = 0;
77 Object.prototype.__defineSetter__('name', function(newValue) {this._name=newValue; this.nameSETS++;});
78 Object.prototype.__defineGetter__('name', function() {this.nameGETS++; return this._name;});
105 // SECTION 3: define getter/setter in prototype of user-defined constructor
109 TestObject.prototype.nameSETS = 0;
110 TestObject.prototype.nameGETS = 0;
111 TestObject.prototype.__defineSetter__('name', function(newValue) {this._name=newValue; this.nameSETS++;});
112 TestObject.prototype.__defineGetter__('name', function() {this.nameGETS++; return this._name;});
113 TestObject.prototype.name = cnDEFAULT;
116 status = 'In SECTION3 of test after 1 set, 0 gets'; // (we set a default value in the prototype)
142 expect = [1,0]; // we set a default value in the prototype -