'use strict';

App.factory('iframeHelpers', function() {
  var iframeHelpers = {
    resizeIframe: function() {
      setTimeout(function() {
        if (window.postMessage) {
          var minPageHeight = 250; // px
          var height = document.documentElement.offsetHeight;
          height = Math.max(height, minPageHeight);
          window.parent.postMessage('MASRESIZE-' + height, '*');
        }
      });
    }
  };

  return iframeHelpers;
});


'use strict';

App.factory('iframeHelpers', function() {
  var iframeHelpers = {
    resizeIframe: function() {
      setTimeout(function() {
        if (window.postMessage) {
          var minPageHeight = 250; // px
          var docElement = document.documentElement;
          var height = Math.max(docElement.scrollHeight, docElement.offsetHeight, docElement.clientHeight)
          window.parent.postMessage('MASRESIZE-' + height, '*');
        }
      });
    }
  };

  return iframeHelpers;
});


fix IE height resize of syndication iframe