From 81f2a460edbf47525fc23e8a0c1d8e11ba144ff4 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Tue, 8 Aug 2017 13:08:06 +0000 Subject: [PATCH] Added apploaded event to signify when the app has completed loading --- src/web/App.js | 4 ++++ src/web/Manager.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/web/App.js b/src/web/App.js index 2880b8ac..c17305f9 100755 --- a/src/web/App.js +++ b/src/web/App.js @@ -60,6 +60,8 @@ App.prototype.setup = function() { /** * Fires once all setup activities have completed. + * + * @fires Manager#apploaded */ App.prototype.loaded = function() { // Trigger CSS animations to remove preloader @@ -74,6 +76,8 @@ App.prototype.loaded = function() { // Clear the loading message interval clearInterval(window.loadingMsgsInt); + + document.dispatchEvent(this.manager.apploaded); }; diff --git a/src/web/Manager.js b/src/web/Manager.js index 8166f606..c9396020 100755 --- a/src/web/Manager.js +++ b/src/web/Manager.js @@ -27,6 +27,10 @@ const Manager = function(app) { * @event Manager#appstart */ this.appstart = new CustomEvent("appstart", {bubbles: true}); + /** + * @event Manager#apploaded + */ + this.apploaded = new CustomEvent("apploaded", {bubbles: true}); /** * @event Manager#operationadd */