orward){
      if (forward !== undefined) {
        this.classList.add(forward ? transition.forward.out : transition.backwards.out);
        this.classList.add(outClass);
        this.addEventListener("webkitAnimationEnd", endAnimationOnOldSlide);
        return promiseOnEvent("webkitAnimationEnd", this);
      } else {
        this.classList.remove(activeClass);
        return Promise.resolve("done");
      }
    }

    function promiseOnEvent(eventName, slide) {
      return new Promise(function(resolve){