Subj : race condition? window.open return value references self??? To : netscape.public.mozilla.jseng From : Fritz Schneider Date : Sun Feb 01 2004 07:16 pm When I was checking to see what objects are protected by the same origin policy, I noticed that the following script var w = window.open("http://www.yahoo.com"); w.onresize = function() { document.body.style.backgroundColor='red'; }; turns the window the script is in red. (Similar effect if you do an alert()). If instead you set the handler in a setTimeout for a short period of time, it has the expected behavior (having no effect). I also noticed that if you immediately read w's properties you can get screen x and y positions, the size of the window, and so on. Also you can get an HTMLBodyElement by reading w.document.body as well as other objects. If it's referencing an uninitialized window, why would the onresize get attached to the current document? If it's not, what gives? Thanks! .