Skip to content

Instantly share code, notes, and snippets.

@pinguxx
Last active April 3, 2019 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinguxx/4a838908d7ed6613a92e1753f9055a43 to your computer and use it in GitHub Desktop.
Save pinguxx/4a838908d7ed6613a92e1753f9055a43 to your computer and use it in GitHub Desktop.
attributeChangedCallback(name, oldValue, newValue) {
this.update(true);
}
set data(data) {
this._data = data;
this.update(false);
}
get data() {
return this._data;
}
set options(ops) {
this._options = ops;
this.update(false);
}
get options() {
return this._options;
}
set details(obj) {
this._data = obj.data;
this._options = obj.options;
this.update(false);
}
get details() {
return {
data: this._data,
options: this._options
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment