code: function getMaxElement(side, elements) {
      var elementsLength = elements.length,
        elVal = 0,
        maxVal = 0,
        Side = capitalizeFirstLetter(side),
        timer = getNow()
  
      for (var i = 0; i < elementsLength; i++) {
        elVal =
          elements[i].getBoundingClientRect()[side] +
          getComputedStyle('margin' + Side, elements[i])
        if (elVal > maxVal) {
          maxVal = elVal
        }
      }
  
      timer = getNow() - timer
  
      log('Parsed ' + elementsLength + ' HTML elements')
      log('Element position calculated in ' + timer + 'ms')
  
      chkEventThottle(timer)
  
      return maxVal
    }
docs: Idea from https://github.com/guardian/iframe-messenger