NavigatorPlugins.mimeTypes

  • Revision slug: DOM/window.navigator.mimeTypes
  • Revision title: window.navigator.mimeTypes
  • Revision id: 178394
  • Created:
  • Creator: Diablownik
  • Is current revision? No
  • Comment link to pl

Revision Content

{{template.DomRef()}}

Summary

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

Syntax

mimeTypes = navigator.mimeTypes; 

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

Example

  alert(window.navigator.mimeTypes.item(0).description); // alerts "Mozilla Default Plug-in"

Notes

The zeroth element in mimeTypes (the "Mozilla Default Plug-in" MimeType object) has a type property of * instead of a typical MIME format like "image/x-macpaint"

Specification

{{template.DOM0()}}

{{ wiki.languages( { "pl": "pl/DOM/window.navigator.mimeTypes" } ) }}

Revision Source

<p>
{{template.DomRef()}}
</p>
<h3 name="Summary">Summary</h3>
<p>Returns a <code><a class="external" href="http://www.xulplanet.com/references/objref/MimeTypeArray.html">MimeTypeArray</a></code> object, which contains a list of <code><a class="external" href="http://www.xulplanet.com/references/objref/MimeType.html">MimeType</a></code> objects representing the MIME types recognized by the browser.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval"><i>mimeTypes</i> = navigator.mimeTypes; 
</pre>
<p><code>mimeTypes</code> is a <code><a class="external" href="http://www.xulplanet.com/references/objref/MimeTypeArray.html">MimeTypeArray</a></code> object which has a <code>length</code> property as well as <code>item(index)</code> and <code>namedItem(name)</code> methods.
</p>
<h3 name="Example">Example </h3>
<pre>  alert(window.navigator.mimeTypes.item(0).description); // alerts "Mozilla Default Plug-in"
</pre>
<h3 name="Notes"> Notes </h3>
<p>The zeroth element in mimeTypes (the "Mozilla Default Plug-in" <code>MimeType</code> object) has a <code>type</code> property of <code>*</code> instead of a typical MIME format like <code>"image/x-macpaint"</code>
</p>
<h3 name="Specification">Specification </h3>
<p>{{template.DOM0()}}
</p>{{ wiki.languages( { "pl": "pl/DOM/window.navigator.mimeTypes" } ) }}
Revert to this revision