davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.65k stars 981 forks source link

Trigger iframe-resizer to resize #1182

Closed alexanderbuergin closed 10 months ago

alexanderbuergin commented 11 months ago

We have a page where the content is changed dynamically on the server side, but the iframe-resizer does not adjust the height of the iframe.

How can the iframe-resizer be triggered again, in the reloaded content?

When someone resize the window, the script is executed and the height fits again.

davidjbradshaw commented 10 months ago

You can manual trigger a resize, by calling the resize method which is both the parent and child pages APIs.