Scrolling IFrame With ReactJS Componet

Datetime:2016-08-22 23:27:34          Topic: React           Share

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

Program

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





About List