From fd461f92e0be764d68bad171782b252d9247bb2c Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 5 Mar 2011 16:26:48 -0500 Subject: [PATCH] Update API docs to include new/changed methods and variables --- docs/source/api/ajax.rst | 24 +++++++++++++++++++++--- docs/source/api/html.rst | 13 ++++++++++++- docs/source/api/hub.rst | 7 ++++++- docs/source/api/jax.rst | 1 + docs/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 index 0da172d63..28daa6752 100644 --- 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 index c857d4935..784489d08 100644 --- 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 index f751815ee..a836236a4 100644 --- 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 ` 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 index ebb667f26..6de6c0d4e 100644 --- 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 ``