FocusOnReadingPositionOptions

data class FocusOnReadingPositionOptions(val focusOnPageContainer: Boolean = false, val focusOnPageBodyElement: Boolean = false, val focusNearContentLocation: Boolean = false, val focusTargetOptions: FocusOnReadingPositionTargetOptions = FocusOnReadingPositionTargetOptions())

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

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

  1. Page container iframe (focusOnPageContainer)

  2. Page body element (focusOnPageBodyElement)

  3. Reading position element (focusTargetOptions.target)

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

Constructors

Link copied to clipboard
constructor(focusOnPageContainer: Boolean = false, focusOnPageBodyElement: Boolean = false, focusNearContentLocation: Boolean = false, focusTargetOptions: FocusOnReadingPositionTargetOptions = FocusOnReadingPositionTargetOptions())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

If the element or the 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.

Link copied to clipboard

This option determines how to select a focus target when focusing on the reading position

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)