The Plugins Collection

Note : The PlugIns collection is supported by both Netscape and Internet Explorer, although their respective support is somewhat different.

For Internet Explorer, the PlugIns collection is essentially an alias for the Embeds collection, while for Netscape, the PlugIns collection represents all the plug-ins currently installed on the client machine.

The properties of the plugins object are :

name
This property details the actual name of the plug-in. For example, on a standard Netscape installation, the plug-in installed to handle files of the audio/wav MIME type is named LiveAudio
filename
This returns the exact file name of the particular referenced plug-in module.
description
Contains a description of the plug-in module referenced. For example, the description of the LiveAudio plug-in is "LiveAudio - Netscape Navigator sound playing component".
length
This returns the total length of the plug-ins array. I.e. the number of plug-ins the user has installed and available for use.

As an example, the following code section checks to see whether the user has the Live3D plug-in available and if so, displays a VRML world, giving a notice if the plug-in isn't available :

var vVRMLallowed = navigator.plugins["Live3D Plugin DLL"]
if (vVRMLallowed)
document.writeln("Click <A HREF='htmlib.wrl'>here</A> to see a Virtual world"
else
document.writeln("Too bad, can't show you any virtual worlds.")

Note : It is possible to reference plugins by their name property.