a unique id of the cursor's HTMLElement in its document, or in its shadow root (e.g. of a web component). Should be constant between re-renders and backend changes, but different between the cursors in the same document or shadow root, also those of different OSMD objects.
The desired zIndex (layer) of the cursor when no background color is set. When a background color is set, using a negative zIndex would make the cursor invisible.
Hides and removes the cursor element, deletes object variables.
Optionalinstrument: InstrumentHide the cursor.
Initialize the cursor. Necessary before using functions like show() and next().
Go to next entry / note / vertical position.
Moves to the first position of the next measure in playback order (repetitions unrolled, like next()), from the last measure to the end.
Optionalinstrument: InstrumentGo to previous entry / note / vertical position.
Moves to the first position of the previous measure in score order (like previous(), which doesn't unroll repetitions backwards): from the end to the last measure, from the first measure to the front (before the first note). A measure's first position is its first one with visible notes, e.g. the one after a hidden rest.
Releases the sheet the cursor was initialized with (see init()), so that the sheet and its rendering can be garbage collected while the cursor is kept, e.g. by osmd.clear(). Until init() is called again (by osmd.load()), the cursor stays hidden, Iterator is undefined, functions like next() and show() do nothing, and there are no notes under the cursor.
reset cursor to start position (start of sheet or osmd.Sheet.SelectionStart if set).
Make the cursor visible.
Moves the cursor to the current position of the iterator (visually), e.g. after next().
Check if there was a change in current page, and attach cursor element to the corresponding HTMLElement (div). This is only necessary if using PageFormat (multiple pages).
returns voices under the current Cursor position. Without instrument argument, all voices are returned.
Optionalinstrument: Instrument
A cursor which can iterate through the music sheet.