mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
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
Block a user