I tried to get location of the iframe using following line of code,
var urlHash = iFrame.contentWindow.location.hash;
And I'm getting following error,
Uncaught DOMException: Blocked a frame with origin "https://localhost:7002" from accessing a cross-origin frame.
at https://localhost:7002/app/login/abc.js:130:57
I went through following stackoverflow question and according to that the origine of the iframe and the js file is same. But according to the error message, they are not same origine. Please note that the iframe is generated using javascript code.
How can I get it worked?