discourse/app/assets/javascripts/discourse/widgets/raw-html.js.es6
2016-04-25 10:48:04 -04:00

23 lines
345 B
JavaScript

export default class RawHtml {
constructor(attrs) {
this.html = attrs.html;
}
init() {
const $html = $(this.html);
this.decorate($html);
return $html[0];
}
decorate() { }
update(prev) {
if (prev.html === this.html) { return; }
return this.init();
}
destroy() { }
}
RawHtml.prototype.type = 'Widget';