Jump to content

window part of navigator?


skaterdav85
 Share

Recommended Posts

Is the window an object property of the navigator object?I was looking at http://www.comptechdoc.org/independent/web...avaobjheir.html and it says the window object is a property of the navigator object, but when you run the following peice of code, the alert does not come up. Any ideas?

if (navigator.window) {  alert(navigator.userAgent);}

Link to comment
Share on other sites

That page is useless, and the design is seriously 1995-ish. Hideous background, default font. It's got a current doctype, but I bet that and the Google stuff were tacked on long after it was written. I haven't messed with the window.status property in a LONG time. In the mid 90s it was THE THING to do.I think by "object hierarchy" the author was trying to describe a conceptual framework. Some of the things refer to actual objects, but that seems more coincidence than anything.Anyway, the answer to your question is a definite NO.

Edited by Deirdre's Dad
Link to comment
Share on other sites

DOM inspectors do a good job of this - you can see that document is a property of window, etc. You will also see that there is actually no clear, uh, "hierarchy", though, with many things existing in the global scope.

Link to comment
Share on other sites

ya there doesn't seem to be a clear hierarchy. I was just aware that document is a property of window and both are global. I wasn't sure how navigator fit in, but based on my test, i think navigator is 'on the same level' as window, rather than being a property of window.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...