Skip to content

Instantly share code, notes, and snippets.

@csuwildcat
Last active December 28, 2015 08:19
Show Gist options
  • Select an option

  • Save csuwildcat/7470921 to your computer and use it in GitHub Desktop.

Select an option

Save csuwildcat/7470921 to your computer and use it in GitHub Desktop.
xtag.register('bb-header', {
lifecycle: {
created: function() { Helpers.created.call(this, 'header'); }
},
accessors: {
'nav': {
attribute: {}
},
'navId': {
// the attribute: {} declaration here auto-links
// the nav-id attribute to the navId setter (this.navId).
// Setting one sets the other, any get/set functionality
// is called both directions.
attribute: { name: 'nav-id' }
},
'navAction': {
attribute: { name: 'nav-id' }
},
'heading': {
attribute: {}
},
'counter': {
attribute: {}
set: function(){
// do something when you use the setter bbElement.counter = ___
this.__count__++; // Just an example
}
},
'theme': {
attribute: {}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment