Class

org.scalajs.dom.raw

Selection

Related Doc: package raw

Permalink

class Selection extends Object

Selection is the class of the object returned by window.getSelection() and other methods. It represents the text selection in the greater page, possibly spanning multiple elements, when the user drags over static text and other parts of the page. For information about text selection in an individual text editing element, see Input, TextArea and document.activeElement which typically return the parent object returned from window.getSelection().

MDN

Annotations
@RawJSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Selection
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Selection()

    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. def addRange(range: Range): Unit

    Permalink

    A range object that will be added to the selection.

    A range object that will be added to the selection.

    MDN

  5. def anchorNode: Node

    Permalink

    Returns the node in which the selection begins.

    Returns the node in which the selection begins.

    MDN

  6. def anchorOffset: Int

    Permalink

    Returns a number representing the offset of the selection's anchor within the anchorNode.

    Returns a number representing the offset of the selection's anchor within the anchorNode. If anchorNode is a text node, this is the number of characters within anchorNode preceding the anchor. If anchorNode is an element, this is the number of child nodes of the anchorNode preceding the anchor.

    MDN

  7. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def collapse(parentNode: Node, offset: Int): Unit

    Permalink

    Collapses the current selection to a single point.

    Collapses the current selection to a single point. The document is not modified. If the content is focused and editable, the caret will blink there.

    MDN

  10. def collapseToEnd(): Unit

    Permalink

    Collapses the selection to the end of the last range in the selection.  If the content the selection is in is focused and editable, the caret will blink there.

    Collapses the selection to the end of the last range in the selection.  If the content the selection is in is focused and editable, the caret will blink there.

    MDN

  11. def collapseToStart(): Unit

    Permalink

    Collapses the selection to the start of the first range in the selection.  If the content of the selection is focused and editable, the caret will blink there.

    Collapses the selection to the start of the first range in the selection.  If the content of the selection is focused and editable, the caret will blink there.

    MDN

  12. def deleteFromDocument(): Unit

    Permalink

    Deletes the actual text being represented by a selection object from the document's DOM.

    Deletes the actual text being represented by a selection object from the document's DOM.

    MDN

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def focusNode: Node

    Permalink

    Returns the node in which the selection ends.

    Returns the node in which the selection ends.

    MDN

  17. def focusOffset: Int

    Permalink

    Returns a number representing the offset of the selection's anchor within the focusNode.

    Returns a number representing the offset of the selection's anchor within the focusNode. If focusNode is a text node, this is the number of characters within focusNode preceding the focus. If focusNode is an element, this is the number of child nodes of the focusNode preceding the focus.

    MDN

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getRangeAt(index: Int): Range

    Permalink

    Returns a range object representing one of the ranges currently selected.

    Returns a range object representing one of the ranges currently selected.

    MDN

  20. def hasOwnProperty(v: String): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def isCollapsed: Boolean

    Permalink

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

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

    MDN

  23. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Object
  29. def rangeCount: Int

    Permalink

    Returns the number of ranges in the selection.

    Returns the number of ranges in the selection.

    MDN

  30. def removeAllRanges(): Unit

    Permalink

    Removes all ranges from the selection, leaving the anchorNode and focusNode properties equal to null and leaving nothing selected.

    Removes all ranges from the selection, leaving the anchorNode and focusNode properties equal to null and leaving nothing selected.

    MDN

  31. def removeRange(range: Range): Unit

    Permalink

    Removes a range from the selection.

    Removes a range from the selection.

    MDN

  32. def selectAllChildren(parentNode: Node): Unit

    Permalink

    Adds all the children of the specified node to the selection.

    Adds all the children of the specified node to the selection. Previous selection is lost.

    MDN

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

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

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

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

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

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

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