Help Center

Local Navigation

Object: Navigator

Availability

BlackBerry® Device Software version 3.8 or later

The Navigator object provides information about the version of the BlackBerry® Browser that is being used. All its properties, which are read-only, contain information about different aspects of the browser.

Navigator properties

Property name

Type

Description

Status

Availability

appCodeName

String

Returns the code name of the browser. The value is typically BlackBerry, but may be different if the user has selected an emulation mode other than "BlackBerry".

read only

3.8 or later

appName

String

Returns the name of the browser. In the case of the BlackBerry® Browser, the value is always BlackBerry.

read only

3.8 or later

appVersion

String

Returns the version of the BlackBerry® Device Software that is running on the BlackBerry device (for example, 4.6.0).

read only

3.8 or later

buildID

String

Returns the build identifier of the version of the BlackBerry Device Software running on the device.

read only

4.6 or later

cookieEnabled

boolean

Returns true if cookies are enabled in the BlackBerry Browser.

read only

4.6 or later

language

String

Returns the two-letter language code (for example, de, en, or ja) that represents the default language translation of the BlackBerry Browser.

read only

3.8 or later

mimeTypes

MimeTypeArray

Returns a list of the MIME types that the target BlackBerry Browser supports.

read only

3.8 or later

platform

String

Returns BlackBerry. This property is treated as a constant.

read only

3.8 or later

plugins

PluginArray

Returns a list of the embedded plugins in the document.

read only

4.6 or later

userAgent

String

Returns the user agent from the user-agent header of the HTTP header. The user agent is used by servers to identify the client browser.

read only

3.8 or later

Navigator methods

Method name

Description

Availability

javaEnabled()

Tests whether the browser supports Java® or not.

3.8 or later

Method: navigator.javaEnabled()

Availability

BlackBerry® Device Software version 3.8 or later

The javaEnabled() method tests whether the browser supports Java® or not.

Syntax

navigator.javaEnabled()

Parameters

None.

Return values

In the case of the BlackBerry® Browser, always returns a value of false.

Exceptions

None.

Examples

The following code fragment runs the function doThis if Java is supported otherwise, it runs the function doThat:

if (navigator.javaEnabled()) {
   doThis();
}
else doThat();
Next topic: Object: Node

Was this information helpful? Send us your comments.