code: function setup() {
    // setup once
    if ( isSetup ) {
      return;
    }
    isSetup = true;
  
    var getComputedStyle = window.getComputedStyle;
    getStyle = ( function() {
      var getStyleFn = getComputedStyle ?
        function( elem ) {
          return getComputedStyle( elem, null );
        } :
        function( elem ) {
          return elem.currentStyle;
        };
  
        return function getStyle( elem ) {
          var style = getStyleFn( elem );
          if ( !style ) {
            logError( 'Style returned ' + style +
              '. Are you running this code in a hidden iframe on Firefox? ' +
              'See http://bit.ly/getsizebug1' );
          }
          return style;
        };
    })();
  
    // -------------------------- box sizing -------------------------- //
  
    boxSizingProp = getStyleProperty('boxSizing');
  
    /**
     * WebKit measures the outer-width on style.width on border-box elems
     * IE & Firefox measures the inner-width
     */
    if ( boxSizingProp ) {
      var div = document.createElement('div');
      div.style.width = '200px';
      div.style.padding = '1px 2px 3px 4px';
      div.style.borderStyle = 'solid';
      div.style.borderWidth = '1px 2px 3px 4px';
      div.style[ boxSizingProp ] = 'border-box';
  
      var body = document.body || document.documentElement;
      body.appendChild( div );
      var style = getStyle( div );
  
      isBoxSizeOuter = getStyleSize( style.width ) === 200;
      body.removeChild( div );
    }
  
  }
docs: setup vars and functions
  do it on initial getSize(), rather than on script load
  For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397