question: public void scrollToElement ( HTMLElement element , boolean animate ) { if ( ! pageLoading ( ) ) { if ( ! document . contains ( element ) ) { throw new IllegalArgumentException ( "The specified element is not contained in the current document." ) ; } Vector v = element . getUi ( ) ; if ( ( v != null ) && ( v . size ( ) > 0 ) ) { Component cmp = ( ( Component ) v . firstElement ( ) ) ; if ( cmp != null ) { Container parent = cmp . getParent ( ) ; int y = cmp . getY ( ) ; while ( ( parent != null ) && ( parent != this ) ) { y += parent . getY ( ) ; parent = parent . getParent ( ) ; } scrollTo ( y , animate ) ; } } } else { throw new IllegalStateException ( "Page is still loading" ) ; } }
target:  Scrolls the HTMLComponent to the specified element