From f332a8b5ae8f943a49400e8bbc1638d7790af542 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 27 Sep 2022 17:33:02 -0500 Subject: [PATCH] doc(nc-gui): add comments about postMessage in shared-view layout --- packages/nc-gui/layouts/shared-view.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nc-gui/layouts/shared-view.vue b/packages/nc-gui/layouts/shared-view.vue index d3c7ae4e42..a23a834fa8 100644 --- a/packages/nc-gui/layouts/shared-view.vue +++ b/packages/nc-gui/layouts/shared-view.vue @@ -6,6 +6,11 @@ const router = useRouter() onMounted(() => { // check if we are inside an iframe + // if we are, communicate to the parent page whenever we navigate to a new url, + // so that the parent page can respond to it properly. + // E.g. by making the browser navigate to that url, and not just the iframe. + // This is useful for integrating NocoDB into other products, + // such as Outline (https://github.com/outline/outline/pull/4184). if (window.parent !== window) { const notifyLocationChange = (value: string) => window.parent.postMessage(