Skip to content

Commit 912b9ca

Browse files
committed
Add "hook" and "module" to glossary
1 parent ea17601 commit 912b9ca

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

doc/glossary.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ Glossary
66
.. glossary::
77
:sorted:
88

9+
hook
10+
A function that handles work delegated to a :term:`module` by the
11+
:term:`application`. A hook function can return a value or a
12+
:term:`Promise`. The arguments to hook functions can vary. See
13+
:ref:`module-hooks` for a description of the core hooks provided by
14+
Annotator.
15+
16+
module
17+
A module extends the functionality of an :term:`application`, primarily
18+
through :term:`hook` functions. See the section :doc:`module-development`
19+
for details about writing modules.
20+
921
Promise
1022
An object used for deferred and asynchronous computations.
1123
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

doc/module-development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Module development
44
The basics
55
----------
66

7-
An Annotator module is a function that can be passed to
7+
An Annotator :term:`module` is a function that can be passed to
88
:func:`~annotator.App.prototype.include` in order to extend the functionality of
99
an Annotator application.
1010

0 commit comments

Comments
 (0)