• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Optimal height for WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: QR code reader/generator SDK
  • Next by Date: Moderator: No Haxies/SIMBL discussion - Re: Detecting a native Cocoa app ?
  • Previous by thread: Re: NSOutlineView cell editing behavior
  • Next by thread: managedObjectIDForURIRepresentation returning wrong NSManagedObjectID
  • Index(es):
    • Date
    • Thread