mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: provides a way to hook into createWidget constructor (#8340)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user