Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App using inappbrowser cannot be hosted in a cross-domain iframe #419

Closed
webprofusion-chrisc opened this issue Feb 11, 2019 · 3 comments · Fixed by #669
Closed

App using inappbrowser cannot be hosted in a cross-domain iframe #419

webprofusion-chrisc opened this issue Feb 11, 2019 · 3 comments · Fixed by #669

Comments

@webprofusion-chrisc
Copy link

If you attempt to use inappbrowser within an app (for mobile and web) and iframe the web version from
a different domain chrome will block the plugin load:
https://www.chromium.org/Home/chromium-security/corb-for-developers

This is caused by a check to window.parent for the ripple extension.

Use case: https://map.openchargemap.io - this app is available on android and iOS but is also available as a PWA which can be embedded by other sites.

Workaround: add a build step to remove inappbrowser for browser platform: cordova remove plugin cordova-plugin-inappbrowser - is there any other way to selectivity disable a plugin by platform?

@niklasdoerflerkrone
Copy link

I've faced exactly the same problem...
Are there any other solutions or fixes for this now?

@stefanmdt
Copy link

Same problem. Any news on that?

@csware
Copy link
Contributor

csware commented Apr 14, 2020

A quick'n'dirty hack could be perl -pi -e 's|if \(window.parent && !!window.parent.ripple\) \{|if (window.parent && false) {|' platforms/browser/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants