I’m injecting some JavaScript code to get internal DOM information of UIWebView. Currently, all of codes are irking well, but I met a big problem. The document in IFRAME of other domain. By cross-domain security policy, I can’t access DOM of the IFRAME if the frame contains document which its address is different with current page. My UIWebView have to be able to process any sites on internet. Is there any way to evade this security policy?
I’m injecting some JavaScript code to get internal DOM information of UIWebView . Currently,
Share
With
UIWebView? No.The only way around this would be to parse the HTML yourself (I’d suggest a library – Element Parser is pretty good). You’d obviously have to look for
IFRAMEtags and load that content recursively.