This file is indexed.

/usr/share/doc/libjs-mathjax-doc/html/_sources/api/ajax.rst.txt is in libjs-mathjax-doc 2.7+20171212-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
.. _api-ajax:

***********************
The MathJax.Ajax Object
***********************

The `MathJax.Ajax` structure holds the data and functions for handling
loading of external modules.  Modules are loaded only once, even if
called for in several places.  The loading of files is asynchronous,
and so the code that requests an external module will continue to run
even when that module has not completed loading, so it is important to
be aware of the timing issues this may cause.  Similarly, creating or
loading stylesheets is an asynchronous action.  In particular, all
actions that rely on the file or stylesheet having been loaded must be
delayed until after the file has been downloaded completely.  This is
the reason for the large number of routines that take callback
functions.

Any operation that could cause the loading of a file or stylesheet
must be synchronized with the rest of the code via such callbacks.
Since processing any mathematics might cause files to be loaded (e.g.,
little-used markup might be implemented in an extension that is loaded
only when that markup is used), any code that dynamically typesets
mathematics will need to be structured to use callbacks to guarantee
that the mathematics has been completely processed before the code
tries to use it.  See the :ref:`Synchronizing with MathJax <synchronization>`
documentation for details on how to do this properly.


Properties
==========

.. describe:: timeout

    Number of milliseconds to wait for a file to load before
    it is considered to have failed to load.
        
    *Default:* 15 seconds

.. describe:: STATUS.OK

    The value used to indicate that a file load has occurred
    successfully.

.. describe:: STATUS.ERROR

    The value used to indicate that a file load has caused an error or
    a timeout to occur.

.. describe:: loaded

    An object containing the names of the files that have been loaded (or
    requested) so far.  ``MathJax.Ajax.loaded["file"]`` will be
    non-``null`` when the file has been loaded, with the value being
    the ``MathJax.Ajax.STATUS`` value of the load attempt.

.. describe:: loading

    An object containing the files that are currently loading, the
    callbacks that are to be run when they load or timeout, and
    additional internal data.

.. describe:: loadHooks

    An object containing the load hooks for the various files, set up by
    the :meth:`LoadHook()` method, or by the
    :meth:`MathJax.Hub.Register.LoadHook()` method.


Methods
=======

.. method:: Require(file[,callback])

    Loads the given file if it hasn't been already. The file must be a
    JavaScript file or a CSS stylesheet; i.e., it must end in ``.js``
    or ``.css``.  Alternatively, it can be an object with a single
    `key:value` pair where the `key` is one of ``js`` or ``css`` and
    the `value` is the file of that type to be loaded (this makes it
    possible to have the file be created by a CGI script, for example,
    or to use a ``data::`` URL).  The file must be relative to the
    MathJax home directory and can not contain ``../`` file path
    components.
        
    When the file is completely loaded and run, the `callback`, if
    provided, will be executed passing it the status of the file load.
    If there was an error while loading the file, or if the file fails
    to load within the time limit given by ``MathJax.Ajax.timout``,
    the status will be ``MathJax.Ajax.STATUS.ERROR`` otherwise it
    will be ``MathJax.Ajax.STATUS.OK``.  If the file is already
    loaded, the callback will be called immediately and the file will
    not be loaded again.
        
    :Parameters:
        - **file** --- name of the file to be loaded
        - **callback** --- the callback specification
    :Returns: the callback object

.. method:: Load(file[,callback])

    Used internally to load a given file without checking if it
    already has been loaded, or where it is to be found.

    :Parameters:
        - **file** --- name of the file to be loaded
        - **callback** --- the callback specification
    :Returns: the callback object

.. method:: loadComplete(file)

    Called from within the loaded files to inform MathJax that the
    file has been completely loaded and initialized.  The `file`
    parameter is the name of the file that has been loaded.  This
    routine will cause any callback functions registered for the file
    or included in the :meth:`MathJax.Ajax.Require()` calls to be
    executed, passing them the status of the load
    (``MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as
    their last parameter.

    :Parameters:
        - **file** --- name of the file that has been loaded
    :Returns: ``null``

.. method:: loadTimeout(file)

    Called when the timeout period is over and the file hasn't loaded.
    This indicates an error condition, and the
    :meth:`MathJax.Ajax.loadError()` method will be executed, then the
    file's callback will be run with ``MathJax.Ajax.STATUS.ERROR`` as
    its parameter.

    :Parameters:
        - **file** --- name of the file that timed out
    :Returns: ``null``

.. method:: loadError(file)

    The default error handler called when a file fails to load.  It
    puts a warning message into the MathJax message box on screen.

    :Parameters:
        - **file** --- the name of the file that failed to load
    :Returns: ``null``

.. method:: LoadHook(file,callback)

    Registers a callback to be executed when the given file is
    loaded.  The file load operation needs to be started when this
    method is called, so it can be used to register a hook for a file
    that may be loaded in the future.

    :Parameters:
        - **file** --- the name of the file to wait for
        - **callback** --- the callback specification
    :Returns: the callback object

.. method:: Preloading(file1[,file2...])

    Used with combined configuration files to indicate what files are 
    in the configuration file.  Marks the files as loading (since there 
    will never be an explicit :meth:`Load()` or :meth:`Require()` call for 
    them), so that load-hooks and other load-related events can be 
    properly processed when the :meth:`loadComplete()` occurs.

    :Parameters:
        - **file1, file2, ...** --- the names of the files in the combined file
    :Returns: ``null``

.. method:: Styles(styles[,callback])

    Creates a stylesheet from the given style data. `styles` can
    either be a string containing a stylesheet definition, or an
    object containing a :ref:`CSS Style Object <css-style-objects>`.
    For example:

    .. code-block:: javascript

        MathJax.Ajax.Styles("body {font-family: serif; font-style: italic}");

    and

    .. code-block:: javascript

        MathJax.Ajax.Styles({
          body: {
            "font-family": "serif",
            "font-style":  "italic"
          }
        });

    both set the body font family and style.

    The callback routine is called when the stylesheet has been
    created and is available for use.
        
    :Parameters:
        - **styles** --- CSS style object for the styles to set
        - **callback** --- the callback specification
    :Returns: the callback object

    .. note::
        
        Internet Explorer has a limit of 32 dynamically created
        stylesheets, so it is best to combine your styles into one
        large group rather than making several smaller calls.

.. method:: fileURL(file)

    Returns a complete URL to a file (replacing ``[MathJax]`` with the
    actual root URL location).

    :Parameters:
        - **file** --- the file name possibly including ``[MathJax]``
    :Returns: the full URL for the file