Re: Optimal height for WebView
Re: Optimal height for WebView
- Subject: Re: Optimal height for WebView
- From: Eric Gorr <email@hidden>
- Date: Thu, 07 Feb 2013 22:12:19 -0500
I think I've finally got a good answer for how to compute the height of the content of a WebView. The trick seems to be to give an element an ID (in this case 'foo' ) and then evaluate:
@"document.getElementById(\"foo\").scrollHeight;"
on that element.
This does appear to give the correct height of the content.
However, for some reason, after I set the frame on the WebView inside of my split view, the split view decides to change the height.
I've got a test project at:
http://ericgorr.net/cocoadev/webviewtest2.zip
If anyone wanted to take a look...unless you know already what has gone wrong.
Thank you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden