Besides a warning if the URL of a fragment targeted by a a[data-swup-link-to-fragment] would already match the current url, that URL was also not being applied to the link. I see no reason why it shouldn't do so anyways. I currently have a more complex project where I needed this.
Drive-By
extend FragmentElement from HTMLElement instead of Element
Checks
[x] The PR is submitted to the master branch
[x] The code was linted before pushing (npm run lint)
Description
Besides a warning if the URL of a fragment targeted by a
a[data-swup-link-to-fragment]
would already match the current url, that URL was also not being applied to the link. I see no reason why it shouldn't do so anyways. I currently have a more complex project where I needed this.Drive-By
FragmentElement
fromHTMLElement
instead ofElement
Checks
master
branchnpm run lint
)npm run test
)