VF page is opening as modal in Salesforce lightning experience on an action button click. When I look at the generated code,my code is there in an iframe which the salesforce generated modal contains.
I need to perform the same operation on the cancel button(which is on my vf page) as of the cross icon (of the generated modal). I tried getting the modal element by class name and calling the same click event on cancel button,which is getting called on cross icon.
The problem here is, I am not able to access any element outside the iframe. It throws
'Blocked a frame with origin "https://c.na34.visual.force.com" from accessing a cross-origin frame.'
error. window.parent does not help either. Please provide suggestion to solve this.
Thanks in advance.