code: function () {
  
              if (timeout) {
                  clearTimeout(timeout);
                  timeout = undefined;
              }
  
              if (startType !== "manual") {
  
                  var delay = 0;
  
                  if (startType === "delayed") {
                      delay = elapsedTime;
                  }
  
                  if (delay > maxDelay) {
                      delay = maxDelay;
                  }
                  timeout = setTimeout(makePreviewHtml, delay);
              }
          }
docs: setTimeout is already used.  Used as an event listener.