FocusOnReadingPositionOptions

data class FocusOnReadingPositionOptions(val focusOnPageContainer: Boolean, val focusOnPageBodyElement: Boolean, val focusNearContentLocation: Boolean)

Options related to ReaderView.focusOnReadingPosition() deciding which elements should receive focus.

When multiple properties are set to true, focus is applied in the following order:

  1. Page container iframe (focusOnPageContainer)

  2. Page body element (focusOnPageBodyElement)

  3. Reading position element (focusNearContentLocation)

At least one property must be set to true for any focus action to be performed.

Constructors

Link copied to clipboard
fun FocusOnReadingPositionOptions(focusOnPageContainer: Boolean, focusOnPageBodyElement: Boolean, focusNearContentLocation: Boolean)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

If the element or nearest element matching the content location should be focused.

Link copied to clipboard

If the body element of the page content should be focused.

Link copied to clipboard

If focus should be applied to the page container iframe, before applying focus on elements within the iframe. This is necessary on some platforms in order for accessibility technologies to detect focus() changes inside iframes. If the page container isn't an iframe, this option has no effect.