Why am i able to do this in the console window.window.window.window and append .window infinitely and it returns the DOM window ?
Why am i able to do this in the console window.window.window.window and append .window
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is because the window object points to the window object itself.
Some reasons for this behaviour include
to do a manual var window = this; assignment at the top of your
script).
Further reading here