docs: function checkResize() {
          var newOffsetHeight = element.offsetHeight,
              newOffsetWidth = element.offsetWidth;
  
          // check if we're in a frame
          if (inIframe) {
              // firefox has an issue where styles aren't calculated in hidden iframes
              // if the iframe was hidden and is now visible, broadcast a
              // layoutchange event
              if (frameWidth === 0 && window.innerWidth !== 0) {
                  frameWidth = window.innerWidth;
                  // fix the element position again if necessary
                  fixElementPosition();
                  scope.broadcast('layoutchange');
                  return;
              }
          }
  
          //on touch devices, the offset height is sometimes zero as content is loaded
          if (newOffsetHeight) {
              if (newOffsetHeight !== currentOffsetHeight || newOffsetWidth !== currentOffsetWidth) {
                  currentOffsetHeight = newOffsetHeight;
                  currentOffsetWidth = newOffsetWidth;
                  currentClientHeight = element.clientHeight;
                  currentClientWidth = element.clientWidth;
                  broadcast();
              }
          }
      }