To get the url from the iframe:
window.frames['childs'].contentWindow.location.href
Inside the HTML folder is an example for same origin. Run with:
http-server -p 8080 -c-1 html/
-
cd C:\Program Files (x86)\Google\Chrome\Application
-
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
-
Origin (request header)
-
Access-Control-Allow-Origin (response header)
- Add cors package