Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/gentle-frames-answer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@frontify/app-bridge-app": patch
---

fix: send the connection handshake to the embedding window instead of the top window

Apps now connect when the platform hosting them is itself embedded in an iframe, such as the asset chooser inside another page. The handshake also no longer reaches the top-level page.
2 changes: 1 addition & 1 deletion packages/app-bridge-app/src/utilities/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { type NotifyData, type NotifyOptions } from '../types/Notify.ts';

export function notify<T>(topic: string, token: string, data?: NotifyData<T>, options?: NotifyOptions): void {
const parentWindow = window.top;
const parentWindow = window.parent;
parentWindow?.postMessage(
{
topic,
Expand Down
Loading