PostMessage for Iframe

When we embed the paragraph in an Iframe, we have no way to get the page height or other DOM informations in order to resize that Iframe if it is cross-domain.

To do that we can have a communication between the Iframe and its parent using postMessage.

In the Iframe holder, we just have to watch for a message event, for example:

 $window.addEventListener('message', function(e) {
        var response = angular.fromJson(e.data);
        if (IframeUrl === response.url) {
          $("#IframeId").css("height", response.height + 15);
        }
});