I have a widget hosted on the same domain, and several websites that use an iframe to display the widget. I would like the iframe content to be styled based on the parent website, but I know that due to the Same origin policy, the parent website cannot manipulate content from another domain.
I have access to both the widget and the parent websites, and I was wondering what is the best way to change the style of the widget depending on the parent site? I would prefer a method that would mean that if the new website should include an iframe or an existing website, change their style, I would not have to change the widget.
Would pass the location of the stylesheet of the parent website to the widget and use this so that the widget's style is a workable idea, and what is the best way to do this, if so?
source share