How to increase the height of iframe from which you application is being called?

时间:2017-12-18 06:00:18

标签: javascript html reactjs dom iframe

I have a React-On-Rails application which is being rendered inside a of some other application and i don't have access to parent components code.

I want to change the height of the parent iframe from my react application. How to achieve it?

1 个答案:

答案 0 :(得分:0)

You can define a function in parent page:

var setHeight = function(height){
    setIframeHeight(height)   
}

Then,in child page,you can do like this:

parent.setHeight(200)
相关问题