开发者

onload event callback problem for an iframe dom element in phonegap

开发者 https://www.devze.com 2023-01-29 19:48 出处:网络
Using this sample code: var callBack= function(evt){ alert("Inside callback") } anIframe.addEventListener("load", callBack, false);

Using this sample code:

var callBack  = function(evt){
    alert("Inside callback")
}

anIframe.addEventListener("load", callBack, false);

The above code doesn't seem to work in Phonegap-Iphone. The callback function is not called ev开发者_StackOverflowen if the iframe element has been loaded in the DOM.


Use this to the load iFrame http://denrobapps.com/2010/12/phonegap-and-iframes/ and then use postMessage to communicate between the iFrame and the PhoneGap window.

Or load the iFrame with this: Allow external hosts in iframe on xcode 4.1 using phonegap

0

精彩评论

暂无评论...
验证码 换一张
取 消