Home | History | Annotate | Download | only in GetSet

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.name setter = function(newValue) {this._name=newValue; this.nameSETS++;}
78 Object.prototype.name getter = 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.name setter = function(newValue) {this._name=newValue; this.nameSETS++;}
112 TestObject.prototype.name getter = 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 -