Skip to content

Commit 81f2a46

Browse files
committed
Added apploaded event to signify when the app has completed loading
1 parent be689e2 commit 81f2a46

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/web/App.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ App.prototype.setup = function() {
6060

6161
/**
6262
* Fires once all setup activities have completed.
63+
*
64+
* @fires Manager#apploaded
6365
*/
6466
App.prototype.loaded = function() {
6567
// Trigger CSS animations to remove preloader
@@ -74,6 +76,8 @@ App.prototype.loaded = function() {
7476

7577
// Clear the loading message interval
7678
clearInterval(window.loadingMsgsInt);
79+
80+
document.dispatchEvent(this.manager.apploaded);
7781
};
7882

7983

src/web/Manager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const Manager = function(app) {
2727
* @event Manager#appstart
2828
*/
2929
this.appstart = new CustomEvent("appstart", {bubbles: true});
30+
/**
31+
* @event Manager#apploaded
32+
*/
33+
this.apploaded = new CustomEvent("apploaded", {bubbles: true});
3034
/**
3135
* @event Manager#operationadd
3236
*/

0 commit comments

Comments
 (0)