August 1999
Intermediate to advanced
1488 pages
72h 53m
English
navigator.preference(name) navigator.preference(name, value)
The preference() method of the navigator object is used to read or set any user preferences in the browser. For security reasons, reading a preference with the preference() method requires the UniversalPreferencesRead privilege. Setting a preference with this method requires the UniversalPreferencesWrite privilege.
Listing 7.405 shows an example of how the preference() method can be used to set a preference.
<html> <head> <title> Example of the preference method of the navigator object</title> </head> <body> <script language="JavaScript"> ... |
Read now
Unlock full access