getters and getters in prototype

Mar 11, 2010 at 5:01 AM

Hi,

First, thanks for making this great library.

I'm using the svn version from a week ago. (Can't compile Jint on MonoDevelop at home and can't install SVN client at work so I don't have a more recent one)

I can no longer do this the svn version.

// This works in stable release

function Element() {
	this._value = 'default';
}
Element.prototype = {
	get value() {
		return this._value;
	},
	set value(val) {
		this._value = '_set_: ' + val;
	}
};

// I even tried

Object.defineProperty(Element.prototype, 'value', {
	get value() {
		return this._value;
	},
	set value(val) {
		this._value = '_set_: ' + val;
	}
});
Thank you