Skip to content

Instantly share code, notes, and snippets.

@jpblancoder
Created March 6, 2025 21:49
Show Gist options
  • Save jpblancoder/cb4873ec552e52ff35f9038c05b79005 to your computer and use it in GitHub Desktop.
Save jpblancoder/cb4873ec552e52ff35f9038c05b79005 to your computer and use it in GitHub Desktop.
<html lang="en-CA">
<head></head>
<body>
<div>Your regional map widget here</div>
<script>
(function() {
function handleResize() {
if (window.parent !== window) {
window.parent.postMessage({
type: "@fusion/pageSize",
payload: {
height: document.body?.scrollHeight,
width: document.body?.scrollWidth,
},
}, "*");
}
}
window.addEventListener("DOMContentLoaded", handleResize);
window.addEventListener("load", handleResize);
window.addEventListener("resize", handleResize);
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment