Commit 01431523 authored by Robert Knight's avatar Robert Knight

Add comments explaining purpose of selector types

parent 08fd737c
......@@ -22,6 +22,9 @@
*/
/**
* Selector which identifies a document region using the selected text plus
* the surrounding context.
*
* @typedef TextQuoteSelector
* @prop {'TextQuoteSelector'} type
* @prop {string} exact
......@@ -30,6 +33,9 @@
*/
/**
* Selector which identifies a document region using UTF-16 character offsets
* in the document body's `textContent`.
*
* @typedef TextPositionSelector
* @prop {'TextPositionSelector'} type
* @prop {number} start
......@@ -37,6 +43,8 @@
*/
/**
* Selector which identifies a document region using XPaths and character offsets.
*
* @typedef RangeSelector
* @prop {'RangeSelector'} type
* @prop {string} startContainer
......@@ -46,6 +54,9 @@
*/
/**
* Serialized representation of a region of a document which an annotation
* pertains to.
*
* @typedef {TextQuoteSelector | TextPositionSelector | RangeSelector} Selector
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment