W3cubDocs

/Haxe JavaScript

Text

package js.html

extends CharacterDataNodeEventTarget

extended by CDATASection

@:native("Text") Available on js

The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.

Documentation Text by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

@:value({ data : "" }) new (data:String = "")

Throws:

null DOMError

Variables

read only wholeText:String

Returns a DOMString containing the text of all Text nodes logically adjacent to this Node, concatenated in document order.

Methods

convertPointFromNode (point:DOMPointInit, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMPoint

Throws:

null DOMError

convertQuadFromNode (quad:DOMQuad, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMQuad

Throws:

null DOMError

convertRectFromNode (rect:DOMRectReadOnly, from:EitherType<Text, EitherType<Element, HTMLDocument>>, ?options:ConvertCoordinateOptions):DOMQuad

Throws:

null DOMError

splitText (offset:Int):Text

Throws:

null DOMError

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Text.html