Releases: mitranim/simple-pjax
0.3.0
Now emits a special event before replacing the document, giving you the hook to perform cleanup, like unmounting React components (turns out we need to do that). The event name is simple-pjax-before-transition
.
Breaking: the after-transition event is now simple-pjax-after-transition
, rather than DOMContentLoaded
like before.
In short:
- perform cleanup on
simple-pjax-before-transition
- set up the DOM on
simple-pjax-after-transition
0.2.9
0.2.8
0.2.6
0.2.5
The DOMContentLoaded
event is now dispatched before adjusting scroll position.
If pjax.scrollOffsetSelector
is configured, the library will quietly adjust the scroll position during hash transitions on the same page, i.e. when <a href="#something">
is clicked. This is done without ajax, and the only difference from native hash transitions is that the scroll position is offset by the height of the given fixed-positioned element (i.e. the navbar). In addition, clicking a non-hash link leading to the current page will scroll the page up, iOS-style.
In Blink, popstate transitions (clicking back and forward buttons) between different pages no longer cause the scrolling position to change twice.