xpine 0.0.39 → 0.0.40

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.
@@ -169,17 +169,20 @@ function replaceAttributesOnDocumentBody(dom) {
169
169
  }
170
170
  }
171
171
  async function handleBackButton() {
172
+ const url = window.history.state?.targetHref || window.location.href;
172
173
  const initEvent = new CustomEvent("spa-popstate-initiated", {
173
174
  detail: {
174
- href: window.history.state?.targetHref || window.location.href
175
+ href: url,
176
+ url: safeParseURL(url)
175
177
  }
176
178
  });
177
179
  window.dispatchEvent(initEvent);
178
180
  if (window.xpineIgnorePopState) return;
179
- await getNewPageContent(window.history.state?.targetHref || window.location.href);
181
+ await getNewPageContent(url);
180
182
  const updatedEvent = new CustomEvent("spa-popstate-updated", {
181
183
  detail: {
182
- href: window.history.state?.targetHref || window.location.href
184
+ href: url,
185
+ url: safeParseURL(url)
183
186
  }
184
187
  });
185
188
  window.dispatchEvent(updatedEvent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xpine",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "main": "dist/index.js",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-secrets-manager": "^3.758.0",