cocoa - How do I find the height of a WebView's content at the current width? -


i want resize webview vertically fit content. how find out best height is?

i tried looking @ webframe's frameview, that's size of view it's being displayed in, , [frameview intrinsiccontentsize] returns -1, -1.

update:

i can this:

domnode *bodynode = [[[frame domdocument] getelementsbytagname:@"body"] item:0]; float scrollheight = [[bodynode valueforkey:@"scrollheight"] floatvalue];

..but result never less height of webview, when content plainly shorter.

the answer here:

how resize webview according content?

the key in comments accepted answer: resize webview small before getting size.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -