0

I have a small widget that users can install on their sites. What I need to do is "close" (ie. hide the iframe) when someone has performed an action within the widget.

The big issue here is that the domain the widget is installed on will be different from the domain of the widget itself.

ie. The source of the widget embed would be http://example.com/embed.js while it may be embedded on http://cnn.com

I'm aware that there are cross-domain security issues that prevent accessing the parent doc with window.parent.document. So, I'm asking for some clever workarounds to make this work.

For what it's worth, I'm dynamically creating the iframe from within the embed.js code.

Shpigford
  • 24,748
  • 58
  • 163
  • 252

0 Answers0