Cordova: How to prevent links in embedded iframes to replace application?

I tried to embed the Soundcloud player in my Meteor Cordova app. This worked, but the player includes some links to external resources (e.g. a page where to buy the track). In a browser, these links open up in a new window. But in my Cordova app, they replace the whole Meteor app. How can I prevent this behaviour?

Could adding the InAppBrowser plugin help here? According to the Cordova docs, this plugin only reacts on window.open calls, but it does not seem to react on links with a target frame as well.

Bump. No one here who can help? :-/

1 Like

@vimes1984: Thanks for liking my post. FYI: I found a solution in the meantime, which at least works for HTML5 enabled browsers. These browsers support so-called “sandbox” options when setting up an iframe:

This allowed me to disable links that would otherwise replaced my app altogether. The downside is, however, that some of these links would make sense, e.g. the like functions of Soundcloud. So I would still prefer having a solution that would open an external browser (or a browser popup in my app), so I would not have to hard-force disable these links altogether.

yeah that doesn’t quite work I don’t think since these links need to
work…Thank you anyway :smiley: