Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/website/awaited-dom/CaretPosition.md
1028 views

AwaitedDOM / CaretPosition

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Properties

.offset
W3C {#offset}

Returns a long representing the character offset in the caret position node.

Type: Promise<number>

.offsetNode
W3C {#offsetNode}

Returns a Node containing the found node at the caret's position.

Type: SuperNode

Methods

.getClientRect*()*
W3C {#getClientRect}

Needs content.

Returns: DOMRect