Build a nested table of contents from the headings inside a content region
and render it as a list of anchor links, replacing the nav's placeholder
content (which is restored on destroy). With scrollSpy enabled, the entry
for the heading currently in view is marked with aria-current, and that
heading's id is observable through onValueChange/hl:change and
controllable through the returned API. The list rebuilds itself when the
content region changes (watch); refresh() forces one. Markup can set
data-hl-content-selector, data-hl-headings, data-hl-scroll-spy, and
data-hl-watch on the root.
Build a nested table of contents from the headings inside a content region and render it as a list of anchor links, replacing the nav's placeholder content (which is restored on destroy). With
scrollSpyenabled, the entry for the heading currently in view is marked witharia-current, and that heading's id is observable throughonValueChange/hl:changeand controllable through the returned API. The list rebuilds itself when the content region changes (watch);refresh()forces one. Markup can setdata-hl-content-selector,data-hl-headings,data-hl-scroll-spy, anddata-hl-watchon the root.