title: jQuery returns wrong document height
body: <p>I'm using a Webview in Cocoa (Mac), and I'm trying to get the correct height of a document. Just doing the normal thing, <code>webview.mainFrame.frameView.documentView.bounds.size.height</code> seems to work fine in all cases, except one that I just found: </p>
  
  <p><strong><a href="http://www.medium.com" rel="nofollow noreferrer">http://www.medium.com</a></strong>. </p>
  
  <p>When I try doing that on this site, I get a document height of something like 500, when the real document height is more like 2000+, since I have to scroll several screens to get to the end.</p>
  
  <p>I tried resorting to evaluating javascript in the webview to get the actual height, using approaches like the ones listed here: <a href="https://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript">How to get height of entire document with JavaScript?</a></p>
  
  <p>But these also gave grossly incorrect values, like my initial approach. Even going to that page, loading jQuery, then doing stuff like $(document.body).height() gives a grossly incorrect value. Anyone know what is going on? Is there some other way of getting the document height that is reliable?</p>
  
  <p>I noticed that the heights reported by the inspector in chrome are getting confused also. In these screenshots, you can see the document.body height being reported as less than the height of one of its child nodes.</p>
  
  <p><img src="https://i.stack.imgur.com/cnGYe.png" alt="medium.com body height in chrome inspector">
  <img src="https://i.stack.imgur.com/zMdu0.png" alt="medium.com body-&gt;child div height in chrome inspector"></p>