1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 10:11:43 +02:00

Add init hook as a way to effectively monkey patch constructors

Related to #246
This commit is contained in:
Toby Zerner
2015-09-08 10:27:02 +09:30
parent 54554578a3
commit 76d0e7770c
6 changed files with 23 additions and 13 deletions

View File

@@ -53,6 +53,16 @@ export default class Component {
* @public
*/
this.element = null;
this.init();
}
/**
* Called when the component is constructed.
*
* @protected
*/
init() {
}
/**