Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova 3.7 duplicates iframes on every native call

Since I've upgraded to Cordova 3.7 every native call attaches a new iframe to the DOM like the one below.

<iframe src="gap://ready" style="display: none;"></iframe>

To exclude the possibility of my existing code influencing cordova I've tried creating a new one with cordova CLI, adding console plugin and calling console.log() in a setInterval loop inside deviceready handler. As a result I got a ton of iframes in DOM.

I've tried this on iPad 3, iOS7, building the app using xCode 6.

Did anyone experience this issue? Thanks.

UPDATE:

Corresponding issue was filed to Cordova: https://issues.apache.org/jira/browse/CB-8002 The issue should be fixed in 3.8 release.

like image 396
abadalyan Avatar asked Nov 17 '14 22:11

abadalyan


1 Answers

I also experienced the same issue. I am not sure why this is happens. But changing the

if (bridgeMode === undefined) {
bridgeMode = jsToNativeModes.IFRAME_NAV;
}

block into

if (bridgeMode === undefined) {
bridgeMode = jsToNativeModes.XHR_NO_PAYLOAD;
}

in the cordova.js function iOSExec() works for me

like image 95
Surya Subenthiran Avatar answered Nov 15 '22 07:11

Surya Subenthiran