code: function checkLoadStatus(onload) {
              if (loadCount === resourceCount) {
                  // wait 1/2s and execute callback (cheap workaround to ensure everything is loaded)
                  if (onload || api.onload) {
                      // make sure we clear the timer
                      clearTimeout(timerId);
                      // trigger the onload callback
                      // we call either the supplied callback (which takes precedence) or the global one
                      var callback = onload || api.onload;
                      setTimeout(function () {
                          callback();
                          me.event.publish(me.event.LOADER_COMPLETE);
                      }, 300);
                  }
                  else {
                      throw new Error("no load callback defined");
                  }
              }
              else {
                  timerId = setTimeout(function() {
                      checkLoadStatus(onload);
                  }, 100);
              }
          }
docs: check the loading status
  @ignore