View Single Post
  #1 (permalink)  
Old August 3rd, 2006, 08:17 PM
AGS AGS is offline
Wrox Technical Editor
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: Russia
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Resolution of property names on window object

I have a question regarding resolution of property names on global object (window object in case of browser hosting environment).

Lets say we have a global variable with the same name as property of a window object.
Code:
var location = "Test";
Global variable is in fact a property of global object (window). So having declared global variable location we cannot access original window.location property anymore.

As far as I know there is no way to access original property of window in this case but maybe someone has a clue?

Interestingly enough it seems that in Firefox window’s property takes precedence over global variable of the same name and for example var location = "Test.html" changes current location.


__________________
Alexey Gorkov
Reply With Quote