Method ScrollToAnchor
ScrollToAnchor(string)
Scrolls the viewport so that the heading matching the given anchor slug is visible at the top.
public bool ScrollToAnchor(string anchor)
Parameters
anchorstringThe anchor identifier (with or without a leading
#). Anchors are generated from heading text using GitHub-style slug rules: lowercase, spaces become hyphens, non-alphanumeric characters are removed, and duplicate headings receive-1,-2, etc. suffixes.