Created
October 21, 2016 01:36
-
-
Save positlabs/11030ee89505f983877e717bc41b0c49 to your computer and use it in GitHub Desktop.
Boilerplate for xtag components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://x-tags.org/docs | |
const ComponentBase = require('./component-base') | |
xtag.register('x-boilerplate', { | |
prototype: ComponentBase.prototype, | |
lifecycle: { | |
created(){ | |
this.delegateEvents({}) | |
}, | |
inserted(){}, | |
removed(){}, | |
attributeChanged(){} | |
}, | |
accessors: { | |
label: { | |
attribute: {} | |
} | |
}, | |
methods: { | |
render (){ | |
this.innerHTML = ` | |
<h1>hello</h1> | |
` | |
} | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment