0.1.1 • Published 9 years ago

shadowjs v0.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

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');