www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fd461f92e0be764d68bad171782b252d9247bb2c
parent 846ebaa4d733cecd0c9c7fc2e40f5b4eb2fd6851
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sat,  5 Mar 2011 16:26:48 -0500

Update API docs to include new/changed methods and variables

Diffstat:
Mdocs/source/api/ajax.rst | 24+++++++++++++++++++++---
Mdocs/source/api/html.rst | 13++++++++++++-
Mdocs/source/api/hub.rst | 7++++++-
Mdocs/source/api/jax.rst | 1+
Mdocs/source/api/message.rst | 35++++++++++++++++++++++++++++++++++-
5 files changed, 74 insertions(+), 6 deletions(-)

diff --git a/docs/source/api/ajax.rst b/docs/source/api/ajax.rst @@ -35,7 +35,7 @@ Properties Number of milliseconds to wait for a file to load before it is considered to have failed to load. - *Default:* 20 seconds + *Default:* 15 seconds .. describe:: STATUS.OK @@ -60,6 +60,12 @@ Properties 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 ======= @@ -106,9 +112,9 @@ Methods 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 + or included in the :meth:`MathJax.Ajax.Require()` calls to be executed, passing them the status or the load - (`MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as + (``MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as their last parameter. :Parameters: @@ -148,6 +154,18 @@ Methods - **callback** --- the callback specification :Returns: the callback object +.. method:: Preloading(file1[,file2...]) + + Used withing combined configuration files to indicate what files are + in the configuration file. Marks the files are loading (since there + will never be an explicit :meth:`Load()` or :meth:`Require()` call for + then), so that load-hooks and other load-related events can be + properly processed. + + :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 diff --git a/docs/source/api/html.rst b/docs/source/api/html.rst @@ -81,6 +81,17 @@ Methods - **text** --- the text for the new node :Returns: the new text node +.. method:: setText(script,text) + + Sets the contents of the ``script`` element to be the given + ``text``, properly taking into account the browser limitations and + bugs. + + :Parameters: + - **script** --- the script whose content is to be set + - **text** --- the text that is to be the script's new content + :Returns: ``null`` + .. describe:: Cookie.Set(name,data) Creates a MathJax cookie using the ``MathJax.HTML.Cookie.prefix`` @@ -91,7 +102,7 @@ Methods MathJax.HTML.Cookie.Set("test",{x:42, y:"It Works!"}); - will create a cookie named "mjx:test" that stores the values of + will create a cookie named "mjx.test" that stores the values of ``x`` and ``y`` provided in the `data` object. This data can be retrieved using the :meth:`MathJax.HTML.Cookie.Get()` method discussed below. diff --git a/docs/source/api/hub.rst b/docs/source/api/hub.rst @@ -28,7 +28,7 @@ Properties options and their default values are given in the :ref:`Core Options <configure-hub>` reference page. -.. describe:: processUpdateTime: 500 +.. describe:: processUpdateTime: 250 The minimum time (in milliseconds) between updates of the "Processing Math" message. @@ -38,6 +38,11 @@ Properties The hub processing signal (tied to the :meth:`MathJax.Hub.Register.MessageHook()` method). +.. describe:: queue + + MathJax's main processing queue. Use :meth:`MathJax.Hub.Queue()` to push + callbacks onto this queue. + .. describe:: Browser The name of the browser as determined by MathJax. It will be one diff --git a/docs/source/api/jax.rst b/docs/source/api/jax.rst @@ -68,6 +68,7 @@ Methods ======= .. Method:: Process(script) + :noindex: This is the method that the ``MathJax.Hub`` calls when it needs the input or output jax to process the given math ``<script>``. Its diff --git a/docs/source/api/message.rst b/docs/source/api/message.rst @@ -66,7 +66,7 @@ Methods - **message** --- the text to display in the message area - **n** --- the message id number - **delay** --- amout of time to display the message - :Returns: the message id nuber for this message. + :Returns: the message id number for this message. .. method:: Clear(n[,delay]) @@ -78,9 +78,42 @@ Methods - **delay** --- the delay before removing the message :Returns: ``null`` +.. method:: Remove() + + This removes the message frame from the window (it will reappear when + future messages are set, however). + + :Returns: ``null`` + +.. method:: File(file) + + This sets the message area to a "Loading *file*" message, where *file* + is the name of the file (with ``[MathJax]`` representing the root + directory). + + :Parameters: + - **file** --- the name of the file being loaded. + :Returns: the message id number for the message created. + +.. method:: filterText(text,n) + + This method is called on each message before it is displayed. It can + be used to modify (e.g., shorten) the various messages before they are + displayed. The default action is to check of the ``messageStyle`` + configuration parameter is ``simple``, and if so, convert loading and + processing messages to a simpler form. This method can be overridden + to perform other sanitization of the message strings. + + :Parameters: + - **text** --- the text of the message to be posted + - **n** --- the id number of the message to be posted + :Returns: the modified message text + .. method:: Log() Returns a string of all the messages issued so far, separated by newlines. This is used in debugging MathJax operations. :Returns: string of all messages so far + +