Introduction
1. XUL is a cross-platform language for describing applications' user interfaces.
2. Ways you can use XUL:
Firefox extensions; standalone XULRunner application; XUL package; Remote XUL application;
3. Three tips you should know to use XUL:
- XUL elements and attributes should all be entered in lowercase as XML is case-sensitive (unlike HTML).
- Attribute values in XUL must be placed inside quotes, even if they are numbers.
- XUL files are usually split into four files, one each for the layout and elements, for style declarations, for entity declarations (used for localization) and for scripts. In addition, you may have extra files for images or for platform specific data.
XUL Structure
1. There are some features that are specific to HTML, such as form, and others that are specific to XUL, such as overlays.
2. Both HTML and XUL placed on a web site have no extra permissions, however both HTML and XUL loaded through a chrome URL have enhanced permissions; This distinction is not based on the kind of content being displayed, only on the type of URL used.
3. Mozilla uses a distinctly different kind of document object for HTML and XUL, although they share much of the same functionality.
4. By default, Mozilla applications parse XUL files and scripts, and store a pre-compiled version in memory for the remainder of the application session.
5. There are three parts of chrome packages: content; skin; locale.
6. Locale: the localized text is stored in two types of files: DTD files and properties files.
The Chrome URL
1. Basic syntax of chrome URL is as follows: chrome://<package name>/<part>/<file.xul>.
2. Simplified URL: chrome://<package name>/<part>/, this URL will refer to chrome://<package name>/<part>/<package name>.<file extension>, <file extension> will be xul if <part> is content, and css for skin, dtd for locale.
Manifest Files
1. Manifest files' encoding should be ASCII, and it doesn't actually mater what the file is called as long as it has the .manifest extension.
2. The basic syntax of the lines in the manifest file for content/locale/skin package is: content/locale/skin <packagename> <filepath>.
3. For a JAR file located in the chrome directory the syntax is fairly simple: jar:<filename.jar>!/<path_in_archive>.
4. For themes and locales, you also need to specify the content package you are providing a theme or locale for.
skin browser classic/1.0 jar:classic.jar!/skin/classic/browser/locale browser en-US jar:en-US.jar!/locale/browser/