content from other domains cannot call scripts in other domains.
There are still cases where the main AIR application requires
content from a remote domain to have controlled access to scripts
in the main AIR application, or vice versa. To accomplish this,
the runtime provides a
mechanism, which serves
as a gateway between the two sandboxes. A sandbox bridge can provide
explicit interaction between remote and application security sandboxes.
The sandbox bridge exposes two objects that both loaded and loading
scripts can access:
loading content expose properties and functions to scripts in the
object lets loaded
content expose properties and function to scripts in the loading
Objects exposed via the sandbox bridge are passed by value, not
by reference. All data is serialized. This means that the objects
exposed by one side of the bridge cannot be set by the other side,
and that objects exposed are all untyped. Also, you can only expose
simple objects and functions; you cannot expose complex objects.
If child content attempts to set a property of the parentSandboxBridge
object, the runtime throws a SecurityError exception. Similarly,
if parent content attempts to set a property of the childSandboxBridge
object, the runtime throws a SecurityError exception.