~jderose/ubuntu/vivid/couchdb/fix-1457464

« back to all changes in this revision

Viewing changes to src/fauxton/extensions.md

  • Committer: Package Import Robot
  • Author(s): Jason Gerard DeRose
  • Date: 2014-07-20 16:31:46 UTC
  • mfrom: (1.3.6)
  • Revision ID: package-import@ubuntu.com-20140720163146-lfok33zib66d1xwe
Tags: 1.6.0-0ubuntu1
* New upstream release (LP: #1212481)
* debian/control: bump Standards-Version to 3.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Extensions
 
2
 
 
3
Extensions allow Fauxton views to be have extra functionality.
 
4
 
 
5
A module registers an extension by
 
6
 
 
7
    FauxtonAPI.registerExtension('extensionName', myObjectToRegister);
 
8
 
 
9
Any other module wanting to use that extension can then get 
 
10
all objects registered for an extension by:
 
11
 
 
12
    var extensions = FauxtonAPI.getExtensions('extensionName');
 
13
    // extensions will always be an array
 
14
 
 
15
The module can then use those extensions to extend its functionality.
 
16
An example of extensions in the compaction module (app/addons/compaction/base.js) 
 
17
and in documents module (app/modules/documents/views line 1003)