done-element

0.2.0 • Public • Published

done-element

Build Status

Custom elements for DoneJS projects. This works exactly the same as can-element, but also loads polyfills if needed.

<!doctype html>
 
<title>Hello world app</title>
 
<hello-world name="DoneJS"></hello-world>
import mixinElement from "done-element";
var defineAttr from "done-element/attributes";
import define from "can-define";
 
const { Element } = minElement;
 
const view = stache("Hello {{name}}!");
 
class HelloWorld extends Element {
    static get view() {
        return view;
    }
}
 
define(HelloWorld.prototype, {
    name: {
        attribute: true,
        value() {
            return "world";
        }
    }
});
defineAttr(HelloWorld);
 
customElements.define("hello-world", HelloWorld);

Will create Hello DoneJS!.

License

MIT

Package Sidebar

Install

npm i done-element

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • matthewp