diff --git a/docs/web/custom-visualizations.md b/docs/web/custom-visualizations.md index 23188dad..d88717f2 100644 --- a/docs/web/custom-visualizations.md +++ b/docs/web/custom-visualizations.md @@ -15,11 +15,11 @@ var host; window.revealBridge = { sendMessageToHost: function (data) { 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. + // window.parent.postMessage couldn't be executed. // This sould never happen but... } }, @@ -32,14 +32,6 @@ window.revealBridge = { this.sendMessageToHost({ message: "ready" }); } }, - - runAction: function (actionName, data) { - this.sendMessageToHost({ message: "runAction", action: actionName, rowData: data }); - }, - - openUrl: function (url) { - this.sendMessageToHost({ message: "openURL", URL: url }); - }, } function processMessageFromHost(message) { 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 f1114ac3..f0c6acd3 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 @@ -15,11 +15,11 @@ var host; window.revealBridge = { sendMessageToHost: function (data) { 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. + // window.parent.postMessage couldn't be executed. // This sould never happen but... } }, @@ -32,14 +32,6 @@ window.revealBridge = { this.sendMessageToHost({ message: "ready" }); } }, - - runAction: function (actionName, data) { - this.sendMessageToHost({ message: "runAction", action: actionName, rowData: data }); - }, - - openUrl: function (url) { - this.sendMessageToHost({ message: "openURL", URL: url }); - }, } function processMessageFromHost(message) {