From f3c9e96985f9d884597624a714cb10ed71258860 Mon Sep 17 00:00:00 2001 From: Andre Pimenta Date: Thu, 15 Oct 2020 18:09:07 +0100 Subject: [PATCH] Fix/disable iframes support for now (#1881) * disable iframes for now * Disable sending messages to iframes for now --- app/components/Views/BrowserTab/index.js | 7 ++++++- app/util/browserScripts.js | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/components/Views/BrowserTab/index.js b/app/components/Views/BrowserTab/index.js index 0e2c9ed3141..5f152c22332 100644 --- a/app/components/Views/BrowserTab/index.js +++ b/app/components/Views/BrowserTab/index.js @@ -689,9 +689,12 @@ export const BrowserTab = props => { backgroundBridges.current.push(newBridge); }; + /** + * Disabling iframes for now const onFrameLoadStarted = url => { url && initializeBackgroundBridge(url, false); }; + */ /** * Is the current tab the active tab @@ -1285,11 +1288,13 @@ export const BrowserTab = props => { } switch (data.type) { + /** + * Disabling iframes for now case 'FRAME_READY': { const { url } = data.payload; onFrameLoadStarted(url); break; - } + }*/ case 'GET_WEBVIEW_URL': webviewUrlPostMessagePromiseResolve.current && webviewUrlPostMessagePromiseResolve.current(data.payload); diff --git a/app/util/browserScripts.js b/app/util/browserScripts.js index b110eb7740c..dad370bb973 100644 --- a/app/util/browserScripts.js +++ b/app/util/browserScripts.js @@ -115,7 +115,10 @@ export const JS_POST_MESSAGE_TO_PROVIDER = (message, origin) => `(function () { } })()`; -export const JS_IFRAME_POST_MESSAGE_TO_PROVIDER = (message, origin) => `(function () { +export const JS_IFRAME_POST_MESSAGE_TO_PROVIDER = (message, origin) => `(function () {})()`; +/** Disable sending messages to iframes for now + * +`(function () { const iframes = document.getElementsByTagName('iframe'); for (let frame of iframes){ @@ -127,3 +130,4 @@ export const JS_IFRAME_POST_MESSAGE_TO_PROVIDER = (message, origin) => `(functio } })()`; + */