Extension development advice

From MozillaZine Knowledge Base
Revision as of 11:04, 12 September 2004 by Mozcerize (talk | contribs)
Jump to navigationJump to search

Extension development advice

Below is some general advice about extension development. Solutions to specific problems can be found here.

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!