class Foo { constructor(x, y) { this.x = y this.y = y } toString() { return this.x + ':' + this.y } get html() { return this.html } set html(html) { this.html = html } } for(const i in Object.getOwnPropertyDescriptor(Foo.prototype, 'html')) { console.log(i) }