Liking cljdoc? Tell your friends :D

web.Range

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

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

clone-contentscljs

(clone-contents this)

Method.

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

documentFragment = range.cloneContents();

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

Method.

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

`documentFragment = range.cloneContents();`

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

clone-rangecljs

(clone-range this)

Method.

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

clone = range.cloneRange();

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

Method.

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

`clone = range.cloneRange();`

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

collapsecljs

(collapse this to-start)

Method.

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

range.collapse(toStart);

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

Method.

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

`range.collapse(toStart);`

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

collapsedcljs

(collapsed this)

Property.

[Read Only]

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

isCollapsed = range.collapsed;

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

Property.

[Read Only]

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

`isCollapsed = range.collapsed;`

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

common-ancestor-containercljs

(common-ancestor-container this)

Property.

[Read Only]

The Range.commonAncestorContainer read-only property returns deepest — or furthest down the document tree — web.Node that both boundary points of the web.Range. This means that if Range.startContainer Range.endContainer both refer to the same node, this node is common ancestor container.

rangeAncestor = range.commonAncestorContainer;

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

Property.

[Read Only]

The Range.commonAncestorContainer read-only property returns
deepest — or furthest down the document tree — `web.Node` that
both boundary points of the `web.Range`. This means that if `Range.startContainer`
`Range.endContainer` both refer to the same node, this node is
common ancestor container.

`rangeAncestor = range.commonAncestorContainer;`

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

compare-boundary-pointscljs

(compare-boundary-points this how source-range)

Method.

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

compare = range.compareBoundaryPoints(how, sourceRange);

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

Method.

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

`compare = range.compareBoundaryPoints(how, sourceRange);`

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

compare-nodecljs

(compare-node this & args)

Method.

[Non Standard] [Obsolute]

The Range.compareNode() returns a constant indicating the position the web.Node.

returnValue = range.compareNode( referenceNode );

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

Method.

[Non Standard]
[Obsolute]

The Range.compareNode() returns a constant indicating the position
the `web.Node`.

`returnValue = range.compareNode( referenceNode );`

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

compare-pointcljs

(compare-point this reference-node offset)

Method.

[Experimental]

The Range.comparePoint() method returns -1, 0, or 1 depending whether the referenceNode is before, the same as, or after the

returnValue = range.comparePoint(referenceNode, offset)

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

Method.

[Experimental]

The Range.comparePoint() method returns -1, 0, or 1 depending
whether the referenceNode is before, the same as, or after the

`returnValue = range.comparePoint(referenceNode, offset)`

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

constructorcljs

(constructor & args)

Constructor.

The Range() constructor returns a newly created web.Range object whose start and end is the global web.Document object.

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

Constructor.

The Range() constructor returns a newly created `web.Range` object whose start and end is the global `web.Document` object.

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

create-contextual-fragmentcljs

(create-contextual-fragment this tag-string)

Method.

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

documentFragment = range.createContextualFragment(tagString)

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

Method.

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

`documentFragment = range.createContextualFragment(tagString)`

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

delete-contentscljs

(delete-contents this)

Method.

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

range.deleteContents()

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

Method.

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

`range.deleteContents()`

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

detachcljs

(detach this)

Method.

The Range.detach() method does nothing. It used to disable the object and enable the browser to release associated resources. method has been kept for compatibility.

range.detach();

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

Method.

The Range.detach() method does nothing. It used to disable the
object and enable the browser to release associated resources.
method has been kept for compatibility.

`range.detach();`

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

end-containercljs

(end-container this)

Property.

[Read Only]

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

endRangeNode = range.endContainer;

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

Property.

[Read Only]

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

`endRangeNode = range.endContainer;`

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

end-offsetcljs

(end-offset this)

Property.

[Read Only]

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

endRangeOffset = range.endOffset;

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

Property.

[Read Only]

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

`endRangeOffset = range.endOffset;`

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

extract-contentscljs

(extract-contents this)

Method.

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

documentFragment = range.extractContents();

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

Method.

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

`documentFragment = range.extractContents();`

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

get-bounding-client-rectcljs

(get-bounding-client-rect this)

Method.

[Experimental]

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

boundingRect = range.getBoundingClientRect()

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

Method.

[Experimental]

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

`boundingRect = range.getBoundingClientRect()`

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

get-client-rectscljs

(get-client-rects this)

Method.

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

rectList = range.getClientRects()

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

Method.

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

`rectList = range.getClientRects()`

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

insert-nodecljs

(insert-node this new-node)

Method.

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

range.insertNode(newNode);

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

Method.

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

`range.insertNode(newNode);`

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

intersects-nodecljs

(intersects-node this & args)

Method.

[Experimental]

The Range.intersectsNode() method returns a boolean indicating the given web.Node intersects the web.Range.

bool = range.intersectsNode( referenceNode )

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

Method.

[Experimental]

The Range.intersectsNode() method returns a boolean indicating
the given `web.Node` intersects the `web.Range`.

`bool = range.intersectsNode( referenceNode )`

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

is-point-in-rangecljs

(is-point-in-range this & args)

Method.

[Experimental]

Range.isPointInRange() メソッドはweb.Rangeのなかで与えられたポイントを含むかどうかをbooleanで返します。true ReferenceNode の範囲内の offset にポイント(カーソル位置)がある場合に限ります。

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

Method.

[Experimental]

Range.isPointInRange() メソッドは`web.Range`のなかで与えられたポイントを含むかどうかをbooleanで返します。true
ReferenceNode の範囲内の offset にポイント(カーソル位置)がある場合に限ります。

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

select-nodecljs

(select-node this reference-node)

Method.

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

range.selectNode(referenceNode);

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

Method.

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

`range.selectNode(referenceNode);`

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

select-node-contentscljs

(select-node-contents this reference-node)

Method.

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

range.selectNodeContents(referenceNode);

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

Method.

The Range.selectNodeContents() method sets the `web.Range` to
the contents of a `web.Node`.

`range.selectNodeContents(referenceNode);`

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

set-endcljs

(set-end this end-node end-offset)

Method.

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

range.setEnd(endNode, endOffset);

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

Method.

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

`range.setEnd(endNode, endOffset);`

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

set-end-aftercljs

(set-end-after this reference-node)

Method.

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

range.setEndAfter(referenceNode);

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

Method.

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

`range.setEndAfter(referenceNode);`

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

set-end-beforecljs

(set-end-before this reference-node)

Method.

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

range.setEndBefore(referenceNode);

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

Method.

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

`range.setEndBefore(referenceNode);`

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

set-startcljs

(set-start this start-node start-offset)

Method.

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

range.setStart(startNode, startOffset);

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

Method.

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

`range.setStart(startNode, startOffset);`

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

set-start-aftercljs

(set-start-after this reference-node)

Method.

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

range.setStartAfter(referenceNode);

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

Method.

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

`range.setStartAfter(referenceNode);`

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

set-start-beforecljs

(set-start-before this reference-node)

Method.

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

range.setStartBefore(referenceNode);

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

Method.

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

`range.setStartBefore(referenceNode);`

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

start-containercljs

(start-container this)

Property.

[Read Only]

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

startRangeNode = range.startContainer;

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

Property.

[Read Only]

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

`startRangeNode = range.startContainer;`

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

start-offsetcljs

(start-offset this)

Property.

[Read Only]

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

startRangeOffset = range.startOffset;

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

Property.

[Read Only]

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

`startRangeOffset = range.startOffset;`

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

surround-contentscljs

(surround-contents this new-parent)

Method.

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

range.surroundContents(newParent);

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

Method.

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

`range.surroundContents(newParent);`

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

to-stringcljs

(to-string this)

Method.

The Range.toString() method is a stringifier returning the text the web.Range.

text = range.toString();

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

Method.

The Range.toString() method is a stringifier returning the text
the `web.Range`.

`text = range.toString();`

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

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

× close