MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 2480 of Plugins

  • Revision slug: Plugins
  • Revision title: Plugins
  • Revision id: 2480
  • Created:
  • Creator: Josh
  • Is current revision? No
  • Comment

Revision Content

Plugins (or plug-ins) in the context of Mozilla-based applications are binary components that, when registered with an application, can display content that the application itself can't display natively. For example, Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page.

Plugins can be useful when building an application using the Mozilla framework. For example {{ mediawiki.interwiki('wikipedia', 'ActiveState_Komodo', 'ActiveState Komodo') }} uses plugins to embed the {{ mediawiki.interwiki('wikipedia', 'Scintilla_(editing_component)', 'Scintilla editor') }} in its XUL-based UI.

Plugins are written using NPAPI, the cross-browser API for plugins. The main source of documentation for NPAPI is the Gecko Plugin API Reference. To make your plugin scriptable from web pages, use npruntime. The older XPCOM- and LiveConnect-based APIs for plugins should not be used. The technologies themselves continue to be used, just not for plugins.

You can use SVG or Canvas for simpler tasks of script-driven graphics and animation.

Plugins are different from extensions, which modify or enhance the functionality of the browser itself. Plugins are also different from search plugins, which plug additional search engines in the search bar.

Documentation

Gecko Plugin API Reference (NPAPI)
This reference describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces.
Scripting plugins (npruntime)
This reference describes the new cross-browser NPAPI extensions that let plugins be scriptable and also let them access the script objects in the browser.
Gecko Plugin SDK
The Gecko plugin SDK contains all of the tools and headers needed for making scriptable plugins for Gecko, including the xpidl compiler/linker and the latest npapi.h.
Shipping a plugin as an extension
Plugins can be shipped as extension packages allowing a user to easily install, uninstall and manage their personal plugins.
Detecting Plugins
Since there are clearly times when it makes sense to use a plug-in, the question arises of how to deal with those who don’t have the required plug-in installed.
Monitoring Plugins
Use an observer service notification to monitor the amount of time spent executing calls in plug-ins. This can be useful when trying to determine if a plug-in is consuming too many resources.
Scripting Plugins: Macromedia Flash
This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation.
Plugins: The First Install Problem
The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser.
ActiveX Control for Hosting Netscape Plug-ins in IE
Microsoft has removed support for Netscape plug-ins from IE 5.5 SP2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work!
Plugins: Samples and Test Cases
NPAPI plugin samples and test cases.
XEmbed Extension for Mozilla Plugins
Recent versions of Mozilla include an extension for writing plugins that use XEmbed instead of using the old Xt-based main loop that most plugins have been using since the Netscape 3.x days.

View All...

Community

  • View Mozilla forums...

{{ DiscussionList("dev-tech-plugins", "mozilla.dev.tech.plugins") }}

Related Topics

Extensions, SVG, Canvas

Categories

Interwiki Language Links


{{ languages( { "de": "de/Plugins", "es": "es/Plugins", "fr": "fr/Plugins", "ja": "ja/Plugins", "pl": "pl/Wtyczki", "pt": "pt/Plugins", "ko": "ko/Plugins" } ) }}

Revision Source

<p>
</p>
<div>
<p><b>Plugins</b> (or plug-ins) in the context of Mozilla-based applications are binary components that, when registered with an application, can display content that the application itself can't display natively. For example, Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page.
</p><p>Plugins can be useful when building an application using the Mozilla framework. For example {{ mediawiki.interwiki('wikipedia', 'ActiveState_Komodo', 'ActiveState Komodo') }} uses plugins to embed the {{ mediawiki.interwiki('wikipedia', 'Scintilla_(editing_component)', 'Scintilla editor') }} in its XUL-based UI.
</p><p>Plugins are written using <b>NPAPI</b>, the cross-browser API for plugins. The main source of documentation for NPAPI is the <a href="en/Gecko_Plugin_API_Reference">Gecko Plugin API Reference</a>. To make your plugin scriptable from web pages, use <a href="en/Gecko_Plugin_API_Reference/Scripting_plugins">npruntime</a>. The older <a href="en/XPCOM">XPCOM</a>- and <a href="en/LiveConnect">LiveConnect</a>-based APIs for plugins should not be used. The technologies themselves continue to be used, just not for plugins.
</p><p>You can use <a href="en/SVG">SVG</a> or <a href="en/HTML/Canvas">Canvas</a> for simpler tasks of script-driven graphics and animation.
</p><p>Plugins are different from <a href="en/Extensions">extensions</a>, which modify or enhance the functionality of the browser itself. Plugins are also different from <a href="en/Creating_OpenSearch_plugins_for_Firefox">search plugins</a>, which plug additional search engines in the search bar.
</p>
</div>
<table class="topicpage-table">
<tbody><tr><td>
<h4 name="Documentation"> <a href="Special:Tags?tag=Plugins&amp;language=en">Documentation</a> </h4>
<dl><dt> <a href="en/Gecko_Plugin_API_Reference">Gecko Plugin API Reference</a> (NPAPI)
</dt><dd> <small>This reference describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces.</small>
</dd></dl>
<dl><dt> <a href="en/Gecko_Plugin_API_Reference/Scripting_plugins">Scripting plugins</a> (npruntime)
</dt><dd> <small>This reference describes the new cross-browser NPAPI extensions that let plugins be scriptable and also let them access the script objects in the browser.</small>
</dd></dl>
<dl><dt> <a href="en/Gecko_SDK">Gecko Plugin SDK</a>
</dt><dd> <small>The Gecko plugin SDK contains all of the tools and headers needed for making scriptable plugins for Gecko, including the xpidl compiler/linker and the latest <code>npapi.h</code>.</small>
</dd></dl>
<dl><dt> <a href="en/Shipping_a_plugin_as_an_extension">Shipping a plugin as an extension</a>
</dt><dd> <small>Plugins can be shipped as extension packages allowing a user to easily install, uninstall and manage their personal plugins.</small>
</dd></dl>
<dl><dt> <a class="external" href="http://developer.apple.com/internet/webcontent/detectplugins.html">Detecting Plugins</a>
</dt><dd> <small>Since there are clearly times when it makes sense to use a plug-in, the question arises of how to deal with those who don’t have the required plug-in installed.</small>
</dd></dl>
<dl><dt> <a href="en/Monitoring_plugins">Monitoring Plugins</a>
</dt><dd> <small>Use an observer service notification to monitor the amount of time spent executing calls in plug-ins. This can be useful when trying to determine if a plug-in is consuming too many resources.</small>
</dd></dl>
<dl><dt> <a href="en/Scripting_Plugins/Macromedia_Flash">Scripting Plugins: Macromedia Flash</a>
</dt><dd> <small>This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation.</small>
</dd></dl>
<dl><dt> <a href="en/Plugins/The_First_Install_Problem">Plugins: The First Install Problem</a>
</dt><dd> <small>The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser.</small>
</dd></dl>
<dl><dt> <a href="en/ActiveX_Control_for_Hosting_Netscape_Plug-ins_in_IE">ActiveX Control for Hosting Netscape Plug-ins in IE</a>
</dt><dd> <small>Microsoft has removed support for Netscape plug-ins from IE 5.5 SP2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work!</small>
</dd></dl>
<dl><dt> <a href="en/Plugins/Samples_and_Test_Cases">Plugins: Samples and Test Cases</a>
</dt><dd> <small>NPAPI plugin samples and test cases.</small>
</dd></dl>
<dl><dt> <a href="en/XEmbed_Extension_for_Mozilla_Plugins">XEmbed Extension for Mozilla Plugins</a>
</dt><dd> <small>Recent versions of Mozilla include an extension for writing plugins that use XEmbed instead of using the old Xt-based main loop that most plugins have been using since the Netscape 3.x days.</small>
</dd></dl>
<p><span class="alllinks"><a href="Special:Tags?tag=Plugins&amp;language=en">View All...</a></span>
</p>
</td>
<td>
<h4 name="Community"> Community </h4>
<ul><li> View Mozilla forums...
</li></ul>
<p>{{ DiscussionList("dev-tech-plugins", "mozilla.dev.tech.plugins") }}
</p>
<h4 name="Related_Topics"> Related Topics </h4>
<dl><dd> <a href="en/Extensions">Extensions</a>, <a href="en/SVG">SVG</a>, <a href="en/HTML/Canvas">Canvas</a>
</dd></dl>
</td></tr></tbody></table>
<p><span class="comment">Categories</span>
</p><p><span class="comment">Interwiki Language Links</span>
</p><p><br>
</p>{{ languages( { "de": "de/Plugins", "es": "es/Plugins", "fr": "fr/Plugins", "ja": "ja/Plugins", "pl": "pl/Wtyczki", "pt": "pt/Plugins", "ko": "ko/Plugins" } ) }}
Revert to this revision