title: Why isn't the scrollTo() method working for iframes?
body: <p>No matter what I do, the iframe will not auto scroll to bottom. I can't get scrollTo() to do anything to the iframe. I've checked a lot of other pages on Stack Overflow dealing with similar problems. None of their solutions have worked for me. It may well be the case that I'm simply not implementing them correctly.</p>
  
  <p><a href="https://stackoverflow.com/questions/1192228/scrolling-an-iframe-with-javascript">Scrolling an iframe with javascript?</a>
  The working example given in the above post does not in fact work for me. No matter what numbers I input into the scrollTo() method in the example nothing changes.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;div id="divy"&gt;
  &lt;iframe id='cat' src='test.html'&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;script&gt;
  console.log(document.getElementById('cat'));
   document.getElementById("cat").onload = function () {     this.contentWindow.scrollTo(0, 200) }; 
  conslole.log( document.getElementById("cat").onload = function () {     this.contentWindow.scrollTo(0, 200)) }; 
      //setInterval(function(){  document.getElementById("divy").innerHTML="    &lt;iframe src='test.html'&gt;&lt;/iframe&gt;"; }, 3000);
  &lt;/script&gt;
  &lt;body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Edit: I still don't know why the code in the working example on the other post doesn't work for me. Someone mentioned in the comments to that post that it didn't work for them either.</p>