code: function() {
              if(!aborted) {
                  if(!options.attempts || ++attempts != options.attempts) {
                      xhr.abort();
                      sending = false;
                      promise.send();
                  }
                  else {
                      handleError('Timeout (' + url + ')');
                  }
              }
          }
docs: Define variables