window.initBlock = initBlock; // Blocks Initialization. function initBlock(blockName = '', selector = '', cb) { document.querySelectorAll(selector).forEach((el) => cb(el)); } // Scrollbars / Frame resizes notifications. (function () { let height; handleHeightChange(); // Initial frame's height setup. setupResizeListener(); // Listen to frame's height changes. /// function setupResizeListener() { const resizeObserver = new ResizeObserver(handleHeightChange); resizeObserver.observe(document.body); } function handleHeightChange(entries) { const updatedHeight = getCurrentHeight(); if (height === updatedHeight) { return; } const RESIZE_CODE = 'resize:'; height = updatedHeight; window.parent.postMessage(RESIZE_CODE + JSON.stringify({height}), '*'); } function getCurrentHeight() { return document.querySelector('body > main').scrollHeight; } })(); //# sourceMappingURL=frame-index.min.js.map