xpine 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/static/spa.js +3 -2
- package/package.json +1 -1
package/dist/src/static/spa.js
CHANGED
|
@@ -27,7 +27,8 @@ async function updatePageOnLinkClick(e) {
|
|
|
27
27
|
window.history.pushState(
|
|
28
28
|
{
|
|
29
29
|
type: "link-click",
|
|
30
|
-
targetHref
|
|
30
|
+
hrefTarget: targetHref,
|
|
31
|
+
href: newURL?.href
|
|
31
32
|
},
|
|
32
33
|
"",
|
|
33
34
|
targetHref
|
|
@@ -169,7 +170,7 @@ function replaceAttributesOnDocumentBody(dom) {
|
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
async function handleBackButton() {
|
|
172
|
-
const url = window.history.state?.
|
|
173
|
+
const url = window.history.state?.url?.href || window.location.href;
|
|
173
174
|
const initEvent = new CustomEvent("spa-popstate-initiated", {
|
|
174
175
|
detail: {
|
|
175
176
|
href: url,
|