Home / IOS Development / javascript – iOS: inserting iFrame with SRC on the page immediately opens the url in Safari

javascript – iOS: inserting iFrame with SRC on the page immediately opens the url in Safari



I have a pretty weird problem. This happens inside a Cordova app (hybrid HTML), but only on iOS.

I have my HTML page with some content already there, and that̵

7;s ok. In a new moment, I get some HTML from an external site, and I paste this HTML into my main HTML page. If an iFrame with an SRC attribute is specified, the system immediately opens the SRC in safari / a specific app, but I just want to insert the content as a regular iFrame!

Example. If I download this HTML: