Text

open external class Text : 
    CharacterData,
    Slotable,
    GeometryUtils
(source)

Platform and version requirements: JS

Exposes the JavaScript Text to Kotlin

Constructors

<init>

Text(data: String = definedExternally)

Exposes the JavaScript Text to Kotlin

Properties

assignedSlot

open val assignedSlot: HTMLSlotElement?

nextElementSibling

open val nextElementSibling: Element?

previousElementSibling

open val previousElementSibling: Element?

wholeText

open val wholeText: String

Inherited Properties

data

open var data: String

length

open val length: Int

Functions

after

open fun after(vararg nodes: dynamic)

before

open fun before(vararg nodes: dynamic)

convertPointFromNode

open fun convertPointFromNode(
    point: DOMPointInit,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMPoint

convertQuadFromNode

open fun convertQuadFromNode(
    quad: dynamic,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMQuad

convertRectFromNode

open fun convertRectFromNode(
    rect: DOMRectReadOnly,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMQuad

getBoxQuads

open fun getBoxQuads(options: BoxQuadOptions): Array<DOMQuad>

remove

open fun remove()

replaceWith

open fun replaceWith(vararg nodes: dynamic)

splitText

fun splitText(offset: Int): Text

Inherited Functions

appendData

fun appendData(data: String)

deleteData

fun deleteData(offset: Int, count: Int)

insertData

fun insertData(offset: Int, data: String)

replaceData

fun replaceData(offset: Int, count: Int, data: String)

substringData

fun substringData(offset: Int, count: Int): String

Extension Properties

isElement

val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText

val Node.isText: Boolean

Gets a value indicating whether this node is a TEXT_NODE or a CDATA_SECTION_NODE.

Extension Functions

clear

fun Node.clear()

Removes all the children from this node.

Inheritors

CDATASection

open external class CDATASection : Text

Exposes the JavaScript CDATASection to Kotlin