ollapsed = this.collapsed;

          // Measure `height: auto`, which we will need regardless of transition
          // direction. We assume that the collapsed state has an explicit height
          // set via CSS rules; so we do not bother measuring that.
          container.style.height = 'auto';
          var fullHeight = container.offsetHeight;

          // Then, we reset to the start state. Changing directions mid-transition
          // is _not_ supported!
          if (this.collapsed) {
          