canmove, Confirmed users
1,448
edits
(Added visualization section.) |
(Added optional chrome properties) |
||
| Line 62: | Line 62: | ||
<pre><p id="type">2</p> | <pre><p id="type">2</p> | ||
</pre> | </pre> | ||
=== chrome- | === chrome-domains<br> === | ||
The chrome domain determines how chrome and resource URLs are resolved for the add-on.<br> | The chrome domain determines how chrome and resource URLs are resolved for the add-on.<br> | ||
'''Example:'''<br> | '''Example:'''<br> | ||
<pre><p id="chrome- | <pre><p id="chrome-domains">packagingspec</p> | ||
</pre> | </pre> | ||
For the above example, the add-on would be registering itself for URLs starting with ''chrome://packagingspec'' and ''resource://packagingspec''.<br> | For the above example, the add-on would be registering itself for URLs starting with ''chrome://packagingspec'' and ''resource://packagingspec''.<br> | ||
See the expanded version of chrome-domains below.<br> | |||
=== target-applications<br> === | === target-applications<br> === | ||
| Line 222: | Line 224: | ||
=== target-platforms === | === target-platforms === | ||
A | A set of strings specifying the platforms that the add-on supports. It contains either the value of OS_TARGET alone or combined with TARGET_XPCOM_ABI, separated by an underscore (_). If any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error message. | ||
There's more information in the [https://developer.mozilla.org/en/Install_Manifests#targetPlatform previous manifest format] documentation. | There's more information in the [https://developer.mozilla.org/en/Install_Manifests#targetPlatform previous manifest format] documentation. | ||
| Line 246: | Line 248: | ||
</li> | </li> | ||
</ol></pre> | </ol></pre> | ||
== Optional chrome properties<br> == | |||
=== overlays === | |||
A list of XUL overlays the add-on applies.<br> | |||
'''Examples:''' | |||
<pre><ol id="overlays"> | |||
<li> | |||
<p class="source">chrome://packagingspec/content/overlay.xul</p> | |||
<p class="target">chrome://browser/content/browser.xul</p> | |||
</li> | |||
</ol></pre><pre><ol id="overlays"> | |||
<li> | |||
<p class="source">chrome://packagingspec/content/overlay.xul</p> | |||
<p class="target">chrome://browser/content/browser.xul</p> | |||
<p class="flags">appversion<=3.7 os=WINNT</p> | |||
</li> | |||
</ol> | |||
</pre> | |||
See the [https://developer.mozilla.org/en/Chrome_Registration#Manifest_Flags manifest flags] section at MDC for more information on the supported flags. They can be applied to any c<br> | |||
=== styles === | |||
A list of XUL style overlays the add-on applies. | |||
'''Examples:''' | |||
<pre><ol id="styles"> | |||
<li> | |||
<p class="source">chrome://packagingspec/skin/toolbar.css</p> | |||
<p class="target">chrome://global/content/customizeToolbar.xul</p> | |||
</li> | |||
</ol></pre> | |||
=== overrides === | |||
A list of XUL window overrides the add-on applies. | |||
'''Examples:'''<br> | |||
<pre><ol id="overrides"> | |||
<li> | |||
<p class="source">chrome://packagingspec/content/newCustomizeToolbar.xul</p> | |||
<p class="target">chrome://global/content/customizeToolbar.xul</p> | |||
</li> | |||
</ol></pre> | |||
=== chrome-domains (Expanded)<br> === | |||
An expanded version of chrome-domain (ADD LINK), that can include multiple domains, as well as specific locations for content, skin, locale and resource packages.<br> | |||
'''Examples:'''<br> | |||
<pre><ol id="chrome-domains"> | |||
<li> | |||
<p class="domain">packagingspec</p> | |||
<ol class="content"> | |||
<li> | |||
<p class="location">chrome/packagingspec/content/</p> | |||
</li> | |||
</ol> | |||
<ol class="skin"> | |||
<li> | |||
<p class="location">chrome/packagingspec/skin/</p> | |||
<p class="skin-name">classic/1.0</p> | |||
</li> | |||
</ol> | |||
<ol class="locale"> | |||
<li> | |||
<p class="location">chrome/packagingspec/locale/en-US/</p> | |||
<p class="locale-name">en-US</p> | |||
</li> | |||
</ol> | |||
<ol class="resources"> | |||
<li> | |||
<p class="location">modules/</p> | |||
<!-- <p class="disabled">true</p> --> | |||
</li> | |||
</ol> | |||
</li> | |||
</ol> | |||
</pre> | |||
The ''disabled'' property for ''resources'' is necessary for add-ons that don't want to publish their presence to websites. It can be included without having to specify a location for resource files. If ''content'', ''skin'' or ''locale'' are included, ''location'' is required, and ''locale-name'' is also required for ''locale'' items. The ''skin-name'' property is optional.<br> | |||
= Visualizing manifests = | = Visualizing manifests = | ||
| Line 252: | Line 334: | ||
<link rel="stylesheet" type="text/css" href="manifest.css" /> | <link rel="stylesheet" type="text/css" href="manifest.css" /> | ||
</head> | </head> | ||
</pre> | </pre> | ||
Here's an example of what can be done with some CSS: [http://xulforge.com/addonpackaging/manifest.html Styled Manifest]. Perhaps there should be an official stylesheet in a known location, to facilitate developer work.<br> | Here's an example of what can be done with some CSS: [http://xulforge.com/addonpackaging/manifest.html Styled Manifest]. Perhaps there should be an official stylesheet in a known location, to facilitate developer work.<br> | ||
More can be done by adding HTML nodes to the document, which will be ignored during parsing and can help make the document more human-readable. However, this practice is discouraged because it can add too much unnecessary information to the manifest. | More can be done by adding HTML nodes to the document, which will be ignored during parsing and can help make the document more human-readable. However, this practice is discouraged because it can add too much unnecessary information to the manifest. | ||