permission denied error when specifying iframe source

I am trying to make a widget generic in the Static Content JavaScript. The widget renders an iframe and sets the source to an HTML page in the JavaScript module. I am getting permission denied errors. I understand that it is cross domain problem. Just curious if anybody ran into similar issue in the Cobalt environment. We don't want to setup a proxy service as that will require all the consumers of the widget to have the proxy configured.

Answers

  • You might be able to get around it by setting the contents of the iframe directly from JavaScript. Something like this:


    document.getElementById("foo").contentWindow.document.body.innerHTML = "foo"