Igor Parra
Igor Parra

Reputation: 10348

Is it possible to trigger a click event inside an iframe loaded with 3rd party content from another domain?

I have accomplished reach the desired element inside of the iframe but I can't fire click events. I have used click() and initMouseEvent("click", true, true) without success.

So is it possible to trigger a click event inside an iframe loaded with 3rd party content from another domain?

Upvotes: 1

Views: 1284

Answers (1)

Igor Parra
Igor Parra

Reputation: 10348

What I have learned the last hours:

In first place: It should be no possible due violates the Same origin policy especially in these days where exists a lot of code being injected via iframes in the most of pages: Ads and social bookmarks widgets and so on...

In second place: It is very probable that this kind of code commits some legal violations to the 3rd party entity.

So the answer to the question seems be No.

Upvotes: 2

Related Questions