build-wp-block #1

Merged
roman merged 10 commits from build-wp-block into master 2022-11-04 09:49:37 +00:00
Showing only changes of commit 12ef5e0570 - Show all commits
+2 -4
View File
@@ -8,10 +8,8 @@ function setupResizeListener() {
const RESIZE_CODE = 'resize:'; const RESIZE_CODE = 'resize:';
const resizeObserver = new ResizeObserver(entries => { const resizeObserver = new ResizeObserver(entries => {
setTimeout(() => { const height = document.querySelector('body > main').scrollHeight;
const height = document.body.scrollHeight; window.parent.postMessage(RESIZE_CODE + JSON.stringify({height}), '*');
window.parent.postMessage(RESIZE_CODE + JSON.stringify({height}), '*');
}, 200);
}) })
resizeObserver.observe(document.body); resizeObserver.observe(document.body);