Each <EMBED> tag is represented here by an object. The embeds are encapsulated in the same JavaObject objects as are used for the Java applets.
Every embedded plugin will respond to different suites of property and method messages although there may be some similarities between some plugins that serve the same purpose.
Netscape and MSIE encapsulate plugin/embedded objects in a different way. In MSIE they are objects of the EMBED class. In Netscape they are objects commonly referred to as belonging to the Plugin class although they are really implemented as JavaObject objects. In MSIE, this is an ActiveX object.
There is additional confusion in that there is a plugins[] array that belongs to the document and another than belongs to the navigator object. They both contain collections of objects but of different types. This is further confused by the fact that the document.plugins[] array is another name for the document.embeds[] array.
Due to this confusing situation, the best recommendation is that we refer to document.embeds[] and navigator.plugins[] and quietly ignore the document.plugins[] array. Furthermore we shall refer to Plugin objects as being something the browser can use to play embedded content and Embed objects will be an instance of a plugin that is alive and running in a document.
In MSIE version 4, this returns a Collection object instead of an EmbedArray object. MSIE 5 is more consistent with Netscape .
Because of the confusion between embedded and installed plugins, it is highly recommended that you use the document.embeds array for scripts that operate on objects instantiated by the <EMBED> tag. Then, use the navigator.plugins array for operations on the installed and available plugins that may not yet be embedded into a page.
| See also: | Document object, Document.embeds[], EmbedArray object |
| Prev | Home | Next |
| Document.parentWindow | Up | Document.protocol |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||