(function () {
if (window.parent === window) return;
function sendHeight() {
var height = Math.max(
document.body.scrollHeight,
document.documentElement.scrollHeight
);
window.parent.postMessage(
{ type: "wa-iframe-height", height: height },
"*"
);
}
window.addEventListener("load", sendHeight);
window.addEventListener("resize", sendHeight);
if (window.MutationObserver) {
new MutationObserver(sendHeight).observe(document.body, {
childList: true,
subtree: true,
attributes: true
});
}
setInterval(sendHeight, 500);
})();