DEV: provides a way to hook into createWidget constructor (#8340)
This commit is contained in:
parent
38a18b7aa0
commit
e4df3792f6
|
@ -118,6 +118,8 @@ export default class Widget {
|
|||
this.appEvents = register.lookup("service:app-events");
|
||||
this.keyValueStore = register.lookup("key-value-store:main");
|
||||
|
||||
this.init();
|
||||
|
||||
// Helps debug widgets
|
||||
if (Discourse.Environment === "development" || ENV.environment === "test") {
|
||||
const ds = this.defaultState(attrs);
|
||||
|
@ -144,6 +146,8 @@ export default class Widget {
|
|||
return {};
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
||||
destroy() {}
|
||||
|
||||
render(prev) {
|
||||
|
|
Loading…
Reference in New Issue