Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mig82/72dc71c8c75573e645a95a7143eebb54 to your computer and use it in GitHub Desktop.
Save mig82/72dc71c8c75573e645a95a7143eebb54 to your computer and use it in GitHub Desktop.
initGettersSetters: function() {
//Field foo
defineGetter(this, "foo", () => {return this._foo;});
defineSetter(this, "foo", (foo) => {this._foo = foo;});
//Field bar
defineGetter(this, "bar", () => {return this._bar;});
defineSetter(this, "bar", (bar) => {this._bar = bar;});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment