Scrolling IFrame With ReactJS Componet

Datetime:2016-08-22 23:27:34         Topic: React          Share        Original >>
Here to See The Original Article!!!

We can control scroll position of IFrame if the source of IFrame is from same domain. We can get reference of element using ref. Observe below program

Note : This program won't work for cross domains for security reasons. 

Click here to see DEMO Download Code

To Run Example Code

execute below commands

npm install

now open index.html in browser


Observe below program. we can use contentWindow.scrollTo to scroll IFrame


Put your ads here, just $200 per month.