docs: function pageLoadLoop() {
          var index;
          clearTimeout(pageLoadTID);
          if (pageLoadQueue.length > 0) {
              // found a page to load
              index = pageLoadQueue.shift();
              // page exists and not reached max errors?
              if (pages[index]) {
                  api.loadPage(index, function loadPageCallback(pageIsLoading) {
                      if (pageIsLoading === false) {
                          // don't wait if the page is not loading
                          pageLoadLoop();
                      } else {
                          pageLoadTID = setTimeout(pageLoadLoop, PAGE_LOAD_INTERVAL);
                      }
                  });
              } else {
                  pageLoadLoop();
              }
          } else {
              stopPageLoadLoop();
          }
      }