Jump to content

window part of navigator?


skaterdav85

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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...