function onShow(scope, element, options) {
      activeToastContent = options.textContent;

      var isSmScreen = !$mdMedia('gt-sm');

      element = $mdUtil.extractElementByName(element, 'md-toast', true);
      options.element = element;

      options.onSwipe = function(ev) {
        // Add the relevant swipe class to the element so it can animate correctly
        var swipe = ev.type.replace('$md.','');
        var direction = swipe.replace('swipe', '');

        // If the swipe direction is down/up but the toast came from top/bottom don't fade away
        // Unless the screen is small, then the toast always on bottom
        if ((direction === 'down' && options.position.indexOf('top') !== -1 && !isSmScreen) ||
            (direction === 'up' && (options.position.indexOf('bottom') !== -1 || isSmScreen))) {
          return;
        }

        if ((direction === 'left' || direction === 'right') && isSmScreen) {
          return;
        }

        element.addClass('md-' + swipe);
        $mdUtil.nextTick($mdToast.cancel);
      };
      options.openClass = toastOpenClass(options.position);

      element.addClass(options.toastClass);

      // 'top left' -> 'md-top md-left'
      options.parent.addClass(options.openClass);

      // static is the default position
      if ($mdUtil.hasComputedStyle(options.parent, 'position', 'static')) {
        options.parent.css('position', 'relative');
      }

      setupActionKeyListener(scope.toast && scope.toast.actionKey ?
        scope.toast.actionKey : undefined);

      element.on(SWIPE_EVENTS, options.onSwipe);

      var verticalPositionDefined = false;
      var positionClasses = options.position.split(' ').map(function (position) {
        if (position) {
          var className = 'md-' + position;
          if (className === 'md-top' || className === 'md-bottom') {
            verticalPositionDefined = true;
          }
          return className;
        }
        return 'md-bottom';
      });
      // If only "right" or "left" are defined, default to a vertical position of "bottom"
      // as documented.
      if (!verticalPositionDefined) {
        positionClasses.push('md-bottom');
      }
      element.addClass(isSmScreen ? 'md-bottom' : positionClasses.join(' '));

      if (options.parent) {
        options.parent.addClass('md-toast-animating');
      }
      return $animate.enter(element, options.parent).then(function() {
        if (options.parent) {
          options.parent.removeClass('md-toast-animating');
        }
      });
    }
@param {{toast: {actionKey: string=}}=} scope
@param {JQLite} element
@param {Object.<string, string>} options
@return {*}