diff --git a/docs/web/custom-visualizations.md b/docs/web/custom-visualizations.md index 00faa6a4..d88717f2 100644 --- a/docs/web/custom-visualizations.md +++ b/docs/web/custom-visualizations.md @@ -14,26 +14,12 @@ As mentioned earlier, to consume data from the SDK, you must define the bridge. var host; window.revealBridge = { sendMessageToHost: function (data) { - try { - var iframe = document.createElement("IFRAME"); - var message = encodeURIComponent(JSON.stringify(data)); - iframe.setAttribute("src", "js-frame:" + message); - document.documentElement.appendChild(iframe); - iframe.parentNode.removeChild(iframe); - iframe = null; - } - catch (e) { - // The frame couldn't be created. - // This could happen in web environments when the host is not in the same domain than the custom view webpage. - // Is not a problem as we are using window.postMessage for the communication in this case. - } - try { 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... } }, @@ -46,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 c1a73d80..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 @@ -14,26 +14,12 @@ Reveal SDK は、アプリケーションにシームレスに統合される、 var host; window.revealBridge = { sendMessageToHost: function (data) { - try { - var iframe = document.createElement("IFRAME"); - var message = encodeURIComponent(JSON.stringify(data)); - iframe.setAttribute("src", "js-frame:" + message); - document.documentElement.appendChild(iframe); - iframe.parentNode.removeChild(iframe); - iframe = null; - } - catch (e) { - // The frame couldn't be created. - // This could happen in web environments when the host is not in the same domain than the custom view webpage. - // Is not a problem as we are using window.postMessage for the communication in this case. - } - try { 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... } }, @@ -46,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) {