The element jax is the bridge between the input and output jax, and contains the data produced by the input jax needed by the output jax to display the results. It is tied to the individual <script> tag that produced it, and is the object used by JavaScript programs to interact with the mathematics on the page.
An element jax is stored in the jax.js file in a subdirectory of the jax/element directory, with the subdirectory name being the name of the element jax. Currently, there is only one element jax class, the mml element jax, and it is stored in jax/element/mml.
The MathJax.ElementJax class is a subclass of the MathJax Jax class, and inherits the properties and methods of that class. Those listed below are the additional or overridden ones from that class.
Other data specific to the element jax subclass may also appear here.
Sets the input text for this element to the given text and reprocesses the mathematics. (I.e., update the equation to the new one given by text). When the processing is complete, the callback, if any, is called.
Parameters: |
|
---|---|
Returns: | the callback object |
Remove the output and produce it again. This may be necessary if there are changes to the CSS styles that would affect the layout of the mathematics, for example. The callback, if any, is called when the process completes.
Parameters: |
|
---|---|
Returns: | the callback object |
Removes the output for this element from the web page (but does not remove the original <script>). The <script> will be considered unprocessed, and the next call to MathJax.hub.Typeset() will re-display it.
Returns: | null |
---|
Returns a reference to the original <script> DOM element associated to this element jax.
Returns: | the <script> element |
---|
Output jax may add new methods to the base element jax class to perform exporting to other formats. For example, a MathML output jax could add toMathML(), or an accessibility output jax could add toAudible(). These could be made available via the MathJax contextual menu.