The navigator Object s Methods


The navigator Object's Methods

You can see the methods of the navigator object in Table 10.5 in overview and in Table 10.6 in depth.

Table 10.5. Overview of the methods of the navigator object

Methods

   

javaEnabled

preference

taintEnabled

Table 10.6. The Methods of the navigator Object

Method

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

javaEnabled

 

x

x

x

   

x

x

x

x

 

Returns: Boolean

 

This method returns true if Java is enabled in the browser, and false otherwise . This method is a good one to use if you want to jump to a non-Java page if needed.

 

Syntax: navigator.javaEnabled() .

preference

   

x

x

           
 

Returns: Nothing

 

This method sets browser preferences in the Netscape Navigator.

 

Syntax: preference( name [, value ]) , where name is the name of the preference and value is the new value for the preference. See "Setting Netscape Navigator Preferences" in this chapter for the details and an example.

taintEnabled

 

x

x

x

   

x

x

x

x

 

Returns: Nothing

 

Netscape Navigator 3.0 introduced a feature called data tainting , following the lead of languages such as Perl. Tainted data was suspect data, under user control, that could be tampered with by hackers and even run as illicit code. However, this method is no longer used and always returns false now.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net