Skip to content

Commit

Permalink
Fix/disable iframes support for now (#1881)
Browse files Browse the repository at this point in the history
* disable iframes for now

* Disable sending messages to iframes for now
  • Loading branch information
andrepimenta authored Oct 15, 2020
1 parent 1b8cead commit f3c9e96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/components/Views/BrowserTab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion app/util/browserScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -127,3 +130,4 @@ export const JS_IFRAME_POST_MESSAGE_TO_PROVIDER = (message, origin) => `(functio
}
})()`;
*/

0 comments on commit f3c9e96

Please sign in to comment.