Pjax
Pjax copied to clipboard
Reduce changes to session history entry
Motivation and Context
- Ignore session history entries that are not pushed / replaced by Pjax.
- Change window scroll restoration mode only when needed.
- Use the
scrollRestorationoption when leaving, not entering a page.
How Has This Been Tested?
Unfortunately, there isn't a test plan for src/index.ts, yet.
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] Refactor (no bug fix and new feature but improvements)
Checklist:
- [ ] My change requires new tests.
- [ ] I have added tests to cover my changes.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.