Plugins

  • Revision slug: Plugins
  • Revision title: Plugins
  • Revision id: 2498
  • Created:
  • Creator: MarkGiffin
  • Is current revision? No
  • Comment 2 words added

Revision Content

Plugins (or plug-ins) are shared libraries that users can install to display content that the application itself can't display natively. For example, the 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 ActiveState Komodo uses plugins to embed the 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.

Plugins can be written completely from scratch using C APIs (usually in C or C++) or they may be built on a plugin framework such as Firebreath, JUCE, or QtBrowserPlugin. There are also some code generation tools that may be helpful. More information about these tools can be found on the External Resources page.

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 SDK
The Gecko SDK contains all of the tools and headers needed for making scriptable plugins for Gecko, including latest npapi.h and associated headers and tools.
Out of process plugins
Firefox 3.6.4 introduced out-of-process plugins which execute in a separate process so that a crashing plugin does not crash the browser.
Shipping a plugin as a Toolkit bundle
Plugins can be shipped as a Toolkit bundle, allowing a user to easily install, uninstall and manage their personal plugins.
Detecting Plugins
How to use JavaScript to detect if a plugin is installed and suggestions on what to do if it is not.
Supporting private browsing in plugins
Firefox 3.5 introduced support for private browsing; learn how to make your plugin respect the user's privacy wishes.
Multi-Process Plugin Architecture
How Firefox loads plugins into a separate process
Logging and Debugging for Multi-Process Plugins
How to create a plugin log to aid in debugging problems with multi-process plugins.
Writing a plugin for Mac OS X
Learn how to write a plugin for Mac OS X; a template Xcode project is provided.
Monitoring Plugins
Use an observer service notification to monitor the amount of time spent executing calls in plugins. 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 plugin author, you may find this project saves you a lot of work!
Plugins: Samples and Test Cases
NPAPI plugin samples and test cases.
External Resources for Plugin Creation
External projects, frameworks, and blog posts that may be useful.
XEmbed Extension for Mozilla Plugins
Recent versions of Mozilla on *nix-based systems 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") }}

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

<div> <p><strong>Plugins</strong> (or plug-ins) are shared libraries that users can install to display content that the application itself can't display natively. For example, the 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 <a class="external" href="http://en.wikipedia.org/wiki/ActiveState_Komodo">ActiveState Komodo</a> uses plugins to embed the <a class="external" href="http://en.wikipedia.org/wiki/Scintilla_(editing_component)">Scintilla editor</a> in its XUL-based UI.</p> <p>Plugins are written using <strong>NPAPI</strong>, the cross-browser API for plugins. The main source of documentation for NPAPI is the <a href="/en/Gecko_Plugin_API_Reference" title="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" title="en/Gecko_Plugin_API_Reference/Scripting_plugins">npruntime</a>. The older <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a>- and <a href="/en/LiveConnect" title="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>Plugins can be written completely from scratch using C APIs (usually in C or C++) or they may be built on a plugin framework such as <a class="external" href="http://www.firebreath.org" title="http://www.firebreath.org/">Firebreath</a>, <a class="external" href="http://www.rawmaterialsoftware.com/juce.php" title="http://www.rawmaterialsoftware.com/juce.php">JUCE</a>, or <a class="external" href="http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/developingplugins.html" title="http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/developingplugins.html">QtBrowserPlugin</a>. There are also some code generation tools that may be helpful. More information about these tools can be found on the <a href="/en/Plugins/External_resources_for_plugin_creation" title="en/Plugins/External resources for plugin creation">External Resources</a> page.</p> <p>You can use <a href="/en/SVG" title="en/SVG">SVG</a> or <a href="/en/HTML/Canvas" title="en/HTML/Canvas">Canvas</a> for simpler tasks of script-driven graphics and animation.</p> <p>Plugins are different from <a href="/en/Extensions" title="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" title="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> <h2 id="Documentation" name="Documentation"><a href="/Special:Tags?tag=Plugins&amp;language=en" title="Special:Tags?tag=Plugins&amp;language=en">Documentation</a></h2> <dl> <dt><a href="/en/Gecko_Plugin_API_Reference" title="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" title="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" title="en/Gecko_SDK">Gecko SDK</a></dt> <dd><small>The Gecko SDK contains all of the tools and headers needed for making scriptable plugins for Gecko, including latest <code>npapi.h</code> and associated headers and tools.</small></dd> </dl> <dl> <dt><a href="/en/Plugins/Out_of_process_plugins" title="en/Plugins/Out of process plugins">Out of process plugins</a></dt> <dd><small>Firefox 3.6.4 introduced out-of-process plugins which execute in a separate process so that a crashing plugin does not crash the browser.</small></dd> </dl> <dl> <dt><a href="/en/Shipping_a_plugin_as_a_Toolkit_bundle" title="en/Shipping_a_plugin_as_a_Toolkit_bundle">Shipping a plugin as a Toolkit bundle</a></dt> <dd><small>Plugins can be shipped as a Toolkit <a href="/en/Bundles" title="Bundles">bundle</a>, 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>How to use JavaScript to detect if a plugin is installed and suggestions on what to do if it is not.</small></dd> <dt><a class="internal" href="/En/Supporting_private_browsing_in_plugins" title="en/Supporting private browsing in plugins">Supporting private browsing in plugins</a></dt> <dd><small>Firefox 3.5 introduced support for private browsing; learn how to make your plugin respect the user's privacy wishes.</small></dd> <dt><a href="/en/Plugins/Multi-Process_Plugin_Architecture" title="en/Plugins/Multi-Process Plugin Architecture">Multi-Process Plugin Architecture</a></dt> <dd><small>How Firefox loads plugins into a separate process</small></dd> <dt><a href="/en/Plugins/Logging" title="en/Plugins/Logging">Logging and Debugging for Multi-Process Plugins</a></dt> <dd><small>How to create a plugin log to aid in debugging problems with multi-process plugins.</small></dd> <dt><a class="internal" href="/En/Writing_a_plugin_for_Mac_OS_X" title="en/Writing a plugin for Mac OS X">Writing a plugin for Mac OS X</a></dt> <dd><small>Learn how to write a plugin for Mac OS X; a template Xcode project is provided.</small></dd> </dl> <dl> <dt><a href="/en/Monitoring_plugins" title="en/Monitoring_plugins">Monitoring Plugins</a></dt> <dd><small>Use an observer service notification to monitor the amount of time spent executing calls in plugins. 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/Adobe_Flash" title="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/Gecko_Plugin_API_Reference/Plug-in_Development_Overview" title="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" title="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 plugin author, you may find this project saves you a lot of work!</small></dd> <dt><a href="/en/Plugins/Samples_and_Test_Cases" title="en/Plugins/Samples_and_Test_Cases">Plugins: Samples and Test Cases</a></dt> <dd><small>NPAPI plugin samples and test cases.</small></dd> <dt><a href="/en/Plugins/External_resources_for_plugin_creation" title="https://developer.mozilla.org/en/Plugins/External_resources_for_plugin_creation">External Resources for Plugin Creation</a></dt> <dd><small>External projects, frameworks, and blog posts that may be useful.<br> </small></dd> </dl> <dl> <dt><a href="/en/XEmbed_Extension_for_Mozilla_Plugins" title="en/XEmbed_Extension_for_Mozilla_Plugins">XEmbed Extension for Mozilla Plugins</a></dt> <dd><small>Recent versions of Mozilla on *nix-based systems 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" title="Special:Tags?tag=Plugins&amp;language=en">View All...</a></span></p> </td> <td> <h2 id="Community" name="Community">Community</h2> <ul> <li>View Mozilla forums...</li> </ul> <p>{{ DiscussionList("dev-tech-plugins", "mozilla.dev.tech.plugins") }}</p> <h2 id="Related_Topics" name="Related_Topics">Related Topics</h2> <dl> <dd><a href="/en/Extensions" title="en/Extensions">Extensions</a>, <a href="/en/SVG" title="en/SVG">SVG</a>, <a href="/en/HTML/Canvas" title="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> </p>
<p>{{ languages( { "de": "de/Plugins", "es": "es/Plugins", "fr": "fr/Plugins", "ja": "ja/Plugins", "pl": "pl/Wtyczki", "pt": "pt/Plugins", "ko": "ko/Plugins" } ) }}</p>
Revert to this revision