haXe API Documentation
Back | Index
extern class js.html.Range
Available in js

The Range object represents a fragment of a document that can contain nodes and parts of text nodes in a given document.

A range can be created using the Document.createRange  method of the Document  object. Range objects can also be retrieved by using the Selection.getRangeAt  method of the Selection  object.



Documentation for this class was provided by MDN.
var collapsed(default,null) : Bool
Returns a boolean indicating whether the range's start and end points are at the same position. Getter throws DOMException.
var commonAncestorContainer(default,null) : Node
Returns the deepest Node  that contains the startContainer and endContainer Nodes. Getter throws DOMException.
var endContainer(default,null) : Node
Returns the Node  within which the Range ends. Getter throws DOMException.
var endOffset(default,null) : Int
Returns a number representing where in the endContainer the Range ends. Getter throws DOMException.
var startContainer(default,null) : Node
Returns the Node  within which the Range starts. Getter throws DOMException.
var startOffset(default,null) : Int
Returns a number representing where in the startContainer the Range starts. Getter throws DOMException.
function cloneContents() : DocumentFragment
function cloneRange() : Range
function collapse(toStart : Bool) : Void
function compareBoundaryPoints(how : Int, sourceRange : Range) : Int
function compareNode(refNode : Node) : Int
function comparePoint(refNode : Node, offset : Int) : Int
function createContextualFragment(html : String) : DocumentFragment
function deleteContents() : Void
function detach() : Void
function expand(unit : String) : Void
function extractContents() : DocumentFragment
function getBoundingClientRect() : ClientRect
function getClientRects() : ClientRectList
function insertNode(newNode : Node) : Void
function intersectsNode(refNode : Node) : Bool
function isPointInRange(refNode : Node, offset : Int) : Bool
function selectNode(refNode : Node) : Void
function selectNodeContents(refNode : Node) : Void
function setEnd(refNode : Node, offset : Int) : Void
function setEndAfter(refNode : Node) : Void
function setEndBefore(refNode : Node) : Void
function setStart(refNode : Node, offset : Int) : Void
function setStartAfter(refNode : Node) : Void
function setStartBefore(refNode : Node) : Void
function surroundContents(newParent : Node) : Void
function toString() : String
static inline var END_TO_END : Int
static inline var END_TO_START : Int
static inline var NODE_AFTER : Int
static inline var NODE_BEFORE : Int
static inline var NODE_BEFORE_AND_AFTER : Int
static inline var NODE_INSIDE : Int
static inline var START_TO_END : Int
static inline var START_TO_START : Int
Back | Index