Class/Object

org.scalajs.dom.raw

Range

Related Docs: object Range | package raw

Permalink

class Range extends Object

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.

MDN

Annotations
@RawJSType() @native()
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

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

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

    MDN

  7. def cloneRange(): Range

    Permalink

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

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

    MDN

  8. def collapse(toStart: Boolean): Unit

    Permalink

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

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

    MDN

  9. def collapsed: Boolean

    Permalink

    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.

    MDN

  10. def commonAncestorContainer: Node

    Permalink

    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.

    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.

    MDN

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

    Permalink

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

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

    MDN

  12. def createContextualFragment(fragment: String): DocumentFragment

    Permalink

    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.

    MDN

  13. def deleteContents(): Unit

    Permalink

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

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

    MDN

  14. def detach(): Unit

    Permalink

    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.

    MDN

  15. def endContainer: Node

    Permalink

    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.

    MDN

  16. def endOffset: Int

    Permalink

    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.

    MDN

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

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

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

    Permalink

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

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

    MDN

  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def getBoundingClientRect(): ClientRect

    Permalink

    The Range.getBoundingClientRect() method returns a ClientRect 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.

    The Range.getBoundingClientRect() method returns a ClientRect 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.

    MDN

  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def getClientRects(): ClientRectList

    Permalink

    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.

    MDN

  24. def hasOwnProperty(v: String): Boolean

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

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

    Permalink

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

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

    MDN

  27. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Object
  33. def selectNode(refNode: Node): Unit

    Permalink

    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.

    MDN

  34. def selectNodeContents(refNode: Node): Unit

    Permalink

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

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

    MDN

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

    Permalink

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

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

    MDN

  36. def setEndAfter(refNode: Node): Unit

    Permalink

    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.

    MDN

  37. def setEndBefore(refNode: Node): Unit

    Permalink

    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.

    MDN

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

    Permalink

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

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

    MDN

  39. def setStartAfter(refNode: Node): Unit

    Permalink

    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.

    MDN

  40. def setStartBefore(refNode: Node): Unit

    Permalink

    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.

    MDN

  41. def startContainer: Node

    Permalink

    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.

    MDN

  42. def startOffset: Int

    Permalink

    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.

    MDN

  43. def surroundContents(newParent: Node): Unit

    Permalink

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

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

    MDN

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. 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