scrollBy

abstract fun scrollBy(length: Length, onSuccess: (Boolean) -> Unit = {}, onError: (ColibrioException) -> Unit = {})

Scrolls a scrolling renderer's content by the specified amount. Relative values such as PERCENTAGE will be based on the renderer element's clientHeight.

If the activeRenderer is not a scrolling renderer, this method does nothing.

Parameters

length

The length to scroll.

onSuccess

Called with true if the renderer started scrolling, false otherwise.

onError

Called if an error occurs.


abstract suspend fun scrollBy(length: Length): ColibrioResult<Boolean>

Scrolls a scrolling renderer's content by the specified amount. Relative values such as PERCENTAGE will be based on the renderer element's clientHeight.

If the activeRenderer is not a scrolling renderer, this method does nothing.

Return

Either ColibrioResult.Success with true if the renderer started scrolling and with false otherwise, or ColibrioResult.Error if an error occurs.

Parameters

length

The length to scroll.