Q:

Possible to access Phonegap API within a iframe?

I'm testing how to use the camera of a blackberry (5) with a phonegap app that has a iframe in it.
Basically the iframe calls for the camera, take a picture and return the picture to the iframe.
I don't know if it is possible to access phonegap APIs from within a iframe.
I put a simple cross domain test ( with two pages able to send messages back and forth ) on the simulator and it does not seem to work.
Any advice?
Thanks in advance.

A:

with iframes you are restricted to the same orign policy - meaning that you can only communicate beetween the frames if they load from the same server (event port is important here). A good sum up can be found here: http://en.wikipedia.org/wiki/Same_origin_policy
From phonegaps point of view it would be very bad if a html file which is not index.html could acccess the camera. This would give all webpages the ability to take a foto when you visit them with a phonegap app. So therefore this is restricted to only index.html (on android and iOs, don't know about Blackberry)

