2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00
discourse/app/assets/javascripts/discourse/app/widgets/raw-html.js
Robin Ward 7df57b35da REFACTOR: Remove Discourse.__widget_helpers
It's now a variable in the context where the templates are created.
2020-08-06 14:35:46 -04:00

24 lines
353 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";