app/components/lookbook/embed/inspector/component.js in lookbook-2.0.1 vs app/components/lookbook/embed/inspector/component.js in lookbook-2.0.2

- old
+ new

@@ -34,9 +34,21 @@ }, onResized({ height }) { if (height) { this.viewportHeight = height; + + // Notify parent window of height resize so the parent window can implement + // its own iframe resize strategy if not using the Lookbook JS script. + // Uses Embedly-compatible postMessage format: https://docs.embed.ly/reference/provider-height-resizing + window.parent.postMessage( + JSON.stringify({ + src: window.location.toString(), + context: "iframe.resize", + height, + }), + "*" + ); } }, resizeIframe() { this.iframe.iFrameResizer.resize();