marko-widgets
Version:
Module to support binding of behavior to rendered UI components rendered on the server or client
22 lines (19 loc) • 466 B
JavaScript
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getInitialState: function() {
return {
type: 'state',
name: 'foo'
};
},
getWidgetConfig: function() {
return {
type: 'config',
name: 'foo'
};
},
init: function(widgetConfig) {
window.fooWidget = this;
this.widgetConfig = widgetConfig;
}
});