Re: section 3.5.3 scrollIntoView

On Mon, 12 Nov 2007, Daniel Glazman wrote:
> 
> In my opinion, the |scrollIntoView()| method does not solve an old 
> problem we all hit once in a while : we need |scrollIntoView()| and 
> |ensureElementIsVisible()|. These are clearly different beasts.
> 
> The former is as defined in the current spec.
> 
> The latter takes a boolean argument. If the argument is true or is 
> omitted, and if the top of the element is not visible in the viewport, 
> then |scrollIntoView(true)| is called. If the argument is false and if 
> the intersection of the element's frame and the viewport is not nil, 
> then |scrollIntoView(false)| is called.

This is an interesting proposal. Could you elaborate on the use cases?

Would this be better handled by an "isVisible"-style API in a CSSOM spec?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 3 June 2008 11:44:01 UTC