Variable HTML_BLOCK_RESIZE_SCRIPTConst
HTML_BLOCK_RESIZE_SCRIPT: "(function(){\n function notifyHeight() {\n var height = (document.documentElement.scrollHeight || document.body.scrollHeight) + 2;\n parent.postMessage({ type: 'wdpr-html-block-resize', height: height }, '*');\n }\n if (typeof ResizeObserver !== 'undefined') {\n new ResizeObserver(notifyHeight).observe(document.body);\n } else {\n setInterval(notifyHeight, 250);\n }\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', notifyHeight);\n } else {\n notifyHeight();\n }\n window.addEventListener('load', notifyHeight);\n})();" = ...
Script to inject into htmlBlock iframe content. This should be included in the HTML served for htmlBlock iframes.
Usage: Wrap htmlBlock content like this: