document.querySelector('iframe#elementor').addEventListener('load', function () { const iframe = this; const msg = 'height';
const sendHeight = () => {
const contentHeight = iframe.contentWindow.document.body.scrollHeight;
window.parent.postMessage({ replyTo: msg, h: contentHeight }, '*'); };
window.addEventListener('message', function (e) { if (e.data.replyTo === msg) {
iframe.style.height = `${e.data.h}px`; } });
window.addEventListener('resize', sendHeight);
sendHeight(); });