mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-02 23:27:38 -04:00
Add destroy function
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user