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. 4 5Node.prototype.role; 6 7/** @type {Function} */ 8Element.prototype.detachEvent; 9 10/** 11 * @type {boolean} 12 */ 13document.webkitHidden; 14 15/** 16 * External functions for MathJax bridge. 17 * @typedef {Object} 18 */ 19function MathJax() {} 20 21/** 22 * @type {Function} 23 */ 24MathJax.Callback; 25 26/** 27 * @param {Array.<*>} args 28 * @param {string} err 29 */ 30MathJax.Callback.After = function(args, err) { }; 31 32 33/** 34 * @typedef {{root: MathJax.RootElement, 35 * inputID: string}} 36 */ 37MathJax.Jax; 38 39 40/** 41 * @typedef {{inputID: string, 42 * spanID: number, 43 * data: Array.<Object>, 44 * id: string, 45 * texClass: string}} 46 */ 47MathJax.RootElement; 48MathJax.RootElement.prototype; 49 50/** 51 * @param {string} name 52 */ 53MathJax.RootElement.prototype.toMathML = function(name) { }; 54 55/** 56 */ 57MathJax.RootElement.prototype.toMathMLattributes = function() { }; 58 59 60/** 61 * @typedef {Object} 62 */ 63MathJax.Hub; 64 65/** 66 * @param {string} id 67 */ 68MathJax.Hub.getJaxFor = function(id) { }; 69 70/** 71 */ 72MathJax.Hub.getAllJax = function() { }; 73 74/** 75 * @type {{PreProcessor: Function, 76 * MessageHook: function(string, function(Array.<string>)): 77 * function(Array.<string>), 78 * StartupHook: function(string, function(Array.<string>)): 79 * function(Array.<string>), 80 * LoadHook: function(string, function(Array.<string>)): 81 * function(Array.<string>)}} 82 */ 83MathJax.Hub.Register; 84 85 86/** 87 * @typedef {Object} 88 */ 89MathJax.OutputJax; 90 91 92/** 93 * @typedef {Object} 94 */ 95MathJax.ElementJax; 96MathJax.ElementJax.prototype.mml; 97 98/** 99 * @param {?string} mml MathML expression. 100 */ 101MathJax.ElementJax.mml = function(mml) { }; 102 103 104/** 105 * @type {MathJax.RootElement} 106 */ 107MathJax.ElementJax.mml.mbase; 108MathJax.ElementJax.mml.mbase.prototype; 109 110 111/** 112 * @type {MathJax.RootElement} 113 */ 114MathJax.ElementJax.mml.mfenced; 115MathJax.ElementJax.mml.mfenced.prototype; 116 117 118/** 119 * @param {string} err 120 */ 121MathJax.ElementJax.mml.merror = function(err) { }; 122 123 124/** 125 * @type {{DOUBLESTRUCK: string, 126 * NORMAL: string}} 127 */ 128MathJax.ElementJax.mml.VARIANT; 129 130 131/** 132 * @type {{OP: number}} 133 */ 134MathJax.ElementJax.mml.TEXCLASS; 135 136 137/** 138 * @typedef {Object} 139 */ 140MathJax.InputJax; 141 142 143/** 144 * @typedef {Object} 145 */ 146MathJax.HTML; 147 148 149/** 150 * Creates an HTML element from a node tag, an object with attributes and an 151 * array of text content. 152 * @param {string} tag 153 * @param {Object.<string, string>} attribs 154 * @param {Array.<string>} text 155 */ 156MathJax.HTML.Element = function(tag, attribs, text) { }; 157 158 159/** 160 * @type {{Parse: function(string): MathJax.ElementJax, 161 * postfilterHooks: {Execute: 162 * function({math: MathJax.RootElement, display: boolean, script: Element})}, 163 * prefilterHooks: {Execute: 164 * function({math: string, display: boolean, script: Element})}, 165 * Definitions: Object}} 166 */ 167MathJax.InputJax.TeX; 168 169 170/** 171 * MediaWiki object. 172 * @typedef {Object} 173 */ 174function mediaWiki() {} 175