Saturday, 1 September 2018

Intercept iframe message nested iframe, cross domain

I have a webpage from domain1.com, there I have an iframe of domain2.com and then I have another iframe inside domain2.com of domain3.com

I want to intercept the messages from domain3.com in domain2.com, If domain2.com isn't inside domain1.com then the messages are received correctly, but if I have domain2.com inside domain1.com then messages from domain3.com are received by domain1.com instead of domain2.com. Is there any way to catch those messages inside domain2.com?

The structure is like this

domain1.com has inside iframe src="domain2.com" domain2.com has inside iframe src="domain3.com"

When I access domain2.com directly it catches domain3.com messages, when I access domain1.com then messages sent from domain3.com are received by domain1.com instead of domain2.com



from Intercept iframe message nested iframe, cross domain

No comments:

Post a Comment