MozillaZine

Extension development advice

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 01:32, 13 November 2004
Asqueella (Talk | contribs)
(remove link to Dev:Tips)
<-- Previous diff
Revision as of 03:11, 19 December 2004
Asqueella (Talk | contribs)

Next diff -->
Line 1: Line 1:
 +{{extdev}}
 +
Below is some general advice about extension development. Below is some general advice about extension development.
Line 8: Line 10:
* Once your extension is installed, Mozilla doesn't read any of those contents.rdf files that it contains; they are only required for installation. This means that if you make certain modifications to your extension ''while it is installed'' (such as overlaying different XUL files) then this information should be [[Dev : Extensions : Overlays|registered directly]] with Mozilla rather than within the contents.rdf files. Don't forget to update these contents.rdf files when you come to package your extension for distribution, though! * Once your extension is installed, Mozilla doesn't read any of those contents.rdf files that it contains; they are only required for installation. This means that if you make certain modifications to your extension ''while it is installed'' (such as overlaying different XUL files) then this information should be [[Dev : Extensions : Overlays|registered directly]] with Mozilla rather than within the contents.rdf files. Don't forget to update these contents.rdf files when you come to package your extension for distribution, though!
 +
 +[[Category:Development]]

Revision as of 03:11, 19 December 2004

This page is part of the extension development documentation project.

Ask your questions in MozillaZine Forums. Also try browsing example code.

Note: development documentation is in process of being moved to Mozilla Development Center (MDC).

Below is some general advice about extension development.

Once you have packaged up and installed your first extension, you can learn more about extension development by modifying its code to suit whatever project you have in mind.

  • It will make life much easier if you persuade Mozilla to work with uncompressed folders instead of JAR files.
  • You might not have noticed when you created your first extension, but some of the contents.rdf files you created contain important information about overlays. Specifically, they describe the XUL files which you want to overlay, and those which you are overlaying them with. You must include this information correctly for your extension to work. Bear in mind the following point, too.
  • Once your extension is installed, Mozilla doesn't read any of those contents.rdf files that it contains; they are only required for installation. This means that if you make certain modifications to your extension while it is installed (such as overlaying different XUL files) then this information should be registered directly with Mozilla rather than within the contents.rdf files. Don't forget to update these contents.rdf files when you come to package your extension for distribution, though!