-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect swup link selector for preloaded links #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will test this should I ever need it 😄
Do you think this should be mentioned in the docs?
@hirasso I had to merge from master to fix merge conflicts, please re-approve :) |
@hirasso I'll double-check that this still respects the link selector — this was meant as a fix for setups where swup is configured to load links in SVGs but the preload plugin didn't support that. In that sense, probably no reason to append the docs as we're aiming for the plugin to just work as configured from the core. |
@hirasso Please re-review :) I've added some more tests about respecting swup's link selector and upgraded Playwright — apparently Chrome only started observing single SVG links in IntersectionObserver since the most recent version 121 🤠 |
Very interesting! That's how we get to be hyper nerds regarding cross-browser knowledge 🤓 |
Description
Drive-by changes
swup.preload(url)
if no url is passed in (homepage still works as it should be'/'
anyway)Checks
master
branchnpm run lint
)npm run test
)The documentation was updated as required