Also you can set name and ID to equal values
<iframe id="frame1" name="frame1" src="https://stackoverflow.com/questions/935127/any.html"></iframe>
so you will be able to use next code inside child page
parent.document.getElementById(window.name);