function init( state ) {
      _calcHeight();
      // Even if expanded is set, don't expand if in mobile window size.
      if ( !_isInMobile() &&
           ( state === EXPANDED ||
           _dom.getAttribute( 'data-state' ) === 'expanded' ) ) {
        // If expanded by default, we need to set the height inline so the
        // inline transition to collapse the Expandable works.
        // TODO: Handle issue of height calculating before
        //       web fonts have loaded and changed height.
        _setMaxHeight();
        _setExpandedState();
      } else {
        _setCollapsedState();
      }

      // Show the show/hide links, which otherwise are hidden if JS is off.
      _link.classList.remove( 'u-hidden' );

      _target.addEventListener( 'click', _handleClick );

      window.addEventListener( 'resize', _resizeHandler );

      _initObserver();

      return this;
    }
/**
     * @param {number} state
     *   Allows passing of EXPANDED flag to set expanded state.
     * @returns {Object} The Expandable instance.
     */
@param {number} state
Allows passing of EXPANDED flag to set expanded state.
@returns {Object} The Expandable instance.
@param { number } state Allows passing of EXPANDED flag to set expanded state . @returns { Object } The Expandable instance .
function init( state ) {
      _calcHeight();
      if ( !_isInMobile() &&
           ( state === EXPANDED ||
           _dom.getAttribute( 'data-state' ) === 'expanded' ) ) {
        _setMaxHeight();
        _setExpandedState();
      } else {
        _setCollapsedState();
      }
      _link.classList.remove( 'u-hidden' );
      _target.addEventListener( 'click', _handleClick );
      window.addEventListener( 'resize', _resizeHandler );
      _initObserver();
      return this;
    }
function init ( state ) { _calcHeight ( ) ; if ( ! _isInMobile ( ) && ( state === EXPANDED || _dom . getAttribute ( 'data-state' ) === 'expanded' ) ) { _setMaxHeight ( ) ; _setExpandedState ( ) ; } else { _setCollapsedState ( ) ; } _link . classList . remove ( 'u-hidden' ) ; _target . addEventListener ( 'click' , _handleClick ) ; window . addEventListener ( 'resize' , _resizeHandler ) ; _initObserver ( ) ; return this ; }
@param {number} state
   Allows passing of EXPANDED flag to set expanded state.
@param { number } state Allows passing of EXPANDED flag to set expanded state .
// Even if expanded is set, don't expand if in mobile window size. // If expanded by default, we need to set the height inline so the // inline transition to collapse the Expandable works. // TODO: Handle issue of height calculating before //       web fonts have loaded and changed height. // Show the show/hide links, which otherwise are hidden if JS is off.