Trevixal API
    Preparing search index...

    Function createTableOfContents

    • A navigable table of contents built from the document's headings.

      Nesting is derived from a stack rather than from the raw level numbers, so a document that skips a level (h1 → h3, the common real-world case) still produces well-formed <ul>/<li> markup instead of an orphaned list.

      Nothing here touches the document: clicking an entry moves the selection to the heading and scrolls it into view.

      Parameters

      Returns TableOfContents