NavigatorPlugins

Originally published on June 15, 2016.
Last updated on June 16, 2016.

_____

navigator

<script>// <![CDATA[
document.writeln(navigator + "<br />");
for (x in navigator) {
    document.writeln("<b>" + x + " :</b> " + navigator[x] + "<br />");
}
// ]]></script>

navigator.plugins

<script>// <![CDATA[
document.writeln(navigator.plugins + "<br />");
for (x in navigator.plugins) {
    document.writeln("<b>" + x + " :</b> " + navigator.plugins[x] + "<br />");
}
// ]]></script>

navigator.mimeTypes

<script>// <![CDATA[
document.writeln(navigator.mimeTypes + "<br />");
for (x in navigator.mimeTypes) {
    document.writeln("<b>" + x + " :</b> " + navigator.mimeTypes[x] + "<br />");
}
// ]]></script>

navigator.plugins._____

<script>// <![CDATA[
document.writeln(navigator.plugins + "<br />");
for (x in navigator.plugins) {
    document.writeln("<b>" + x + " :</b> " + navigator.plugins[x] + "<br />");
}
// ]]></script>


window.navigator.plugins.refresh( [ refresh ] )
Updates the lists of supported plugins and MIME types for this page, and reloads the page if the lists have changed.

window.navigator.plugins.length
Returns the number of plugins, represented by Plugin objects, that the user agent reports.

plugin = window.navigator.plugins.item(index)
window.navigator.plugins[index]
Returns the specified Plugin object.

plugin = window.navigator.plugins.item(name)
window.navigator.plugins[name]
Returns the Plugin object for the plugin with the given name.

window.navigator.mimeTypes.length
Returns the number of MIME types, represented by MimeType objects, supported by the plugins that the user agent reports.

mimeType = window.navigator.mimeTypes.item(index)
window.navigator.mimeTypes[index]
Returns the specified MimeType object.

mimeType = window.navigator.mimeTypes.item(name)
window.navigator.mimeTypes[name]
Returns the MimeType object for the given MIME type.

plugin.name
Returns the plugin’s name.

plugin.description
Returns the plugin’s description.

plugin.filename
Returns the plugin library’s filename, if applicable on the current platform.

plugin.length
Returns the number of MIME types, represented by MimeType objects, supported by the plugin.

mimeType = plugin.item(index)
plugin[index]
Returns the specified MimeType object.

mimeType = plugin.item(name)
plugin[name]
Returns the MimeType object for the given MIME type.

mimeType.type
Returns the MIME type.

mimeType.description
Returns the MIME type’s description.

mimeType.suffixes
Returns the MIME type’s typical file extensions, in a comma-separated list.

mimeType.enabledPlugin
Returns the Plugin object that implements this MIME type.

window.navigator.javaEnabled
Returns true if there’s a plugin that supports the MIME type “application/x-java-vm”.

Interfaces

NavigatorPlugins

[NoInterfaceObject]
interface NavigatorPlugins {
    readonly attribute PluginArray plugins;
    readonly attribute MimeTypeArray mimeTypes;
    readonly attribute boolean javaEnabled;
};

navigator.plugins
This attribute must return a PluginArray object. The same object must be returned each time.

navigator.mimeTypes
This attribute must return a MimeTypeArray object. The same object must be returned each time.

navigator.javaEnabled
This attribute must return true if the user agent supports a plugin that supports the MIME type “application/x-java-vm”. (This is a fingerprinting vector.)

PluginArray

interface PluginArray {
    void refresh(optional boolean reload = false);
    readonly attribute unsigned long length;
    getter Plugin item(unsigned long index);
    getter Plugin namedItem(DOMString name);
};

navigator.plugins.refresh()

navigator.plugins.length

navigator.plugins.item()

navigator.plugins.namedItem()

MimeTypeArray

interface MimeTypeArray {
    readonly attribute unsigned long length;
    getter MimeType item(unsigned long index);
    getter MimeType namedItem(DOMString name);
};

navigator.mimeTypes.length

navigator.mimeTypes.item()

navigator.mimeTypes.namedItem()

Plugin

interface Plugin {
    readonly attribute DOMString name;
    readonly attribute DOMString description;
    readonly attribute DOMString filename;
    readonly attribute unsigned long length;
    getter MimeType item(unsigned long index);
    getter MimeType namedItem(DOMString name);
};

navigator.plugins[ ].name

Read only. The name of the plugin.

navigator.plugins[ ].description

Read only. A human readable description of the plugin.

navigator.plugins[ ].filename

Read only. The filename of the plugin file.

navigator.plugins[ ].length

navigator.plugins[ ].item()

Returns the MIME type of a supported content type, given the index number into a list of supported types.

navigator.plugins[ ].namedItem()

Returns the MIME type of a supported item.

navigator.plugins[ ].version

This appears to be a valid attribute, but it is not in the interface description.
Read only. The plugin’s version number string. Gecko browsers only (Firefox 4+).

MimeType

interface MimeType {
    readonly attribute DOMString type;
    readonly attribute DOMString description;
    readonly attribute DOMString suffixes; // comma-separated
    readonly attribute Plugin enabledPlugin;
};

type

description

suffixes

enabledPlugin

References

Hickson, Ian, ed. “6.6.1.5 Plugins” in “HTML5: A vocabulary and associated APIs for HTML and XHTML”. W3C Recommendation. World Wide Web Consortium (W3C). October 28, 2014. Accessed June 15, 2016.