marko-widgets
Version:
Module to support binding of behavior to rendered UI components rendered on the server or client
20 lines (17 loc) • 489 B
JavaScript
module.exports = require('marko-widgets').defineComponent({
template: require('./template.marko'),
getInitialState: function() {
return {
'evil': '</script><script>alert("hello")</script>'
};
},
getWidgetConfig: function() {
return {
'evil': '</script><script>alert("hello")</script>'
};
},
init: function(widgetConfig) {
this.widgetConfig = widgetConfig;
window.fooWidget = this;
}
});