In JavaScript when to use window.opener / window.parent / window.top ?
window.opener
window.parent
window.top
window.open( ... )
<frame>
<iframe>
Those will be null (or maybe undefined) when they're not relevant to the referring window's situation. ("Referring window" means the window in whose context the JavaScript code is run.)
null
undefined
1.4m articles
1.4m replys
5 comments
57.0k users