Making iframe-resizer work in React 0.15
See original GitHub issueimport { iframeResizer } from 'iframe-resizer'
export class Main extends Component {
componentDidMount () {
iframeResizer({log:true}, this.refs.iframe)
}
render () {
return (
<div>
<iframe ref='iframe' src="some-page.html" width='100%'/>
</div>
)
}
}
What am I missing? I can see the logs coming through and it seemingly is applying the resizer onto the iframe element, but it actually never triggers any resize events if the content height changes.
[iFrameSizer][Host page: iFrameResizer0] [iFrame.onload] Sending msg to iframe[iFrameResizer0] (iFrameResizer0:8:false:true:32:true:true:null:bodyOffset:null:null:0:false:parent:scroll)
[iFrameSizer][Host page: document] Trigger event: Visiblity change
console.js:26 [iFrameSizer][Host page: window] Trigger event: focus
Likewise, resizedCallback
never gets triggered either.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
iframe-resizer-react - npm
Start using iframe-resizer-react in your project by running `npm ... There are 52 other projects in the npm registry using iframe-resizer-react.
Read more >Web Libraries in Jars - WebJars
Coffeescript React JSX Transformer, org.webjars, coffee-react-transform ... org.webjars.bower, github-com-angular-cron-jobs-angular-cron-jobs, 3.2.0.
Read more >oss-product.txt - Glide Apps
This component takes a utils property, and makes it available down the React tree thanks to React context. It should preferably be used...
Read more >Open Source Used In Socio 1.0 - Cisco
1.141 babel-helper-create-regexp-features-plugin 7.10.4 ... 1.393 iframe-resizer-react 1.1.0 ... represent, as a whole, an original work of authorship.
Read more >Lighthouse Report - DashLord - Beta.gouv
node_modules/iframe-resizer-react/node_modules/iframe-resizer/js/ ... 0.15 s. Preload the image used by the LCP element in order to improve your LCP time.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @davidjbradshaw
updated & renamed (npm naming conflict): https://github.com/zeroasterisk/react-iframe-resizer-super/ https://zeroasterisk.github.io/react-iframe-resizer-super/
Hey gang,
Many thanks @davidjbradshaw for iframe-resizer, and @zeroasterisk for your react adaptation.
React frontend, pulling through complex plugin modified forms from a separate WordPress website (Headless WordPress website).
Thought I’d share my dead simple example for anyone else crawling the web for a react application of iframe-resizer.
On my react front-end:
Installation
yarn add react-iframe-resizer-super iframe-resizer
Inside the project that is the source of my iFrame (WordPress): Include iframeResizer.contentWindow.min.js