25.227. Plugin: describes an installed plug-inJavaScript 1.1; not supported by IE: Object Plugin25.227.1. Synopsisnavigator.plugins[i] navigator.plugins['name'] 25.227.2. Properties
25.227.3. Array ElementsThe array elements of the Plugin object are MimeType objects that specify the data formats supported by the plug-in. The length property specifies the number of MimeType objects in this array. 25.227.4. DescriptionA plug-in is a software module that can be invoked by a browser to display specialized types of embedded data within the browser window. Plug-ins are represented by the Plugin object, and the plugins[] property of the Navigator object is an array of Plugin objects representing the installed plug-ins for the browser. IE does not support the Plugin object, and the navigator.plugins[] array is always empty on that browser. navigator.plugins[] may be indexed numerically when you want to loop through the complete list of installed plug-ins, looking for one that meets your needs (for example, one that supports the MIME type of the data you want to embed in your web page). This array can also be indexed by plug-in name, however. That is, if you want to check whether a specific plug-in is installed in the user's browser, you might use code like this: var flash_installed = (navigator.plugins["Shockwave Flash"] != null); The name used as an array index with this technique is the same name that appears as the value of the name property of the Plugin. The Plugin object is somewhat unusual in that it has both regular object properties and array elements. The properties of the Plugin object provide various pieces of information about the plug-in, and its array elements are MimeType objects that specify the embedded data formats that the plug-in supports. Don't confuse the fact that Plugin objects are stored in an array of the Navigator object with the fact that each Plugin object is itself an array of MimeType objects. Because there are two arrays involved, you may end up with code that looks like this: navigator.plugins[i][j] // The jth MIME type of the ith plug-in navigator.plugins["LiveAudio"][0] // First MIME type of LiveAudio plug-in Finally, note that while the array elements of a Plugin object specify the MIME types supported by that plug-in, you can also determine which plug-in supports a given MIME type with the enabledPlugin property of the MimeType object. 25.227.5. See AlsoNavigator, MimeType |