Add destroy function

This commit is contained in:
Keegan
2016-05-26 18:45:22 -07:00
parent b553094742
commit 70bb2e9d07
5 changed files with 150 additions and 7 deletions
+10
View File
@@ -16,10 +16,20 @@ module.exports = function() {
}
}
/**
* @returns {void}
*/
function handleButtonClick() {
Clay.config = Clay.meta.userData.config2;
Clay.build();
}
Clay.on(Clay.EVENTS.AFTER_BUILD, function() {
var coolStuffToggle = Clay.getItemByAppKey('cool_stuff');
toggleBackground.call(coolStuffToggle);
coolStuffToggle.on('change', toggleBackground);
Clay.getItemById('testButton').on('click', handleButtonClick);
});
console.log('userData: ', Clay.meta.userData);