Skip to content

Commit

Permalink
Added wasStarted and wasInitialized properties
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperMetal committed Dec 13, 2018
1 parent 5e6c948 commit c24a8a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bloomstack/panda",
"version": "1.0.1",
"version": "1.0.2",
"description": "A generic aggregate composition library. Meant to be light weight and easily extensible.",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
11 changes: 11 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ export class Component {
return this._baseComponent;
}

get wasInitialized() {
return this._inited;
}

get wasStarted() {
return this._started;
}

/**
* Returns true if this component is the root component.
*/
Expand Down Expand Up @@ -360,6 +368,9 @@ export class Component {

await this.broadcast("onInit");
await this.broadcast('onStart');

this._started = true;

await this.update();
await this.broadcast('onLateStart');

Expand Down

0 comments on commit c24a8a4

Please sign in to comment.