core/dom.js
function makeViewportGetter_(dimension, inner, client) {
  if (testMQ('(min-' + dimension + ':' + window[inner] + 'px)')) {
    return function getWindowDimension_() {
      return window[inner];
    };
  } else {
    var docElem = document.documentElement;
    return function getDocumentDimension_() {
      return docElem[client];
    };
  }
}
function makeViewportGetter_(dimension, inner, client) {
  if (testMQ('(min-' + dimension + ':' + window[inner] + 'px)')) {
    return function getWindowDimension_() {
      return window[inner];
    };
  } else {
    var docElem = document.documentElement;
    return function getDocumentDimension_() {
      return docElem[client];
    };
  }
}
function makeViewportGetter_ ( dimension , inner , client ) { if ( testMQ ( '(min-' + dimension + ':' + window [ inner ] + 'px)' ) ) { return function getWindowDimension_ ( ) { return window [ inner ] ; } ; } else { var docElem = document . documentElement ; return function getDocumentDimension_ ( ) { return docElem [ client ] ; } ; } }
Return a function which gets the viewport width or height.
@private
@param {String} dimension The dimension to look up.
@param {String} inner The inner dimension.
@param {String} client The client dimension.
@return {function} The getter function.
Return a function which gets the viewport width or height .