1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview Interface of ChromeVox's bridge to MathJax.
10 goog.provide('cvox.MathJaxInterface');
16 cvox.MathJaxInterface = function() { };
20 * True if MathJax is injected in a page.
21 * @param {function(boolean)} callback A function with the active status as
24 cvox.MathJaxInterface.prototype.isMathjaxActive = function(callback) { };
28 * Get MathML for all MathJax nodes that already exist by applying the callback
29 * to every single MathJax node.
30 * @param {function(Node, string)} callback A function taking a node and an id
33 cvox.MathJaxInterface.prototype.getAllJax = function(callback) { };
37 * Registers a persistent callback function to be executed by Mathjax on the
39 * @param {function(Node, string)} callback A function taking a node and an id
41 * @param {string} signal The Mathjax signal to fire the callback.
43 cvox.MathJaxInterface.prototype.registerSignal = function(callback, signal) { };
47 * Injects some minimalistic MathJax script into the page to translate LaTeX
50 cvox.MathJaxInterface.prototype.injectScripts = function() { };
54 * Loads configurations for MediaWiki pages (e.g., Wikipedia).
56 cvox.MathJaxInterface.prototype.configMediaWiki = function() { };
60 * Get MathML representation of images with tex or latex class if it has an
62 * @param {function(Node, string)} callback A function taking a MathML node and
64 * @param {Node} texNode Node with img tag and tex or latex class.
66 cvox.MathJaxInterface.prototype.getTex = function(callback, texNode) { };
70 * Get MathML representation of images that have asciiMath in alt text.
71 * @param {function(Node, string)} callback A function taking a MathML node and
73 * @param {Node} asciiMathNode Node with img tag and class of numberedequation,
74 * inlineformula, or displayformula.
76 cvox.MathJaxInterface.prototype.getAsciiMath = function(
77 callback, asciiMathNode) { };