shadowjs
v0.1.1
Published
> WIP
Downloads
8
Readme
WIP
Shadow.js is a lightweight custom element framework. It provides people with an easy way to create custom element.
import {Engine} from 'shadowjs';
import template from './template.html';
var engine = new Engine();
engine.startRenderLoop();
engine.register('custom-element', {
template: template,
attributeChangedCallback(attrName, oldVal, newVal) {
this.state[attrName] = newVal;
}
});
let el = document.createElement('custom-element');
el.setAttribute('example', 'example');