Hiyve Components - v1.0.0
    Preparing search index...
    • Poll read() until it returns a value different from baseline, then call onChange with it. Gives up after timeoutMs. Returns a cancel function.

      The engine commits a click on the score a moment after the DOM event (it waits to rule out a double-click), so reading the selection straight away returns the previous click's note. Waiting for the value to change is robust to the engine's exact timing.

      Parameters

      • read: () => number | null
      • baseline: number | null
      • onChange: (value: number) => void
      • timeoutMs: number
      • deps: PollDeps

      Returns () => void