aboutsummaryrefslogtreecommitdiff
path: root/tools/addon-sdk-1.5/packages/api-utils/README.md
blob: 55adb57cc9f228e55027ece9767e4fc49fd2fcc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

API Utils provides a basic CommonJS infrastructure for
developing traditional XULRunner add-ons and applications. It is
the basis for the Add-on SDK.

To address issues present in traditional add-on development,
API Utils provides mechanisms for:

* writing and executing test cases, inspired by Python's [nose][]
  package,
* tracking JS objects of interest to aid in memory profiling and leak
  detection,
* registering callbacks that perform cleanup tasks when modules are
  unloaded,
* easily reporting errors with full stack tracebacks.

API Utils also has the following characteristics:

* Beautiful, concise documentation.
* A rigorous test suite ensuring that the library doesn't break as the
  Mozilla platform evolves.
* Solid developer ergonomics ensuring that developers can easily find
  out why something they're doing isn't working.

API Utils is intended to be very small and only contain the bare
minimum of functionality that all add-ons need.

Note that the API Utils package has not fully stabilized yet, meaning that
we do still expect to make incompatible changes to its APIs in future releases
of the SDK.

  [nose]: http://code.google.com/p/python-nose/