Skip to content

Instantly share code, notes, and snippets.

@positlabs
Created October 21, 2016 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save positlabs/11030ee89505f983877e717bc41b0c49 to your computer and use it in GitHub Desktop.
Save positlabs/11030ee89505f983877e717bc41b0c49 to your computer and use it in GitHub Desktop.
Boilerplate for xtag components
// 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