Are the Browser Objects standardized somewhere?

So, we have the JavaScript native objects: Object, Function, Array, String, Number, Boolean, Date, Math, RegExp, Error …

Then we have the DOM interfaces… the most important object that applies those interfaces is the document object…

But also, there are the Browser Objects: window, location, screen, history, navigator.

The JavaScript objects are defined in the ECMAScript standard, the DOM interfaces are part of the DOM standards, but where are the Browser Objects standardized? Nowhere?

Well, I hope you are talking about IE6… I’ll be sure to check out IE8 compatibility, that’s the only IE version I care about.

No I meant ALL versions of IE store much of the browser info in different locations from where other browsers store it. There is no standard to tell IE that their locations are wrong.

You just need to use feature sensing to detect which of the three places actually holds a value and use the one from there.

See http://javascript.about.com/od/browserobjectmodel/a/bom.htm for information on what parts of the BOM contain what info in which browsers and how to create cross browser processing for the useful ones that use different locations.

That’s right - they don’t have a written standard anywhere.

For the most part though all browsers except for Internet Explorer set them up the same way as defined in the original Mozilla browser.

Since Internet Explorer uses two alternatives depending on whether a strict or transitional doctype is used that means you usually only have two places to look with code to be used only on your own site and three places to look if you are writing code to be shared with other sites.