Navigator.plugins[] (Collection)

An array of the plugins currently installed into the browser.

Availability:

JavaScript - 1.1
JScript - 3.0
Internet Explorer - 4.0
Netscape - 3.0
Opera - 3.0
JavaScript syntax:-navigator.plugins

The object returned is a sub-class of the Array object. It is a PluginArray.

Here is a list of some plugins displayed by using a JavaScript to unwrap the plugins array:

The default plugin has been omitted since it is always there. However note that it is not always spelled the same in all browsers. If you are displaying a list of plugins to the user, then be careful how you eliminate unwanted items.

You may check for the existence of a plugin using the following logical expression:

(navigator.plugins["TheRequiredItem"] != null)

However, this may not always work due to the naming conventions.

The example enumerates some plugins and of course the output depends on the plugins you have installed. You might typically see something like this listed:

Warnings:

Example code:

   <!-- Display all plugin names -->
   <HTML>
   <HEAD>
   </HEAD>
   <BODY>
   <SCRIPT>
   for (var myIndex=0; myIndex<navigator.plugins.length; myIndex++)
   {
   document.write(navigator.plugins[myIndex].name);
   document.write("<HR>");
   }
   </SCRIPT>
   </BODY>
   </HTML>

See also:Plugin object, PluginArray object

Property attributes:

ReadOnly