Skip to content

//readium-shared/org.readium.r2.shared.publication.html/DomRange/Point

Point

[androidJvm]\ data class Point(val cssSelector: String, val textNodeIndex: Int, val charOffset: Int? = null) : JSONable, Parcelable

A serializable representation of a boundary point in a DOM Range.

The cssSelector field always references a DOM element. If the original DOM Range start/endContainer property references a DOM text node, the textNodeIndex field is used to complement the CSS Selector; thereby providing a pointer to a child DOM text node; and charOffset is used to tell a position within the character data of that DOM text node (just as the DOM Range start/endOffset does). If the original DOM Range start/endContainer property references a DOM Element, then the textNodeIndex field is used to designate the child Text node (just as the DOM Range start/endOffset does), and the optional charOffset field is not used (as there is no explicit position within the character data of the text node).

https://github.com/readium/architecture/blob/master/models/locators/extensions/html.md#the-start-and-end-object

Constructors

Point [androidJvm]
fun Point(cssSelector: String, textNodeIndex: Int, charOffset: Int? = null)

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

Name Summary
describeContents [androidJvm]
abstract fun describeContents(): Int
toJSON [androidJvm]
open override fun toJSON(): JSONObject
Serializes the object to its JSON representation.
writeToParcel [androidJvm]
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Name Summary
charOffset [androidJvm]
val charOffset: Int? = null
cssSelector [androidJvm]
val cssSelector: String
offset [androidJvm]
val ~~offset~~: Long?
textNodeIndex [androidJvm]
val textNodeIndex: Int