WebExtensions: Difference between revisions

Jump to navigation Jump to search
Updated packaging
(Updated packaging)
Line 9: Line 9:


We hope to ship a preliminary version of this API in Firefox 42.
We hope to ship a preliminary version of this API in Firefox 42.
== Testing ==
You can test an extension as follows. (Note: a good example to start with is the [https://developer.chrome.com/extensions/examples/extensions/gmail.zip Gmail checker extension].) Edit the manifest.json file and add the following (replacing the add-on ID with something unique):
<blockquote><pre>
"applications": {
  "gecko": {
    "id": "my-addon@foopy.net",
  }
}
</pre></blockquote>
Now zip up the extension and give it a ".xpi" suffix. Load the add-on into Firefox as you normally would (File > Open should work).


== Packaging ==
== Packaging ==


At this point it's difficult to experiment with the API because extensions cannot be installed directly. [https://bugzilla.mozilla.org/show_bug.cgi?id=1190692 Bug 1190692] tracks the work to make it possible to install them using the add-on manager. The only way WebExtensions can be installed right now is to package them into XPIs via [http://mxr.mozilla.org/mozilla-central/source/browser/components/extensions/prepare.py a Python script]. This script generates install.rdf and bootstrap.js files. It can then be zipped into an .xpi and installed using the add-on manager.
In the future, we're planning to use the .zip file extension. We also would like to make the ID optional.
 
In the future, we're planning to use the .zip file extension. All of the data currently in install.rdf will be moved to the manifest.json file. Will will not use install.rdf or bootstrap.js. Extensions will be signed using JAR signing (the same as we do for existing Firefox add-ons).


See https://developer.chrome.com/extensions/manifest for a complete list of manifest directives. The ones we currently support are below.
See https://developer.chrome.com/extensions/manifest for a complete list of manifest directives. The ones we currently support are below.
Confirmed users
130

edits

Navigation menu