• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Hack the Chrome Cleanly > 90. Identify Reusable Toolkits

Identify Reusable Toolkits

Don’t code everything from scratch: reuse bits and pieces of Firefox.

The chrome files supplied with Firefox—XUL, CSS, JavaScript, and others—can be reused by your extension or chrome application project. If you’re familiar with these pieces, you can possibly save yourself a lot of time. At least you’ll save yourself a lot of confusion.

Poking Around Inside toolkit.jar

In the install area, inside the chrome directory, lies the toolkit.jar archive. This is the starting point for all XUL pages and therefore for all extensions and chrome applications. It consists of a number of pieces.

This toolkit.jar file changed a small amount when it was updated from the Mozilla Application Suite (1.x) to Firefox. Because that change involved renaming and was advertised in a number of influential places, some people assumed that there would be significant compatibility issues. This is not the case. The most important files in toolkit.jar have changed very little, so there is substantial and extensive compatibility with other Mozilla-based products. There is 100 percent compatibility with Thunderbird and Nvu, at least. Furthermore, the toolkit.jar file is just a file, and it is easy for extensions to specialize or override portions of it with their own tailored files. There is therefore no reason to consider this file an immovable requirement. It is just a well-tested and convenient starting point.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint