W3cubDocs

/Haxe JavaScript

Range

package js.html

Available on js

The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.

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

See:

Constructor

new ()

Throws:

null DOMError

Variables

read only collapsed:Bool

Returns a Boolean indicating whether the range's start and end points are at the same position.

read only commonAncestorContainer:Node

Returns the deepest Node that contains the startContainer and endContainer nodes.

read only endContainer:Node

Returns the Node within which the Range ends.

read only endOffset:Int

Returns a number representing where in the endContainer the Range ends.

read only startContainer:Node

Returns the Node within which the Range starts.

read only startOffset:Int

Returns a number representing where in the startContainer the Range starts.

Methods

cloneContents ():DocumentFragment

Throws:

null DOMError

cloneRange ():Range

collapse (toStart:Bool = false):Void

compareBoundaryPoints (how:Int, sourceRange:Range):Int

Throws:

null DOMError

comparePoint (node:Node, offset:Int):Int

Throws:

null DOMError

createContextualFragment (fragment:String):DocumentFragment

Throws:

null DOMError

deleteContents ():Void

Throws:

null DOMError

detach ():Void

extractContents ():DocumentFragment

Throws:

null DOMError

getBoundingClientRect ():DOMRect

getClientRects ():DOMRectList

insertNode (node:Node):Void

Throws:

null DOMError

intersectsNode (node:Node):Bool

Throws:

null DOMError

isPointInRange (node:Node, offset:Int):Bool

Throws:

null DOMError

selectNode (refNode:Node):Void

Throws:

null DOMError

selectNodeContents (refNode:Node):Void

Throws:

null DOMError

setEnd (refNode:Node, offset:Int):Void

Throws:

null DOMError

setEndAfter (refNode:Node):Void

Throws:

null DOMError

setEndBefore (refNode:Node):Void

Throws:

null DOMError

setStart (refNode:Node, offset:Int):Void

Throws:

null DOMError

setStartAfter (refNode:Node):Void

Throws:

null DOMError

setStartBefore (refNode:Node):Void

Throws:

null DOMError

surroundContents (newParent:Node):Void

Throws:

null DOMError

Static variables

static inline read only END_TO_END:Int = 2

static inline read only END_TO_START:Int = 3

static inline read only START_TO_END:Int = 1

static inline read only START_TO_START:Int = 0

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/Range.html