Mozilla XUL Element and Script Reference

Contents  Quick Reference

Navigator

The global navigator object that contains information about the environment in which the XUL document is loaded in.

Properties and Methods:

appCodeName

The browser's code name. For Mozilla, this is the string 'Mozilla'.

appName

The browser's title.

appVersion

Version information for the browser. This value can be passed to parseFloat (or parseInt) to get a numeric version. However, this property contains additional information.

cookieEnabled

Returns true if the user has cookies enabled.

javaEnabled ( )

Returns true if the user has Java is enabled.

language

The browser's language.

mimeTypes

An array of the MIME content types supported by the browser.

oscpu

A string that identifies the operating system, version and processor that the browser is running under.

platform

The platform that the browser is running on.

plugins

An array of the plugins that are installed.

preference ( prefname )
preference ( prefname , value )

The first form can be used to retrieve a user preference with a given name. In Mozilla, these preferences are stored in the user's profile directory in a file called prefs.js. The second form can be used to modify a preference.

product

The product name of the browser or the viewer component. Under Mozilla, this will be the string 'Gecko'.

productSub

Additional information about the product. Under Mozilla, this will be the build date.

securityPolicy
userAgent

The user agent used for HTTP connections. This is a concatenation of a number of the other navigator object's fields.

vendor

The vendor of the browser.

vendorSub

Additional information about the vendor of the browser.