package js.html
Available on jsCalling the
Selection.toString()method returns the text contained in the selection, e.g.:Documentation Selection by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
read only anchorNode:NodeReturns the Node in which the selection begins.
read only anchorOffset:IntReturns a number representing the offset of the selection's anchor within the anchorNode. If anchorNode is a text node, this is the number of characters within anchorNode preceding the anchor. If anchorNode is an element, this is the number of child nodes of the anchorNode preceding the anchor.
caretBidiLevel:Intread only focusNode:NodeReturns the Node in which the selection ends.
read only focusOffset:IntReturns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is the number of characters within focusNode preceding the focus. If focusNode is an element, this is the number of child nodes of the focusNode preceding the focus.
read only isCollapsed:BoolReturns a Boolean indicating whether the selection's start and end points are at the same position.
read only rangeCount:IntReturns the number of ranges in the selection.
addRange (range:Range):VoidThrows:
null |
DOMError |
|---|
collapse (node:Node, offset:Int):VoidThrows:
null |
DOMError |
|---|
collapseToEnd ():VoidThrows:
null |
DOMError |
|---|
collapseToStart ():VoidThrows:
null |
DOMError |
|---|
containsNode (node:Node, allowPartialContainment:Bool):BoolThrows:
null |
DOMError |
|---|
deleteFromDocument ():VoidThrows:
null |
DOMError |
|---|
extend (node:Node, offset:Int):VoidThrows:
null |
DOMError |
|---|
getRangeAt (index:Int):RangeThrows:
null |
DOMError |
|---|
modify (alter:String, direction:String, granularity:String):VoidThrows:
null |
DOMError |
|---|
removeAllRanges ():VoidThrows:
null |
DOMError |
|---|
removeRange (range:Range):VoidThrows:
null |
DOMError |
|---|
selectAllChildren (node:Node):VoidThrows:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Selection.html