Packages

class Range extends AbstractRange

The Range interface 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 createRange method of the Document object. Range objects can also be retrieved by using the getRangeAt method of the Selection object. There also is the Range() constructor available.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
AbstractRange, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Range
  2. AbstractRange
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Range()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def cloneContents(): DocumentFragment

    The Range.cloneContents() returns a DocumentFragment copying the objects of type Node included in the Range.

  7. def cloneRange(): Range

    The Range.cloneRange() method returns a Range object with boundary points identical to the cloned Range.

  8. def collapse(toStart: Boolean): Unit

    The Range.collapse() method collapses the Range to one of its boundary points.

  9. def collapsed: Boolean

    The Range.collapsed read-only property returns a Boolean flag indicating whether the start and end points of the Range are at the same position.

    The Range.collapsed read-only property returns a Boolean flag indicating whether the start and end points of the Range are at the same position. It returns true if the start and end boundary points of the Range are the same point in the DOM, false if not.

    Definition Classes
    AbstractRange
  10. def commonAncestorContainer: Node

    The Range.commonAncestorContainer read-only property returns the deepest, or further down the document tree, Node that contains both the Range.startContainer and Range.endContainer nodes.

  11. def compareBoundaryPoints(how: Int, sourceRange: Range): Int

    The Range.compareBoundaryPoints() method compares the boundary points of the Range with another one.

  12. def createContextualFragment(fragment: String): DocumentFragment

    The Range.createContextualFragment() method returns a DocumentFragment by invoking the HTML fragment parsing algorithm or the XML fragment parsing algorithm with the start of the range (the parent of the selected node) as the context node.

    The Range.createContextualFragment() method returns a DocumentFragment by invoking the HTML fragment parsing algorithm or the XML fragment parsing algorithm with the start of the range (the parent of the selected node) as the context node. The HTML fragment parsing algorithm is used if the range belongs to a Document whose HTMLness bit is set. In the HTML case, if the context node would be html, for historical reasons the fragment parsing algorithm is invoked with body as the context instead.

  13. def deleteContents(): Unit

    The Range.deleteContents() removes the contents of the Range from the Document.

  14. def detach(): Unit

    The Range.detach() method releases a Range from use.

    The Range.detach() method releases a Range from use. This lets the browser choose to release resources associated with this Range. Subsequent attempts to use the detached range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR.

  15. def endContainer: Node

    The Range.endContainer read-only property returns the Node within which the Range ends.

    The Range.endContainer read-only property returns the Node within which the Range ends. To change the end position of a node, use the Range.setEnd() method or a similar one.

    Definition Classes
    AbstractRange
  16. def endOffset: Int

    The Range.endOffset read-only property returns a number representing where in the Range.endContainer the Range ends.

    The Range.endOffset read-only property returns a number representing where in the Range.endContainer the Range ends.

    Definition Classes
    AbstractRange
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def extractContents(): DocumentFragment

    The Range.extractContents() method moves contents of the Range from the document tree into a DocumentFragment.

  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def getBoundingClientRect(): DOMRect

    The Range.getBoundingClientRect() method returns a DOMRect object that bounds the contents of the range; this a rectangle enclosing the union of the bounding rectangles for all the elements in the range.

  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getClientRects(): DOMRectList

    The Range.getClientRects() method returns a list of ClientRect objects representing the area of the screen occupied by the range.

    The Range.getClientRects() method returns a list of ClientRect objects representing the area of the screen occupied by the range. This is created by aggregating the results of calls to Element.getClientRects() for all the elements in the range.

  24. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def insertNode(newNode: Node): Unit

    The Range.insertNode() method inserts a node at the start of the Range.

  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  33. def selectNode(refNode: Node): Unit

    The Range.selectNode() method sets the Range to contain the Node and its contents.

    The Range.selectNode() method sets the Range to contain the Node and its contents. The parent Node of the start and end of the Range will be the same as the parent of the referenceNode.

  34. def selectNodeContents(refNode: Node): Unit

    The Range.selectNodeContents() sets the Range to contain the contents of a Node.

  35. def setEnd(refNode: Node, offset: Int): Unit

    The Range.setEnd() method sets the end position of a Range.

  36. def setEndAfter(refNode: Node): Unit

    The Range.setEndAfter() method sets the end position of a Range relative to another Node.

    The Range.setEndAfter() method sets the end position of a Range relative to another Node. The parent Node of end of the Range will be the same as that for the referenceNode.

  37. def setEndBefore(refNode: Node): Unit

    The Range.setEndBefore() method sets the end position of a Range relative to another Node.

    The Range.setEndBefore() method sets the end position of a Range relative to another Node. The parent Node of end of the Range will be the same as that for the referenceNode.

  38. def setStart(refNode: Node, offset: Int): Unit

    The Range.setStart() method sets the start position of a Range.

  39. def setStartAfter(refNode: Node): Unit

    The Range.setStartAfter() method sets the start position of a Range relative to a Node.

    The Range.setStartAfter() method sets the start position of a Range relative to a Node. The parent Node of the start of the Range will be the same as that for the referenceNode.

  40. def setStartBefore(refNode: Node): Unit

    The Range.setStartBefore() method sets the start position of a Range relative to another Node.

    The Range.setStartBefore() method sets the start position of a Range relative to another Node. The parent Node of the start of the Range will be the same as that for the referenceNode.

  41. def startContainer: Node

    The Range.startContainer read-only property returns the Node within which the Range starts.

    The Range.startContainer read-only property returns the Node within which the Range starts. To change the start position of a node, use one of the Range.setStart() methods.

    Definition Classes
    AbstractRange
  42. def startOffset: Int

    The Range.startOffset read-only property returns a number representing where in the startContainer the Range starts.

    The Range.startOffset read-only property returns a number representing where in the startContainer the Range starts.

    Definition Classes
    AbstractRange
  43. def surroundContents(newParent: Node): Unit

    The Range.surroundContents() method moves content of the Range into a new node, placing the new node at the start of the specified range.

  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toLocaleString(): String
    Definition Classes
    Object
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def valueOf(): Any
    Definition Classes
    Object
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AbstractRange

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped