diff --git a/iframe-fetch-client/MESSAGING_PROTOCOL.md b/iframe-fetch-client/MESSAGING_PROTOCOL.md index a5907d93..91cd5cfe 100644 --- a/iframe-fetch-client/MESSAGING_PROTOCOL.md +++ b/iframe-fetch-client/MESSAGING_PROTOCOL.md @@ -148,51 +148,35 @@ consistent handling of both text and binary data across the messaging protocol. **Result:** None (notification only, no response expected) -### `navigate` +### Navigation Methods -**Purpose:** Navigate the iframe to a new URL within the same origin - -**Parameters:** - -- `url` (string): The URL to navigate to (must be same origin) - -**Result:** None (notification only, no response expected) - -### `refresh` +#### `navigate` +**Purpose:** Navigate iframe to a new URL within the same origin +**Parameters:** `url` (string) - Target URL (must be same origin) +**Result:** None (notification only) +#### `refresh` **Purpose:** Refresh/reload the current page in the iframe - **Parameters:** None +**Result:** None (notification only) -**Result:** None (notification only, no response expected) - -### `goBack` - +#### `goBack` **Purpose:** Navigate back in the iframe's history - **Parameters:** None +**Result:** None (notification only) -**Result:** None (notification only, no response expected) - -### `goForward` - +#### `goForward` **Purpose:** Navigate forward in the iframe's history - **Parameters:** None +**Result:** None (notification only) -**Result:** None (notification only, no response expected) - -### `updateNavigationState` - -**Purpose:** Update the parent about the iframe's current navigation state - +#### `updateNavigationState` +**Purpose:** Update parent about iframe's current navigation state **Parameters:** - -- `currentUrl` (string): The current URL of the iframe -- `canGoBack` (boolean): Whether the iframe can go back in history -- `canGoForward` (boolean): Whether the iframe can go forward in history - -**Result:** None (notification only, no response expected) +- `currentUrl` (string) - Current URL of the iframe +- `canGoBack` (boolean) - Whether iframe can go back in history +- `canGoForward` (boolean) - Whether iframe can go forward in history +**Result:** None (notification only) ## Implementation diff --git a/iframe-fetch-client/_iframe-client/main.js b/iframe-fetch-client/_iframe-client/main.js index ec1e9193..ee42e970 100644 --- a/iframe-fetch-client/_iframe-client/main.js +++ b/iframe-fetch-client/_iframe-client/main.js @@ -414,8 +414,6 @@ class FetchClient { console.warn('loadSiteIndex: Failed to read initial path from sessionStorage:', error); } - - const serializedRequest = { url: `${location.origin}/`, method: "GET", @@ -493,8 +491,6 @@ class FetchClient { document.body.appendChild(newScript); }); - - // Ensure initial navigation after document is loaded this.ensureInitialNavigation(); }