Liking cljdoc? Tell your friends :D

web.Selection

A Selection object represents the range of text selected by the or the current position of the caret. To obtain a Selection object examination or manipulation, call web.Window.getSelection().

A Selection object represents the range of text selected by the
or the current position of the caret. To obtain a Selection object
examination or manipulation, call `web.Window.getSelection()`.
raw docstring

add-rangecljs

(add-range this range)

Method.

The Selection.addRange() method adds a web.Range to a web.Selection.

selection.addRange(range);

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/addRange

Method.

The Selection.addRange() method adds a `web.Range` to a `web.Selection`.

`selection.addRange(range);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/addRange`
sourceraw docstring

anchor-nodecljs

(anchor-node this)

Property.

The Selection.anchorNode read-only property returns the web.Node which the selection begins.

node = sel.anchorNode

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/anchorNode

Property.

The Selection.anchorNode read-only property returns the `web.Node`
which the selection begins.

`node = sel.anchorNode`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/anchorNode`
sourceraw docstring

anchor-offsetcljs

(anchor-offset this)

Property.

The Selection.anchorOffset read-only property returns the number characters that the selection's anchor is offset within the web.Selection.anchorNode.

number = sel.anchorOffset

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/anchorOffset

Property.

The Selection.anchorOffset read-only property returns the number
characters that the selection's anchor is offset within the `web.Selection.anchorNode`.

`number = sel.anchorOffset`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/anchorOffset`
sourceraw docstring

collapsecljs

(collapse this node offset)

Method.

The Selection.collapse() method collapses the current selection a single point. The document is not modified. If the content focused and editable, the caret will blink there.

sel.collapse(node, offset);

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapse

Method.

The Selection.collapse() method collapses the current selection
a single point. The document is not modified. If the content
focused and editable, the caret will blink there.

`sel.collapse(node, offset);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapse`
sourceraw docstring

collapse-to-endcljs

(collapse-to-end this)

Method.

The Selection.collapseToEnd() method collapses the selection the end of the last range in the selection. If the content of selection is focused and editable, the caret will blink there.

sel.collapseToEnd()

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapseToEnd

Method.

The Selection.collapseToEnd() method collapses the selection
the end of the last range in the selection. If the content of
selection is focused and editable, the caret will blink there.

`sel.collapseToEnd()`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapseToEnd`
sourceraw docstring

collapse-to-startcljs

(collapse-to-start this)

Method.

The Selection.collapseToStart() method collapses the selection the start of the first range in the selection. If the content the selection is focused and editable, the caret will blink there.

sel.collapseToStart()

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapseToStart

Method.

The Selection.collapseToStart() method collapses the selection
the start of the first range in the selection. If the content
the selection is focused and editable, the caret will blink there.

`sel.collapseToStart()`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/collapseToStart`
sourceraw docstring

contains-nodecljs

(contains-node this node partial-containment)

Method.

The Selection.containsNode() method indicates whether a specfied is part of the selection.

sel.containsNode(node, partialContainment)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/containsNode

Method.

The Selection.containsNode() method indicates whether a specfied
is part of the selection.

`sel.containsNode(node, partialContainment)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/containsNode`
sourceraw docstring

delete-from-documentcljs

(delete-from-document this)

Method.

The deleteFromDocument() method of the web.Selection interface the selected text from the document's DOM.

sel.deleteFromDocument()

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/deleteFromDocument

Method.

The deleteFromDocument() method of the `web.Selection` interface
the selected text from the document's DOM.

`sel.deleteFromDocument()`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/deleteFromDocument`
sourceraw docstring

extendcljs

(extend this node offset)

Method.

The Selection.extend() method moves the focus of the selection a specified point. The anchor of the selection does not move. selection will be from the anchor to the new focus, regardless direction.

sel.extend(node, offset)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/extend

Method.

The Selection.extend() method moves the focus of the selection
a specified point. The anchor of the selection does not move.
selection will be from the anchor to the new focus, regardless
direction.

`sel.extend(node, offset)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/extend`
sourceraw docstring

focus-nodecljs

(focus-node this)

Property.

The Selection.focusNode read-only property returns the web.Node which the selection ends.

node = sel.focusNode

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/focusNode

Property.

The Selection.focusNode read-only property returns the `web.Node`
which the selection ends.

`node = sel.focusNode`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/focusNode`
sourceraw docstring

focus-offsetcljs

(focus-offset this)

Property.

The Selection.focusOffset read-only property returns the number characters that the selection's focus is offset within the web.Selection.focusNode.

offset = sel.focusOffset

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/focusOffset

Property.

The Selection.focusOffset read-only property returns the number
characters that the selection's focus is offset within the `web.Selection.focusNode`.

`offset = sel.focusOffset`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/focusOffset`
sourceraw docstring

get-range-atcljs

(get-range-at this index)

Method.

The Selection.getRangeAt() method returns a range object representing of the ranges currently selected.

range = sel.getRangeAt(index)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/getRangeAt

Method.

The Selection.getRangeAt() method returns a range object representing
of the ranges currently selected.

`range = sel.getRangeAt(index)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/getRangeAt`
sourceraw docstring

is-collapsedcljs

(is-collapsed this)

Property.

The Selection.isCollapsed read-only property returns a web.Boolean indicates whether or not there is currently any text selected. text is selected when the selection's start and end points are the same position in the content.

bool = sel.isCollapsed

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/isCollapsed

Property.

The Selection.isCollapsed read-only property returns a `web.Boolean`
indicates whether or not there is currently any text selected.
text is selected when the selection's start and end points are
the same position in the content.

`bool = sel.isCollapsed`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/isCollapsed`
sourceraw docstring

modifycljs

(modify this alter direction granularity)

Method.

The Selection.modify() method applies a change to the current or cursor position, using simple textual commands.

sel.modify(alter, direction, granularity)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/modify

Method.

The Selection.modify() method applies a change to the current
or cursor position, using simple textual commands.

`sel.modify(alter, direction, granularity)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/modify`
sourceraw docstring

range-countcljs

(range-count this)

Property.

The Selection.rangeCount read-only property returns the number ranges in the selection.

value = sel.rangeCount

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/rangeCount

Property.

The Selection.rangeCount read-only property returns the number
ranges in the selection.

`value = sel.rangeCount`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/rangeCount`
sourceraw docstring

remove-all-rangescljs

(remove-all-ranges this)

Method.

The Selection.removeAllRanges() method removes all ranges from selection, leaving the web.anchorNode and web.focusNode properties to null and leaving nothing selected.

sel.removeAllRanges();

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/removeAllRanges

Method.

The Selection.removeAllRanges() method removes all ranges from
selection, leaving the `web.anchorNode` and `web.focusNode` properties
to null and leaving nothing selected.

`sel.removeAllRanges();`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/removeAllRanges`
sourceraw docstring

remove-rangecljs

(remove-range this range)

Method.

The Selection.removeRange() method removes a range from a selection.

sel.removeRange(range)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/removeRange

Method.

The Selection.removeRange() method removes a range from a selection.

`sel.removeRange(range)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/removeRange`
sourceraw docstring

select-all-childrencljs

(select-all-children this parent-node)

Method.

The Selection.selectAllChildren() method adds all the children the specified node to the selection. Previous selection is lost.

sel.selectAllChildren(parentNode)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/selectAllChildren

Method.

The Selection.selectAllChildren() method adds all the children
the specified node to the selection. Previous selection is lost.

`sel.selectAllChildren(parentNode)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/selectAllChildren`
sourceraw docstring

set-base-and-extentcljs

(set-base-and-extent this anchor-node anchor-offset focus-node focus-offset)

Method.

The setBaseAndExtent() method of the web.Selection interface the selection to be a range including all or parts of two specified nodes, and any content located between them.

sel.setBaseAndExtent(anchorNode,anchorOffset,focusNode,focusOffset)

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/setBaseAndExtent

Method.

The setBaseAndExtent() method of the `web.Selection` interface
the selection to be a range including all or parts of two specified
nodes, and any content located between them.

`sel.setBaseAndExtent(anchorNode,anchorOffset,focusNode,focusOffset)`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/setBaseAndExtent`
sourceraw docstring

set-type!cljs

(set-type! this val)

Property.

The type read-only property of the web.Selection interface a dom.DOMString describing the type of the current selection.

value = sel.type

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/type

Property.

The type read-only property of the `web.Selection` interface
a `dom.DOMString` describing the type of the current selection.

`value = sel.type`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/type`
sourceraw docstring

to-stringcljs

(to-string this)

Method.

The Selection.toString() method returns a string currently being by the selection object, i.e. the currently selected text.

sel.toString()

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/toString

Method.

The Selection.toString() method returns a string currently being
by the selection object, i.e. the currently selected text.

`sel.toString()`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/toString`
sourceraw docstring

typecljs

(type this)

Property.

The type read-only property of the web.Selection interface a dom.DOMString describing the type of the current selection.

value = sel.type

See also: https://developer.mozilla.org/en-US/docs/Web/API/Selection/type

Property.

The type read-only property of the `web.Selection` interface
a `dom.DOMString` describing the type of the current selection.

`value = sel.type`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/Selection/type`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close