Uncaught DOMException: Blocked a frame with origin “https://c.ap2.visual.force.com” error

I am trying to access the home page from a custom home page component, i.e. of type VF area, through JavaScript but I’m getting

Uncaught DOMException: Blocked a frame with origin “https://c.ap2.visual.force.com” from accessing a cross-origin frame.(…)

I tried setting the document.domain='ap2.salesforce.com' for the home page component but unsuccessful. Also routing the VF page to the home page is not helping. Please any one suggest me how to resolve this.

Leave a Reply

Your email address will not be published. Required fields are marked *