pluginsNN 3 IE 4 DOM n/a  

  

Navigator and Internet Explorer both have a plugins array, but they are quite different collections of objects. Navigator's and IE/Macintosh's plugins array is a property of the navigator object. Each item in the navigator.plugins array represents a plugin that is installed in the browser (actually just registered with the browser when the browser last loaded). See the plugin object.

 

On the Windows side, Internet Explorer's plugins collection belongs to the document object and essentially mirrors the embeds collection: a collection of all embed elements in the document. An embed element may well, indeed, launch a plugin, but not necessarily. Nor does Internet Explorer for Windows provide JavaScript access to the installed plugins in the same way that Navigator does (IE for Macintosh provides no such access).

 
Object Model Reference
 
  • navigator.plugins
  • document.plugins
 
Object-Specific Properties
 
length
 
Object-Specific Methods
 
item( )namedItem( )
lengthNN 3 IE 4 DOM n/a  

Read-only  

Returns the number of elements in the collection.

 
Example
 
var IEhowMany = document.plugins.length;
var NNhowMany = navigator.plugins.length;
 
Value

Integer.

item( )NN 6 IE 4(Win) DOM n/a  

item(index[, subindex]) item(index)

  

Returns a single object or collection of objects corresponding to the item matching the index value (or, optionally, the index and subindex values).

 
Parameters
 
  • When the parameter is a zero-based integer, the returned value is a single element corresponding to the specified item in source code order (nested within the current element). When the parameter is a string (IE only), the returned value is a collection of elements with name properties that match that string.
  • In IE only, if you specify a string value for the first parameter, you can use the second parameter to specify a zero-based index that retrieves the specified element from the collection with name properties that match the first parameter's string value.
 
Returned Value

One object or collection (array) of objects. If there are no matches to the parameters, the returned value is null.

namedItem( )NN 6 IE 6 DOM n/a  

namedItem("name")

  

Returns a single plugin (NN) or embed (IE) object corresponding to the element matching the parameter string value.

 
Parameters
 
  • The string that contains the same value as the desired object's name attribute.
 
Returned Value

One plugin (NN) or embed (IE) object. If there are no matches to the parameters, the returned value is null.