package.elm-lang.org
package.elm-lang.org copied to clipboard
Can't link to top of module documentation page
The top autogenerated H1 title of each module documentation page doesn't have id, so there is no way to link to top of module documentation page.
For example link https://package.elm-lang.org/packages/elm/core/latest/List doesn't go to top of the page when that link is used within package.elm-lang.org, and there is currently no id to create a link like https://package.elm-lang.org/packages/elm/core/latest/List#top-of-the-page
I suggest that an id is added to that title, which won't clash with any potential other ids. Perhaps _top_ would be OK, as it's unlikely any package would publish function named _top_.
top would clash with function top or type Top, and -top- would clash with example below, so those two can't be used.
## `top`
Or perhaps better fix would be to use the code shown at https://package.elm-lang.org/packages/elm/browser/latest/Browser-Dom#setViewport for every URL which doesn't have hash.