ryanseddon / react-frame-component

Render your React app to an iFrame
http://ryanseddon.github.io/react-frame-component/
MIT License
1.75k stars 156 forks source link

contentDidMount is triggered at a different time than onLoad. #253

Open Mrcxt opened 9 months ago

Mrcxt commented 9 months ago

I have a situation where I need to dynamically calculate the height of an iframe after it has loaded. However, I found in the source code that contentDidMount is triggered before the srcDoc has finished loading, resulting in incorrect height calculation because the css and js have not finished loading at that time.

ryanseddon commented 9 months ago

Can you create a test case showing the problem