From ebbf902814a03fab17db2772e93c712d8a752002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maicol=20Gonz=C3=A1lez?= Date: Fri, 29 Nov 2024 11:54:47 -0300 Subject: [PATCH] improved compatibility with iframes --- docs/web/custom-visualizations.md | 4 ++-- .../current/web/custom-visualizations.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/web/custom-visualizations.md b/docs/web/custom-visualizations.md index c4f1a940..00faa6a4 100644 --- a/docs/web/custom-visualizations.md +++ b/docs/web/custom-visualizations.md @@ -29,8 +29,8 @@ window.revealBridge = { } try { - if (window.top && window.top.location) { - window.top.postMessage(data, "*"); + if (window.parent && window.parent.location) { + window.parent.postMessage(data, "*"); } } catch (e) { // window.top.postMessage couldn't be executed. diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/web/custom-visualizations.md b/i18n/ja/docusaurus-plugin-content-docs/current/web/custom-visualizations.md index d7157124..c1a73d80 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/web/custom-visualizations.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/web/custom-visualizations.md @@ -29,8 +29,8 @@ window.revealBridge = { } try { - if (window.top && window.top.location) { - window.top.postMessage(data, "*"); + if (window.parent && window.parent.location) { + window.parent.postMessage(data, "*"); } } catch (e) { // window.top.postMessage couldn't be executed.