Skip to content

Instantly share code, notes, and snippets.

@hectorlorenzo
Last active November 15, 2017 11:23
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 hectorlorenzo/b64e30d5f01aaccadd430caf3f088c2b to your computer and use it in GitHub Desktop.
Save hectorlorenzo/b64e30d5f01aaccadd430caf3f088c2b to your computer and use it in GitHub Desktop.
const elemClass = class extends HTMLElement {
constructor() {
super()
}
attributeChangedCallback (name, oldValue, newValue) {
const o = this
const options = o.options
options.watch[name].call(o, oldValue, newValue)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment