Class/Object

io.scalajs.dom

Range

Related Docs: object Range | package dom

Permalink

class Range extends Object

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

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 or the caretRangeAtPoint() method of the Document object.

Annotations
@RawJSType() @native()
See also

https://developer.mozilla.org/en-US/docs/Web/API/Range

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Range
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Range()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def cloneContents(): DocumentFragment

    Permalink

    Returns a DocumentFragment copying the nodes of a Range.

  7. def cloneRange(): Range

    Permalink

    Returns a Range object with boundary points identical to the cloned Range.

  8. def collapse(toStart: Boolean = js.native): Unit

    Permalink

    Collapses the Range to one of its boundary points.

    Collapses the Range to one of its boundary points.

    toStart

    Optional: A boolean value: true collapses the Range to its start, false to its end. If omitted, it defaults to false

  9. def collapsed: Boolean

    Permalink

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

  10. def commonAncestorContainer: Node

    Permalink

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

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

    Permalink

    Compares the boundary points of the Range with another Range.

    Compares the boundary points of the Range with another Range.

    how

    A constant describing the comparison method:

    sourceRange

    A Range to compare boundary points with the range.

    returns

    A number, -1, 0, or 1, indicating whether the corresponding boundary-point of the Range is respectively before, equal to, or after the corresponding boundary-point of sourceRange.

  12. def deleteContents(): Unit

    Permalink

    Removes the contents of a Range from the Document.

  13. def detach(): Unit

    Permalink

    Releases the Range from use to improve performance.

  14. def endContainer: Node

    Permalink

    Returns the Node within which the Range ends.

  15. def endOffset: Int

    Permalink

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

  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def extractContents(): DocumentFragment

    Permalink

    Moves contents of a Range from the document tree into a DocumentFragment.

  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def insertNode(newNode: Node): Unit

    Permalink

    Insert a Node at the start of a Range.

    Insert a Node at the start of a Range.

    newNode

    The Node to insert at the start of the range.

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  30. def selectNode(referenceNode: Node): Unit

    Permalink

    Sets the Range to contain the Node and its contents.

    Sets the Range to contain the Node and its contents.

    referenceNode

    The Node to select within a Range.

  31. def selectNodeContents(referenceNode: Node): Unit

    Permalink

    Sets the Range to contain the contents of a Node.

    Sets the Range to contain the contents of a Node.

    referenceNode

    The Node whose contents will be selected within a Range.

  32. def setEnd(endNode: Node, endOffset: Int): Unit

    Permalink

    Sets the end position of a Range.

    Sets the end position of a Range.

    endNode

    The Node where the Range should end.

    endOffset

    An integer greater than or equal to zero representing the offset for the end of the Range from the start of endNode.

  33. def setEndAfter(referenceNode: Node): Unit

    Permalink

    Sets the end position of a Range relative to another Node.

    Sets the end position of a Range relative to another Node.

    referenceNode

    The Node to end the Range after.

  34. def setEndBefore(referenceNode: Node): Unit

    Permalink

    Sets the end position of a Range relative to another Node.

    Sets the end position of a Range relative to another Node.

    referenceNode

    The Node to end the Range before.

  35. def setStart(startNode: Node, startOffset: Int): Unit

    Permalink

    Sets the start position of a Range.

    Sets the start position of a Range.

    startNode

    The Node where the Range should start.

    startOffset

    An integer greater than or equal to zero representing the offset for the start of the Range from the start of startNode.

  36. def setStartAfter(referenceNode: Node): Unit

    Permalink

    Sets the start position of a Range relative to another Node.

    Sets the start position of a Range relative to another Node.

    referenceNode

    The Node to start the Range after.

  37. def setStartBefore(referenceNode: Node): Unit

    Permalink

    Sets the start position of a Range relative to another Node.

    Sets the start position of a Range relative to another Node.

    referenceNode

    The Node before which the Range should start.

  38. def startContainer: Node

    Permalink

    Returns the Node within which the Range starts.

  39. def startOffset: Int

    Permalink

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

  40. def surroundContents(newNode: Node): Unit

    Permalink

    Moves content of a Range into a new Node.

  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  43. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  44. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  45. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped