0

I know what window is, and also self from this question, but what about parent and top, and how do they relate to window and self? What do parent and top point to?

From anchor tags, it seems like parent means the window that is iframing the current window, and top references the topmost window, for example if the parent is also being iframed inside an iframe. Is this true?

Lakshya Raj
  • 1,669
  • 3
  • 10
  • 34
  • Yes, exactly that's what they do. (Not just for iframes but also for normal frames) – Bergi Feb 21 '21 at 18:05
  • @Bergi: OK. Just wanted to know because I didn't see anything on Stack Overflow for `parent` and `top`. – Lakshya Raj Feb 21 '21 at 18:09
  • I found one now :-) See also MDN for [`parent`](https://developer.mozilla.org/en-US/docs/Web/API/Window/parent) and [`top`](https://developer.mozilla.org/en-US/docs/Web/API/Window/top) – Bergi Feb 21 '21 at 18:21
  • @Bergi: Thanks for directing me to a source for which I can use. Hopefully it helps others in the future. – Lakshya Raj Feb 21 '21 at 18:22

0 Answers0