mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 04:22:30 -10:00
6.0 KiB
6.0 KiB
Tutorials
This page lists practical explanations of how to develop add-ons with the SDK. The tutorials don't yet cover all the high-level APIs: see the sidebar on the left for the full list of APIs.
Getting Started
<td>
<h4><a href="dev-guide/tutorials/getting-started-with-cfx.html">Getting started with cfx</a></h4>
The basic <code>cfx</code> commands you need to start creating add-ons.
</td>
<td>
<h4><a href="dev-guide/tutorials/troubleshooting.html">Troubleshooting</a></h4>
Some pointers for fixing common problems and getting more help.
</td>
<td>
</td>
InstallationDownload, install, and initialize the SDK on Windows, OS X and Linux. |
Create User Interfaces
<td>
<h4><a href="dev-guide/tutorials/display-a-popup.html">Display a popup</a></h4>
Display a popup dialog implemented with HTML and JavaScript.
</td>
<td>
<h4><a href="dev-guide/tutorials/add-a-context-menu-item.html">Add a context menu item</a></h4>
Add items to Firefox's context menu.
</td>
Add a toolbar buttonAttach a button to the Firefox Add-on toolbar. |
Add a menu item to FirefoxAdd items to Firefox's main menus. |
Interact with the Browser
<td>
<h4><a href="dev-guide/tutorials/list-open-tabs.html">Get the list of open tabs</a></h4>
Use the <code><a href="modules/sdk/tabs.html">tabs</a></code>
module to iterate through the currently open tabs, and access their content.
</td>
<td>
</td>
Open a web pageOpen a web page in a new browser tab or window using thetabs module, and access its content.
|
Listen for page loadUse thetabs
module to get notified when new web pages are loaded, and access their content.
|
Modify Web Pages
<td>
<h4><a href="dev-guide/tutorials/modifying-web-pages-tab.html">Modify the active web page</a></h4>
Dynamically load a script into the currently active web page.
</td>
Modify web pages based on URLCreate filters for web pages based on their URL: whenever a web page whose URL matches the filter is loaded, execute a specified script in it. |
Development Techniques
<td>
<h4><a href="dev-guide/tutorials/load-and-unload.html">Listen for load and unload</a></h4>
Get notifications when your add-on is loaded or unloaded by Firefox,
and pass arguments into your add-on from the command line.
</td>
<td>
<h4><a href="dev-guide/tutorials/adding-menus.html">Using third-party modules</a></h4>
Install and use additional modules which don't ship with the SDK itself.
</td>
<td>
<h4><a href="dev-guide/tutorials/l10n.html">Localization</a></h4>
Writing localizable code.
</td>
<td>
<h4><a href="dev-guide/tutorials/mobile.html">Mobile development</a></h4>
Get set up to develop add-ons for Firefox Mobile on Android.
</td>
<td>
</td>
LoggingLog messages to the console for diagnostic purposes. |
Creating third-party modulesStructure your add-on in separate modules to make it easier to develop, debug, and maintain. Create reusable packages containing your modules, so other add-on developers can use them too. |
Unit testingWriting and running unit tests using the SDK's test framework. |
Chrome authorityGet access to the Components object, enabling your add-on to load and use any XPCOM object. |
Writing Event TargetsEnable the objects you define to emit their own events. |
Putting It Together
<td>
</td>
Annotator add-onA walkthrough of a relatively complex add-on. |