As said
here, offset specifies the numeric position of the note in the text of the target element.
The offset option is the index of the character which the note should be placed
before.
If offset=0 (the default), the note is placed before the text.
If offset=-1, the note is placed before the last character.
If the insertion point depends on the content, the application may compute the offset using index() or a regex-based search.
The meaning of the offset parameter in
setNote is consistent with
setBookmark.