Last active
December 28, 2015 08:19
-
-
Save csuwildcat/7470921 to your computer and use it in GitHub Desktop.
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
| 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