navigator.preference() : Navigator Object : Navigator JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Navigator » Navigator Object »

 

navigator.preference()











Syntax








navigator.preference(name)
    navigator.preference(name, value)



The preference() method reads or sets 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.












<html>
    <head>
    <title> Example of the preference method of the navigator object</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    navigator.preference(security.enable_java, false);
    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Navigator
» Navigator Object