iframe-coordinator-cli 5.0.0-beta.3 → 5.0.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iframe-coordinator-cli",
3
- "version": "5.0.0-beta.3",
3
+ "version": "5.0.0-beta.4",
4
4
  "description": "CLI for local iframe-coordinator development",
5
5
  "dependencies": {
6
6
  "cheerio": "^1.0.0-rc.10",
@@ -31,6 +31,7 @@
31
31
  <frame-router
32
32
  id="frameRouter"
33
33
  v-bind:route="frameRoute"
34
+ frame-id="ifc-cli-frame"
34
35
  v-on:notifyRequest="displayToast"
35
36
  v-on:registeredKeyFired="handleKeyEvent"
36
37
  v-on:navRequest="handleNav"
@@ -66,7 +67,14 @@ export default {
66
67
  handleNav(event) {
67
68
  // TODO: detect and handle external URLs properly
68
69
  const requestedUrl = new URL(event.detail.url);
69
- window.location.hash = requestedUrl.hash;
70
+
71
+ if (location.hash === requestedUrl.hash) {
72
+ // The requested navigation is for the current location, do nothing
73
+ } else if (event.detail.history === 'replace') {
74
+ window.location.replace(requestedUrl.hash);
75
+ } else {
76
+ window.location.hash = requestedUrl.hash;
77
+ }
70
78
  },
71
79
  handleKeyEvent(event) {
72
80
  this.$notify({