I have a JavaScript that deals with with detection whether the page is in frames or not. I used top.frames[] etc. and everything works fine.
In this script I noticed that I can use “window” or “self” interchangeably and everything still works. Is “window” same as “self” when used in HTML page?
From Javascript: The Definitive Guide:
In short, both
windowandselfare references to the Window object, which is the global object of client-side javascript.