Re: Optimal height for WebView

2013-02-07 Thread Eric Gorr
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 hei

Re: Optimal height for WebView

2013-01-14 Thread Mike Abdullah
On 14 Jan 2013, at 18:09, Eric Gorr wrote: > > > Sent from my iPhone > > On Jan 4, 2013, at 9:45 PM, Steve Christensen wrote: > >> On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote: >> >>> On 4 Jan 2013, at 18:12, Eric Gorr wrote: >>> Good point Mike. However, after it has

Re: Optimal height for WebView

2013-01-14 Thread Eric Gorr
Sent from my iPhone On Jan 4, 2013, at 9:45 PM, Steve Christensen wrote: > On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote: > >> On 4 Jan 2013, at 18:12, Eric Gorr wrote: >> >>> Good point Mike. >>> >>> However, after it has completed the layout, is it possible to determine the >>> heigh

Re: Optimal height for WebView

2013-01-04 Thread Steve Christensen
On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote: > On 4 Jan 2013, at 18:12, Eric Gorr wrote: > >> Good point Mike. >> >> However, after it has completed the layout, is it possible to determine the >> height of the content? If so, i could probably work with that information. >> >> But, I woul

Re: Optimal height for WebView

2013-01-04 Thread Mike Abdullah
On 4 Jan 2013, at 18:12, Eric Gorr wrote: > Good point Mike. > > However, after it has completed the layout, is it possible to determine the > height of the content? If so, i could probably work with that information. > > But, I would still think it was possible to provide a method with a fix

Re: Optimal height for WebView

2013-01-04 Thread Eric Gorr
Good point Mike. However, after it has completed the layout, is it possible to determine the height of the content? If so, i could probably work with that information. But, I would still think it was possible to provide a method with a fixed width, have it perform a layout, and return the heigh

Re: Optimal height for WebView

2013-01-04 Thread Mike Abdullah
On 4 Jan 2013, at 17:19, Eric Gorr wrote: > > > Sent from my iPhone > > On Jan 4, 2013, at 11:34 AM, Keary Suska wrote: > >> On Jan 4, 2013, at 9:19 AM, Eric Gorr wrote: >> >>> It seems like this should be a simple question. I can access the >>> NSScrollView of the WebView and ask the scr

Re: Optimal height for WebView

2013-01-04 Thread Eric Gorr
Sent from my iPhone On Jan 4, 2013, at 11:34 AM, Keary Suska wrote: > On Jan 4, 2013, at 9:19 AM, Eric Gorr wrote: > >> It seems like this should be a simple question. I can access the >> NSScrollView of the WebView and ask the scroll view for the height of its >> document view, but the hei

Re: Optimal height for WebView

2013-01-04 Thread Keary Suska
On Jan 4, 2013, at 9:19 AM, Eric Gorr wrote: > It seems like this should be a simple question. I can access the NSScrollView > of the WebView and ask the scroll view for the height of its document view, > but the height it returns is the current height of the WebView, not the > height of the co

Optimal height for WebView

2013-01-04 Thread Eric Gorr
It seems like this should be a simple question. I can access the NSScrollView of the WebView and ask the scroll view for the height of its document view, but the height it returns is the current height of the WebView, not the height of the content it currently contains. If I reduce the height o