Dashboard Cleanup: Add isLoadingComplete to the loader.Loader object.
[WebKit-https.git] / Tools / TestResultServer / static-dashboards / loader.js
index ed3c4f7898aeedb874dc8226f407fb04bc63e3fc..39d4580f03c3583a64a155fb26ed716996140205 100644 (file)
@@ -67,6 +67,7 @@ loader.Loader = function()
 
     this._buildersThatFailedToLoad = [];
     this._staleBuilders = [];
+    this._loadingComplete = false;
 }
 
 loader.Loader.prototype = {
@@ -74,10 +75,18 @@ loader.Loader.prototype = {
     {
         this._loadNext();
     },
+    isLoadingComplete: function()
+    {
+        return this._loadingComplete;
+    },
     _loadNext: function()
     {
         var loadingStep = this._loadingSteps.shift();
         if (!loadingStep) {
+            this._loadingComplete = true;
+            // FIXME(jparent): Loader should not know about global
+            // functions, should use a callback or dispatch load
+            // event instead.
             resourceLoadingComplete(this._getLoadingErrorMessages());
             return;
         }