0.2.0 • Published 7 years ago
done-element v0.2.0
done-element
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
0.2.0
7 years ago