-
Notifications
You must be signed in to change notification settings - Fork 20
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
Doesn't work with plugins - whitelist and inAppBrowser #12
Comments
Regarding the |
Sorry, I should have been clear. The meta tag is indeed present in the source HTML file, and the warning does not appear when run on the Android emulator platform. |
Hmmm, that's weird. I can't repro (that is, I see the message if I don't have the CSP meta tag, and don't see it if I do). The plugin's logic that handles this is very basic, and it doesn't seem it is doing anything where Ripple have any impact. Couple of questions:
|
Oh, and the InAppBrowser problem is because the plugin specifically bypasses Ripple here: // special patch to correctly work on Ripple emulator (CB-9760)
if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021
module.exports = window.open.bind(window); // fallback to default window.open behaviour
return;
} |
I wonder why InAppBrowser has that "special patch"? I will try removing that check and see if it helps. If not, I'm sure I can find a workaround. The Content-Security-Policy meta tag issue appears to have been user error. Apparently there's something wrong with my build setup, because clearing out the www directory and rebuilding caused the issue to go away. I'll keep an eye on the issue and update you if I can reproduce it more reliably. |
Ok, thanks @eddieSullivan. Good news about the CSP. I believe that code was added to InAppBrowser because some apps relied on a real window being opened (often hidden) to do stuff (where-as Ripple would just display a popup showing the URL that would have been opened, but didn't actually open it). The proper fix, I think, will be to modify Ripple in some fashion to actually open a window (then remove that code from InAppBrowser). |
Ah, I see. That seems about right, because when I remove that special patch, I see a faked-out page (although not in a popup) with a "InAppBrowser Emulation It is like a browser, only it is all up in your app" message. Ok, thanks again. If I have some time I'll dig more into the proper fix you describe. |
Both of these plugins fail to work in Ripple.
The whitelist plugin gives the following error message every ten seconds:
No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.
The InAppBrowser does not fire the loadstart event.
The text was updated successfully, but these errors were encountered: