fix: replace resize event with ResizeObserver in xblock iframe (#34387)

This commit is contained in:
ABBOUD Moncef
2024-03-20 14:04:29 +01:00
committed by GitHub
parent 490a3d4c75
commit 02dc68221b

View File

@@ -209,7 +209,9 @@ ${HTML(fragment.foot_html())}
observer.observe(document.body, { attributes: true, childList: true, subtree: true });
window.addEventListener('load', dispatchResizeMessage);
window.addEventListener('resize', dispatchResizeMessage);
const resizeObserver = new ResizeObserver(dispatchResizeMessage);
resizeObserver.observe(document.body);
}
}());
</script>