Plug-ins and HTML
Embedded plug-ins are loaded by Navigator when the user encounters an HTML page with an
embedded object with a MIME type registered by a plug-in. When loaded, an embedded plug-in
is displayed as part of the HTML document in a rectangular subpart of the page. This is
similar to how a GIF or JPEG image is embedded, except that the plug-in can be live and
respond to user events (such as mouse clicks).
Plug-in objects are embedded in an HTML page by using the EMBED tag.
The syntax of the EMBED tag is:
<EMBED attributes> ... </EMBED>
Use the following attributes with the EMBED tag:
- HEIGHT="value" defines the horizontal location of the plug-in in the HTML page.
The unit of measurement is optionally defined by the UNITS attribute.
- HIDDEN="value" indicates whether the plug-in is visible on the page.
The value can be either true (the default) or false.
A value of true overrides the values of HEIGHT and WIDTH, making the plug-in zero-sized.
Always explicitly set HIDDEN=true to make an invisible plug-in (rather than simply setting
the HEIGHT and WIDTH to zero).
- PALETTE="value" indicates the mode of the plug-in's color palette.
The value can be either foreground or background (the default).
The palette mode is only relevant on the Windows platform.
- PLUGINSPAGE="URL" indicates the location of instructions on installing the
plug-in. The value URL is a standard uniform resource locator. The URL is used
by the assisted installation process if the plug-in registered for
the MIME type of this EMBED tag is not found.
- SRC="URL" optionally indicates the location of the plug-in data file. The value
URL is a standard uniform resource locator. The MIME type of the file (typically based
on the file-name suffix) determines which plug-in is loaded to handle this EMBED tag.
Either the SRC attribute or the TYPE attribute is required in an EMBED tag.
- TYPE="type" optionally indicates the MIME type of the EMBED tag, which in turn
determines which plug-in is loaded to handle this EMBED tag.
Either the SRC attribute or the TYPE attribute is required in an EMBED tag.
Use TYPE instead of SRC for plug-ins that require no data (for example, a plug-in that
draws an analog clock) or plug-ins that fetch all their data dynamically.
- WIDTH="value " optionally defines the vertical location of the plug-in in the HTML
page. The unit of measurement is optionally defined by the UNITS attribute.
- UNITS="value" defines the measurement unit used by the HEIGHT
and WIDTH attributes. The value can be either pixels (the
default) or en (half the point size).
In addition to these standard attributes, plug-ins may optionally have private attributes
to communicate specialized information between the HTML page and the plug-in code.
Navigator ignores all non-standard attributes when parsing the HTML, but passes all attributes
to the plug-in, allowing the plug-in to examine the attribute list for any private attributes
that may modify its behavior.
For example, a plug-in that displays video could have private attributes to determine whether
the plug-in should automatically start playing the video, and whether the video should
automatically loop on playback. Thus an example EMBED tag could be:
Navigator would interpret the SRC tag to load the data file and determine the MIME type of the
data, and the WIDTH and HEIGHT tags to size the area of the page handled by the plug-in
to be 320 by 200 pixels. Navigator would simply ignore private attributes AUTOSTART and LOOP
and pass them to the plug-in with the rest of the attributes. The plug-in could then scan its
list of attributes to see if it should automatically start the video and loop it on playback.