Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
519 B

import Backbone from 'backbone';
export default Backbone.View.extend({
tagName: 'style',
initialize(o = {}) {
this.config = o.config || {};
const { model } = this;
this.listenTo(model, 'change', this.render);
this.listenTo(model, 'destroy remove', this.remove);
this.listenTo(model.get('selectors'), 'change', this.render);
},
render() {
const { model, el } = this;
const important = model.get('important');
el.innerHTML = model.toCSS({ important });
return this;
}
});