Extension development advice: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 7: Line 7:
* It will make life much easier if you persuade Mozilla to work with [[Dev : Tips : Disable XUL cache|uncompressed folders]] instead of JAR files.
* It will make life much easier if you persuade Mozilla to work with [[Dev : Tips : Disable XUL cache|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 [[Dev : Extensions : Overlays|include this information correctly]] for your extension to work. Bear in mind the following point, too.
* 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 [[Overlays|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 [[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]]
[[Category:Development]]

Revision as of 04:27, 19 March 2005

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!