Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/donejs/done-element
Wrapper for can-element which conditionally loads polyfills for you.
https://github.com/donejs/done-element
Last synced: 12 days ago
JSON representation
Wrapper for can-element which conditionally loads polyfills for you.
- Host: GitHub
- URL: https://github.com/donejs/done-element
- Owner: donejs
- License: mit
- Created: 2017-05-01T22:39:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T16:54:33.000Z (over 5 years ago)
- Last Synced: 2024-09-17T09:55:35.220Z (2 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# done-element
[![Build Status](https://travis-ci.org/donejs/done-element.png?branch=master)](https://travis-ci.org/donejs/done-element)
Custom elements for DoneJS projects. This works exactly the same as [can-element](https://github.com/canjs/can-element), but also loads polyfills if needed.
```html
Hello world app
```
```js
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