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