NavigatorPlugins.mimeTypes

 

Summary

Returns a MimeTypeArray object, which contains a list of MimeType objects representing the MIME types recognized by the browser.

Syntax

JavaScript
<var>mimeTypes</var> = navigator.mimeTypes; 

mimeTypes is a MimeTypeArray object which has a length property as well as item(index) and namedItem(name) methods.

Example

JavaScript
function isJavaPresent() {
  return 'application/x-java-applet' in navigator.mimeTypes;
}

function getJavaPluginDescription() {
  var mimetype = navigator.mimeTypes['application/x-java-applet'];
  if (mimetype === undefined) {
    // no Java plugin present
    return undefined;
  }
  return mimetype.enabledPlugin.description;
}

Specification

This is not part of any specification.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/navigatorplugins/mimetypes

API Property Reference Référence