create-element-class
v1.0.1
Published
ES5-friendly function for creating custom element classes
Downloads
3
Readme
Example usage
npm install create-element-class --save-dev
const createElementClass = require('create-element-class')
const HelloWorld = createElementClass({
observedAttributes: ['foo', 'bar'],
attributeChangedCallback(name, oldValue, newValue) {},
connectedCallback() {},
disconnectedCallback() {}
})
customElements.define('hello-world', HelloWorld)
Credit
Thank you, Andy VanWagoner, for giving me permission to publish this after-hours experiment of yours.