Packagedom.objects
Classpublic class MimeType
InheritanceMimeType Inheritance Object

Introduced in: DOM 0 

A MIME type (Multipart Internet Mail Extension) supported by the client.

See also

MDC - window.navigator.mimeTypes


Public Properties
 PropertyDefined By
  DOM 0 description : DOMString
[read-only] A description of the MIME type.
MimeType
  DOM 0 enabledPlugin : Plugin
[read-only] Reference to the Plugin object configured for the MIME type.
MimeType
  DOM 0 suffixes : DOMString
[read-only] A string listing possible filename extensions for the MIME type, for example "mpeg, mpg, mpe, mpv, vbs, mpegv".
MimeType
  DOM 0 type : DOMString
[read-only] The name of the MIME type, for example "video/mpeg" or "audio/x-wav".
MimeType
Property Detail
DOM 0 descriptionproperty
description:DOMString  [read-only]

Introduced in: DOM 0 

A description of the MIME type.


Implementation
    public function get description():DOMString

See also


Example
"Adobe Flash movie"
DOM 0 enabledPluginproperty 
enabledPlugin:Plugin  [read-only]

Introduced in: DOM 0 

Reference to the Plugin object configured for the MIME type.


Implementation
    public function get enabledPlugin():Plugin

See also


Example
         // Can we display Shockwave movies?
         var mimetype = navigator.mimeTypes["application/x-director"];
         if (mimetype) {
             // Yes, so can we display with a plug-in?
             var plugin = mimetype.enabledPlugin;
             if (plugin) {
                 // Yes, so show the data in-line
                 document.writeln("Here's a movie: <EMBED SRC=mymovie.dir HEIGHT=100 WIDTH=100>");
             } else {
                 // No, so provide a link to the data
                 document.writeln("<A HREF='mymovie.dir'>Click here</A> to see a movie.");
             }
         } else {
             // No, so tell them so
             document.writeln("Sorry, can't show you this cool movie.");
         }
DOM 0 suffixesproperty 
suffixes:DOMString  [read-only]

Introduced in: DOM 0 

A string listing possible filename extensions for the MIME type, for example "mpeg, mpg, mpe, mpv, vbs, mpegv".


Implementation
    public function get suffixes():DOMString

See also


Example
"swf"
DOM 0 typeproperty 
type:DOMString  [read-only]

Introduced in: DOM 0 

The name of the MIME type, for example "video/mpeg" or "audio/x-wav".


Implementation
    public function get type():DOMString

See also


Example
"application/x-shockwave-flash"