nsIDOMRange

IID:a6cf90ce-15b3-11d2-932e-00805f8add32
Inherits From:nsISupports
Status:FROZEN

The nsIDOMRange interface is an interface to a DOM range object.

For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/

This interface is implemented by the following components:


Constants

PRUint16 START_TO_START = 0
PRUint16 START_TO_END = 1
PRUint16 END_TO_END = 2
PRUint16 END_TO_START = 3

Properties

readonly PRBool collapsed

readonly nsIDOMNode commonAncestorContainer

readonly nsIDOMNode endContainer

readonly PRInt32 endOffset

readonly nsIDOMNode startContainer

The nsIDOMRange interface is an interface to a DOM range object.

For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/

readonly PRInt32 startOffset


Methods

nsIDOMDocumentFragment cloneContents ( ) nsIDOMRange cloneRange ( ) void collapse ( PRBool toStart ) PRInt16 compareBoundaryPoints ( PRUint16 how , nsIDOMRange sourceRange ) void deleteContents ( ) void detach ( ) nsIDOMDocumentFragment extractContents ( ) void insertNode ( nsIDOMNode newNode ) void selectNode ( nsIDOMNode refNode ) void selectNodeContents ( nsIDOMNode refNode ) void setEnd ( nsIDOMNode refNode , PRInt32 offset ) void setEndAfter ( nsIDOMNode refNode ) void setEndBefore ( nsIDOMNode refNode ) void setStart ( nsIDOMNode refNode , PRInt32 offset ) void setStartAfter ( nsIDOMNode refNode ) void setStartBefore ( nsIDOMNode refNode ) void surroundContents ( nsIDOMNode newParent ) DOMString toString ( )

nsIDOMDocumentFragment cloneContents ( )


nsIDOMRange cloneRange ( )


void collapse ( PRBool toStart )

Arguments:
toStart

PRInt16 compareBoundaryPoints ( PRUint16 how , nsIDOMRange sourceRange )

Arguments:
how
sourceRange

void deleteContents ( )


void detach ( )


nsIDOMDocumentFragment extractContents ( )


void insertNode ( nsIDOMNode newNode )

Arguments:
newNode

void selectNode ( nsIDOMNode refNode )

Arguments:
refNode

void selectNodeContents ( nsIDOMNode refNode )

Arguments:
refNode

void setEnd ( nsIDOMNode refNode , PRInt32 offset )

Arguments:
refNode
offset

void setEndAfter ( nsIDOMNode refNode )

Arguments:
refNode

void setEndBefore ( nsIDOMNode refNode )

Arguments:
refNode

void setStart ( nsIDOMNode refNode , PRInt32 offset )

Arguments:
refNode
offset

void setStartAfter ( nsIDOMNode refNode )

Arguments:
refNode

void setStartBefore ( nsIDOMNode refNode )

Arguments:
refNode

void surroundContents ( nsIDOMNode newParent )

Arguments:
newParent

DOMString toString ( )


References

This interface is passed as an argument to the following methods:

nsIDOMRange.compareBoundaryPoints, nsIFind.Find, nsIModifyableXPointerResult.appendRange, nsISelection.addRange, nsISelection.removeRange, nsISelectionPrivate.getTableSelectionType, nsITableEditor.getFirstSelectedCell, nsITableEditor.getNextSelectedCell

This interface is returned from the following methods:

nsIDOMDocumentRange.createRange, nsIDOMRange.cloneRange, nsIDOMXMLDocument.evaluateFIXptr, nsIFIXptrEvaluator.evaluate, nsIFind.Find, nsISelection.getRangeAt, nsIXPointerResult.item

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com