google-closure-compiler 20250412.0.0-nightly → 20250413.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -30
- package/cli.js +3 -4
- package/externs/browser/decorators.js +276 -0
- package/externs/browser/deprecated.js +58 -0
- package/externs/browser/es6_proxy.js +143 -0
- package/externs/browser/fetchapi.js +449 -0
- package/externs/browser/fido.js +94 -0
- package/externs/browser/flash.js +226 -0
- package/externs/browser/gecko_css.js +126 -0
- package/externs/browser/gecko_dom.js +479 -0
- package/externs/browser/gecko_event.js +86 -0
- package/externs/browser/gecko_xml.js +73 -0
- package/externs/browser/google_legacy.js +31 -0
- package/externs/browser/html5.js +6647 -0
- package/externs/browser/ie_css.js +270 -0
- package/externs/browser/ie_dom.js +1232 -0
- package/externs/browser/ie_event.js +310 -0
- package/externs/browser/ie_vml.js +77 -0
- package/externs/browser/intersection_observer.js +178 -0
- package/externs/browser/intl.js +602 -0
- package/externs/browser/iphone.js +204 -0
- package/externs/browser/mediakeys.js +305 -0
- package/externs/browser/mediasource.js +155 -0
- package/externs/browser/nonstandard_anim_timing.js +97 -0
- package/externs/browser/nonstandard_audio.js +82 -0
- package/externs/browser/nonstandard_console.js +75 -0
- package/externs/browser/nonstandard_fileapi.js +1066 -0
- package/externs/browser/nonstandard_indexeddb.js +78 -0
- package/externs/browser/nonstandard_navigation_timing.js +38 -0
- package/externs/browser/nonstandard_selection.js +80 -0
- package/externs/browser/page_visibility.js +28 -0
- package/externs/browser/streamsapi.js +593 -0
- package/externs/browser/svg.js +10016 -0
- package/externs/browser/url.js +202 -0
- package/externs/browser/v8.js +134 -0
- package/externs/browser/w3c_abort.js +89 -0
- package/externs/browser/w3c_anim_timing.js +49 -0
- package/externs/browser/w3c_aria_mixin.js +286 -0
- package/externs/browser/w3c_audio.js +1660 -0
- package/externs/browser/w3c_batterystatus.js +85 -0
- package/externs/browser/w3c_clipboard.js +74 -0
- package/externs/browser/w3c_clipboardevent.js +47 -0
- package/externs/browser/w3c_composition_event.js +93 -0
- package/externs/browser/w3c_css.js +3790 -0
- package/externs/browser/w3c_css3d.js +199 -0
- package/externs/browser/w3c_device_sensor_event.js +122 -0
- package/externs/browser/w3c_dom1.js +1160 -0
- package/externs/browser/w3c_dom2.js +3151 -0
- package/externs/browser/w3c_dom3.js +555 -0
- package/externs/browser/w3c_dom4.js +289 -0
- package/externs/browser/w3c_elementtraversal.js +116 -0
- package/externs/browser/w3c_event.js +607 -0
- package/externs/browser/w3c_event3.js +77 -0
- package/externs/browser/w3c_eventsource.js +110 -0
- package/externs/browser/w3c_fileapi.js +302 -0
- package/externs/browser/w3c_gamepad.js +113 -0
- package/externs/browser/w3c_geolocation.js +130 -0
- package/externs/browser/w3c_geometry1.js +899 -0
- package/externs/browser/w3c_indexeddb.js +771 -0
- package/externs/browser/w3c_keyboardlock.js +47 -0
- package/externs/browser/w3c_mediacapabilities.js +206 -0
- package/externs/browser/w3c_midi.js +301 -0
- package/externs/browser/w3c_navigation.js +72 -0
- package/externs/browser/w3c_navigation_timing.js +437 -0
- package/externs/browser/w3c_netinfo.js +85 -0
- package/externs/browser/w3c_payment_request.js +401 -0
- package/externs/browser/w3c_permissions.js +112 -0
- package/externs/browser/w3c_permissions_policy.js +78 -0
- package/externs/browser/w3c_pointer_events.js +163 -0
- package/externs/browser/w3c_pointerlock.js +63 -0
- package/externs/browser/w3c_range.js +284 -0
- package/externs/browser/w3c_referrer_policy.js +36 -0
- package/externs/browser/w3c_requestidlecallback.js +76 -0
- package/externs/browser/w3c_rtc.js +3882 -0
- package/externs/browser/w3c_screen_orientation.js +53 -0
- package/externs/browser/w3c_screen_wake_lock.js +58 -0
- package/externs/browser/w3c_selection.js +209 -0
- package/externs/browser/w3c_selectors.js +113 -0
- package/externs/browser/w3c_serviceworker.js +739 -0
- package/externs/browser/w3c_speech.js +426 -0
- package/externs/browser/w3c_touch_event.js +296 -0
- package/externs/browser/w3c_trusted_types.js +142 -0
- package/externs/browser/w3c_vibration.js +38 -0
- package/externs/browser/w3c_webcodecs.js +1473 -0
- package/externs/browser/w3c_webcrypto.js +839 -0
- package/externs/browser/w3c_worklets.js +54 -0
- package/externs/browser/w3c_xml.js +533 -0
- package/externs/browser/web_animations.js +452 -0
- package/externs/browser/web_app_manifest.js +50 -0
- package/externs/browser/webassembly.js +223 -0
- package/externs/browser/webgl.js +3409 -0
- package/externs/browser/webgl2.js +2727 -0
- package/externs/browser/webgl2_compute.js +1609 -0
- package/externs/browser/webkit_css.js +456 -0
- package/externs/browser/webkit_dom.js +118 -0
- package/externs/browser/webkit_event.js +46 -0
- package/externs/browser/webkit_notifications.js +258 -0
- package/externs/browser/webkit_usercontent.js +55 -0
- package/externs/browser/weblocksapi.js +125 -0
- package/externs/browser/webstorage.js +171 -0
- package/externs/browser/whatwg_bitmap_context.js +37 -0
- package/externs/browser/whatwg_console.js +152 -0
- package/externs/browser/whatwg_encoding.js +99 -0
- package/externs/browser/whatwg_file_system.js +296 -0
- package/externs/browser/wicg_attribution_reporting.js +42 -0
- package/externs/browser/wicg_compression_stream.js +60 -0
- package/externs/browser/wicg_constructable_stylesheets.js +60 -0
- package/externs/browser/wicg_entries.js +169 -0
- package/externs/browser/wicg_file_handling.js +41 -0
- package/externs/browser/wicg_file_system_access.js +191 -0
- package/externs/browser/wicg_floc.js +41 -0
- package/externs/browser/wicg_ink.js +89 -0
- package/externs/browser/wicg_resizeobserver.js +100 -0
- package/externs/browser/wicg_scheduler.js +62 -0
- package/externs/browser/wicg_trust_token.js +89 -0
- package/externs/browser/wicg_uach.js +100 -0
- package/externs/browser/window.js +190 -0
- package/externs/es3.js +2716 -0
- package/externs/es5.js +284 -0
- package/externs/es6.js +2554 -0
- package/externs/es6_collections.js +323 -0
- package/index.js +13 -16
- package/lib/grunt/index.js +71 -92
- package/lib/grunt/vinyl-stream.js +12 -18
- package/lib/gulp/concat-to-json.js +30 -18
- package/lib/gulp/index.js +174 -181
- package/lib/gulp/json-to-vinyl.js +8 -8
- package/lib/node/{closure-compiler.js → index.js} +27 -51
- package/lib/utils.js +16 -14
- package/package.json +19 -16
- package/lib/logger.js +0 -89
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2011 The Closure Compiler Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview Definitions for W3C's Speech Input 2010 draft API and the
|
|
19
|
+
* 2012 Web Speech draft API (in progress).
|
|
20
|
+
* 2010 Speech Input API:
|
|
21
|
+
* http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html
|
|
22
|
+
* 2012 Web Speech API:
|
|
23
|
+
* http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
|
|
24
|
+
* This file contains only those functions/properties that are actively
|
|
25
|
+
* used in the Voice Search experiment. Because the draft is under discussion
|
|
26
|
+
* and constantly evolving, this file does not attempt to stay in sync with it.
|
|
27
|
+
*
|
|
28
|
+
* @externs
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
// W3C Speech Input API implemented in Chrome M12
|
|
32
|
+
/**
|
|
33
|
+
* @constructor
|
|
34
|
+
* @extends {UIEvent}
|
|
35
|
+
*/
|
|
36
|
+
function SpeechInputEvent() {}
|
|
37
|
+
|
|
38
|
+
/** @type {SpeechInputResultList} */
|
|
39
|
+
SpeechInputEvent.prototype.results;
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @constructor
|
|
44
|
+
*/
|
|
45
|
+
function SpeechInputResultList() {}
|
|
46
|
+
|
|
47
|
+
/** @type {number} */
|
|
48
|
+
SpeechInputResultList.prototype.length;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @constructor
|
|
53
|
+
*/
|
|
54
|
+
function SpeechInputResult() {}
|
|
55
|
+
|
|
56
|
+
/** @type {string} */
|
|
57
|
+
SpeechInputResult.prototype.utterance;
|
|
58
|
+
|
|
59
|
+
/** @type {number} */
|
|
60
|
+
SpeechInputResult.prototype.confidence;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
// HTMLInputElement
|
|
64
|
+
/** @type {boolean} */
|
|
65
|
+
HTMLInputElement.prototype.webkitspeech;
|
|
66
|
+
|
|
67
|
+
/** @type {?function (Event)} */
|
|
68
|
+
HTMLInputElement.prototype.onwebkitspeechchange;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// W3C Web Speech API implemented in Chrome M23
|
|
73
|
+
/**
|
|
74
|
+
* @constructor
|
|
75
|
+
* @implements {EventTarget}
|
|
76
|
+
*/
|
|
77
|
+
function SpeechRecognition() {}
|
|
78
|
+
|
|
79
|
+
/** @override */
|
|
80
|
+
SpeechRecognition.prototype.addEventListener = function(
|
|
81
|
+
type, listener, opt_options) {};
|
|
82
|
+
|
|
83
|
+
/** @override */
|
|
84
|
+
SpeechRecognition.prototype.removeEventListener = function(
|
|
85
|
+
type, listener, opt_options) {};
|
|
86
|
+
|
|
87
|
+
/** @override */
|
|
88
|
+
SpeechRecognition.prototype.dispatchEvent = function(evt) {};
|
|
89
|
+
|
|
90
|
+
/** @type {SpeechGrammarList} */
|
|
91
|
+
SpeechRecognition.prototype.grammars;
|
|
92
|
+
|
|
93
|
+
/** @type {string} */
|
|
94
|
+
SpeechRecognition.prototype.lang;
|
|
95
|
+
|
|
96
|
+
/** @type {boolean} */
|
|
97
|
+
SpeechRecognition.prototype.continuous;
|
|
98
|
+
|
|
99
|
+
/** @type {boolean} */
|
|
100
|
+
SpeechRecognition.prototype.interimResults;
|
|
101
|
+
|
|
102
|
+
/** @type {number} */
|
|
103
|
+
SpeechRecognition.prototype.maxAlternatives;
|
|
104
|
+
|
|
105
|
+
/** @type {string} */
|
|
106
|
+
SpeechRecognition.prototype.serviceURI;
|
|
107
|
+
|
|
108
|
+
/** @type {function()} */
|
|
109
|
+
SpeechRecognition.prototype.start;
|
|
110
|
+
|
|
111
|
+
/** @type {function()} */
|
|
112
|
+
SpeechRecognition.prototype.stop;
|
|
113
|
+
|
|
114
|
+
/** @type {function()} */
|
|
115
|
+
SpeechRecognition.prototype.abort;
|
|
116
|
+
|
|
117
|
+
/** @type {?function(!Event)} */
|
|
118
|
+
SpeechRecognition.prototype.onaudiostart;
|
|
119
|
+
|
|
120
|
+
/** @type {?function(!Event)} */
|
|
121
|
+
SpeechRecognition.prototype.onsoundstart;
|
|
122
|
+
|
|
123
|
+
/** @type {?function(!Event)} */
|
|
124
|
+
SpeechRecognition.prototype.onspeechstart;
|
|
125
|
+
|
|
126
|
+
/** @type {?function(!Event)} */
|
|
127
|
+
SpeechRecognition.prototype.onspeechend;
|
|
128
|
+
|
|
129
|
+
/** @type {?function(!Event)} */
|
|
130
|
+
SpeechRecognition.prototype.onsoundend;
|
|
131
|
+
|
|
132
|
+
/** @type {?function(!Event)} */
|
|
133
|
+
SpeechRecognition.prototype.onaudioend;
|
|
134
|
+
|
|
135
|
+
/** @type {?function(!SpeechRecognitionEvent)} */
|
|
136
|
+
SpeechRecognition.prototype.onresult;
|
|
137
|
+
|
|
138
|
+
/** @type {?function(!SpeechRecognitionEvent)} */
|
|
139
|
+
SpeechRecognition.prototype.onnomatch;
|
|
140
|
+
|
|
141
|
+
/** @type {?function(!SpeechRecognitionError)} */
|
|
142
|
+
SpeechRecognition.prototype.onerror;
|
|
143
|
+
|
|
144
|
+
/** @type {?function(!Event)} */
|
|
145
|
+
SpeechRecognition.prototype.onstart;
|
|
146
|
+
|
|
147
|
+
/** @type {?function(!Event)} */
|
|
148
|
+
SpeechRecognition.prototype.onend;
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @constructor
|
|
153
|
+
* @extends {Event}
|
|
154
|
+
*/
|
|
155
|
+
function SpeechRecognitionError() {}
|
|
156
|
+
|
|
157
|
+
/** @type {string} */
|
|
158
|
+
SpeechRecognitionError.prototype.error;
|
|
159
|
+
|
|
160
|
+
/** @type {string} */
|
|
161
|
+
SpeechRecognitionError.prototype.message;
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @constructor
|
|
166
|
+
*/
|
|
167
|
+
function SpeechRecognitionAlternative() {}
|
|
168
|
+
|
|
169
|
+
/** @type {string} */
|
|
170
|
+
SpeechRecognitionAlternative.prototype.transcript;
|
|
171
|
+
|
|
172
|
+
/** @type {number} */
|
|
173
|
+
SpeechRecognitionAlternative.prototype.confidence;
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @constructor
|
|
178
|
+
*/
|
|
179
|
+
function SpeechRecognitionResult() {}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @type {number}
|
|
183
|
+
*/
|
|
184
|
+
SpeechRecognitionResult.prototype.length;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @type {function(number): SpeechRecognitionAlternative}
|
|
188
|
+
*/
|
|
189
|
+
SpeechRecognitionResult.prototype.item = function(index) {};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @type {boolean}
|
|
193
|
+
*/
|
|
194
|
+
SpeechRecognitionResult.prototype.isFinal;
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @constructor
|
|
199
|
+
*/
|
|
200
|
+
function SpeechRecognitionResultList() {}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @type {number}
|
|
204
|
+
*/
|
|
205
|
+
SpeechRecognitionResultList.prototype.length;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @type {function(number): SpeechRecognitionResult}
|
|
209
|
+
*/
|
|
210
|
+
SpeechRecognitionResultList.prototype.item = function(index) {};
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @constructor
|
|
215
|
+
* @extends {Event}
|
|
216
|
+
*/
|
|
217
|
+
function SpeechRecognitionEvent() {}
|
|
218
|
+
|
|
219
|
+
/** @type {number} */
|
|
220
|
+
SpeechRecognitionEvent.prototype.resultIndex;
|
|
221
|
+
|
|
222
|
+
/** @type {SpeechRecognitionResultList} */
|
|
223
|
+
SpeechRecognitionEvent.prototype.results;
|
|
224
|
+
|
|
225
|
+
/** @type {*} */
|
|
226
|
+
SpeechRecognitionEvent.prototype.interpretation;
|
|
227
|
+
|
|
228
|
+
/** @type {Document} */
|
|
229
|
+
SpeechRecognitionEvent.prototype.emma;
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @constructor
|
|
234
|
+
*/
|
|
235
|
+
function SpeechGrammar() {}
|
|
236
|
+
|
|
237
|
+
/** @type {string} */
|
|
238
|
+
SpeechGrammar.prototype.src;
|
|
239
|
+
|
|
240
|
+
/** @type {number} */
|
|
241
|
+
SpeechGrammar.prototype.weight;
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @constructor
|
|
246
|
+
*/
|
|
247
|
+
function SpeechGrammarList() {}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @type {number}
|
|
251
|
+
*/
|
|
252
|
+
SpeechGrammarList.prototype.length;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @type {function(number): SpeechGrammar}
|
|
256
|
+
*/
|
|
257
|
+
SpeechGrammarList.prototype.item = function(index) {};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @type {function(string, number)}
|
|
261
|
+
*/
|
|
262
|
+
SpeechGrammarList.prototype.addFromUri = function(src, weight) {};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @type {function(string, number)}
|
|
266
|
+
*/
|
|
267
|
+
SpeechGrammarList.prototype.addFromURI = function(src, weight) {};
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @type {function(string, number)}
|
|
271
|
+
*/
|
|
272
|
+
SpeechGrammarList.prototype.addFromString = function(str, weight) {};
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
// Webkit implementations of Web Speech API
|
|
276
|
+
/**
|
|
277
|
+
* @constructor
|
|
278
|
+
* @extends {SpeechGrammarList}
|
|
279
|
+
*/
|
|
280
|
+
function webkitSpeechGrammarList() {}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @constructor
|
|
285
|
+
* @extends {SpeechGrammar}
|
|
286
|
+
*/
|
|
287
|
+
function webkitSpeechGrammar() {}
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @constructor
|
|
292
|
+
* @extends {SpeechRecognitionEvent}
|
|
293
|
+
*/
|
|
294
|
+
function webkitSpeechRecognitionEvent() {}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @constructor
|
|
299
|
+
* @extends {SpeechRecognitionError}
|
|
300
|
+
*/
|
|
301
|
+
function webkitSpeechRecognitionError() {}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* @constructor
|
|
306
|
+
* @extends {SpeechRecognition}
|
|
307
|
+
*/
|
|
308
|
+
function webkitSpeechRecognition() {}
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
// W3C Web Speech Synthesis API is implemented in Chrome M33
|
|
313
|
+
/**
|
|
314
|
+
* @type {SpeechSynthesis}
|
|
315
|
+
* @see https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#tts-section
|
|
316
|
+
*/
|
|
317
|
+
var speechSynthesis;
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @constructor
|
|
322
|
+
* @param {string} text
|
|
323
|
+
*/
|
|
324
|
+
function SpeechSynthesisUtterance(text) {}
|
|
325
|
+
|
|
326
|
+
/** @type {string} */
|
|
327
|
+
SpeechSynthesisUtterance.prototype.text;
|
|
328
|
+
|
|
329
|
+
/** @type {string} */
|
|
330
|
+
SpeechSynthesisUtterance.prototype.lang;
|
|
331
|
+
|
|
332
|
+
/** @type {number} */
|
|
333
|
+
SpeechSynthesisUtterance.prototype.pitch;
|
|
334
|
+
|
|
335
|
+
/** @type {number} */
|
|
336
|
+
SpeechSynthesisUtterance.prototype.rate;
|
|
337
|
+
|
|
338
|
+
/** @type {SpeechSynthesisVoice} */
|
|
339
|
+
SpeechSynthesisUtterance.prototype.voice;
|
|
340
|
+
|
|
341
|
+
/** @type {number} */
|
|
342
|
+
SpeechSynthesisUtterance.prototype.volume;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @param {Event} event
|
|
346
|
+
*/
|
|
347
|
+
SpeechSynthesisUtterance.prototype.onstart = function(event) {};
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @param {Event} event
|
|
351
|
+
*/
|
|
352
|
+
SpeechSynthesisUtterance.prototype.onend = function(event) {};
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @param {Event} event
|
|
356
|
+
*/
|
|
357
|
+
SpeechSynthesisUtterance.prototype.onerror = function(event) {};
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* @constructor
|
|
361
|
+
*/
|
|
362
|
+
function SpeechSynthesisVoice() {}
|
|
363
|
+
|
|
364
|
+
/** @type {string} */
|
|
365
|
+
SpeechSynthesisVoice.prototype.voiceURI;
|
|
366
|
+
|
|
367
|
+
/** @type {string} */
|
|
368
|
+
SpeechSynthesisVoice.prototype.name;
|
|
369
|
+
|
|
370
|
+
/** @type {string} */
|
|
371
|
+
SpeechSynthesisVoice.prototype.lang;
|
|
372
|
+
|
|
373
|
+
/** @type {boolean} */
|
|
374
|
+
SpeechSynthesisVoice.prototype.localService;
|
|
375
|
+
|
|
376
|
+
/** @type {boolean} */
|
|
377
|
+
SpeechSynthesisVoice.prototype.default;
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @constructor
|
|
382
|
+
* @extends {Array<!SpeechSynthesisVoice>}
|
|
383
|
+
*/
|
|
384
|
+
function SpeechSynthesisVoiceList() {}
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @interface
|
|
389
|
+
* @extends {EventTarget}
|
|
390
|
+
*/
|
|
391
|
+
function SpeechSynthesis() {}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @param {SpeechSynthesisUtterance} utterance
|
|
395
|
+
* @return {undefined}
|
|
396
|
+
*/
|
|
397
|
+
SpeechSynthesis.prototype.speak = function(utterance) {};
|
|
398
|
+
|
|
399
|
+
/** @type {function()} */
|
|
400
|
+
SpeechSynthesis.prototype.cancel;
|
|
401
|
+
|
|
402
|
+
/** @type {function()} */
|
|
403
|
+
SpeechSynthesis.prototype.pause;
|
|
404
|
+
|
|
405
|
+
/** @type {function()} */
|
|
406
|
+
SpeechSynthesis.prototype.resume;
|
|
407
|
+
|
|
408
|
+
/** @type {boolean} */
|
|
409
|
+
SpeechSynthesis.prototype.paused;
|
|
410
|
+
|
|
411
|
+
/** @type {boolean} */
|
|
412
|
+
SpeechSynthesis.prototype.pending;
|
|
413
|
+
|
|
414
|
+
/** @type {boolean} */
|
|
415
|
+
SpeechSynthesis.prototype.speaking;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* @return {SpeechSynthesisVoiceList}
|
|
419
|
+
*/
|
|
420
|
+
SpeechSynthesis.prototype.getVoices = function() {};
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @param {Event} event
|
|
424
|
+
* @see https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi-errata.html
|
|
425
|
+
*/
|
|
426
|
+
SpeechSynthesis.prototype.onvoiceschanged = function(event) {};
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2015 The Closure Compiler Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview Definitions for W3C's Touch Events specification.
|
|
19
|
+
* @see http://www.w3.org/TR/touch-events/
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {{
|
|
25
|
+
* identifier: number,
|
|
26
|
+
* target: !EventTarget,
|
|
27
|
+
* clientX: (number|undefined),
|
|
28
|
+
* clientY: (number|undefined),
|
|
29
|
+
* screenX: (number|undefined),
|
|
30
|
+
* screenY: (number|undefined),
|
|
31
|
+
* pageX: (number|undefined),
|
|
32
|
+
* pageY: (number|undefined),
|
|
33
|
+
* radiusX: (number|undefined),
|
|
34
|
+
* radiusY: (number|undefined),
|
|
35
|
+
* rotationAngle: (number|undefined),
|
|
36
|
+
* force: (number|undefined),
|
|
37
|
+
* altitudeAngle: (number|undefined),
|
|
38
|
+
* azimuthAngle: (number|undefined),
|
|
39
|
+
* touchType: (string|undefined)
|
|
40
|
+
* }}
|
|
41
|
+
*/
|
|
42
|
+
var TouchInitDict;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The Touch class represents a single touch on the surface. A touch is the
|
|
46
|
+
* presence or movement of a finger that is part of a unique multi-touch
|
|
47
|
+
* sequence.
|
|
48
|
+
* @see http://www.w3.org/TR/touch-events/#touch-interface
|
|
49
|
+
* @param {!TouchInitDict} touchInitDict
|
|
50
|
+
* @constructor
|
|
51
|
+
*/
|
|
52
|
+
function Touch(touchInitDict) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The x-coordinate of the touch's location relative to the window's viewport.
|
|
56
|
+
* @type {number}
|
|
57
|
+
*/
|
|
58
|
+
Touch.prototype.clientX;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The y-coordinate of the touch's location relative to the window's viewport.
|
|
62
|
+
* @type {number}
|
|
63
|
+
*/
|
|
64
|
+
Touch.prototype.clientY;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier for this touch object.
|
|
68
|
+
* @type {number}
|
|
69
|
+
*/
|
|
70
|
+
Touch.prototype.identifier;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The x-coordinate of the touch's location in page coordinates.
|
|
74
|
+
* @type {number}
|
|
75
|
+
*/
|
|
76
|
+
Touch.prototype.pageX;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The y-coordinate of the touch's location in page coordinates.
|
|
80
|
+
* @type {number}
|
|
81
|
+
*/
|
|
82
|
+
Touch.prototype.pageY;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The x-coordinate of the touch's location in screen coordinates.
|
|
86
|
+
* @type {number}
|
|
87
|
+
*/
|
|
88
|
+
Touch.prototype.screenX;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The y-coordinate of the touch's location in screen coordinates.
|
|
92
|
+
* @type {number}
|
|
93
|
+
*/
|
|
94
|
+
Touch.prototype.screenY;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The target of this touch.
|
|
98
|
+
* @type {EventTarget}
|
|
99
|
+
*/
|
|
100
|
+
Touch.prototype.target;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @type {number}
|
|
104
|
+
* @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-force
|
|
105
|
+
*/
|
|
106
|
+
Touch.prototype.force;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @type {number}
|
|
110
|
+
* @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-radiusX
|
|
111
|
+
*/
|
|
112
|
+
Touch.prototype.radiusX;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @type {number}
|
|
116
|
+
* @see http://www.w3.org/TR/touch-events-extensions/#widl-Touch-radiusY
|
|
117
|
+
*/
|
|
118
|
+
Touch.prototype.radiusY;
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @type {number}
|
|
123
|
+
* @see http://www.w3.org/TR/2011/WD-touch-events-20110505/#widl-Touch-rotationAngle
|
|
124
|
+
*/
|
|
125
|
+
Touch.prototype.rotationAngle;
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Creates a new Touch object.
|
|
130
|
+
* @see http://www.w3.org/TR/touch-events/#widl-Document-createTouch-Touch-WindowProxy-view-EventTarget-target-long-identifier-long-pageX-long-pageY-long-screenX-long-screenY
|
|
131
|
+
* @param {Window} view
|
|
132
|
+
* @param {EventTarget} target
|
|
133
|
+
* @param {number} identifier
|
|
134
|
+
* @param {number} pageX
|
|
135
|
+
* @param {number} pageY
|
|
136
|
+
* @param {number} screenX
|
|
137
|
+
* @param {number} screenY
|
|
138
|
+
* @return {Touch}
|
|
139
|
+
*/
|
|
140
|
+
Document.prototype.createTouch = function(view, target, identifier, pageX,
|
|
141
|
+
pageY, screenX, screenY) {};
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The TouchList class is used to represent a collection of Touch objects.
|
|
146
|
+
* @see http://www.w3.org/TR/touch-events/#touchlist-interface
|
|
147
|
+
* @constructor
|
|
148
|
+
* @implements {IArrayLike<!Touch>}
|
|
149
|
+
*/
|
|
150
|
+
function TouchList() {}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The number of Touch objects in this TouchList object.
|
|
154
|
+
* @type {number}
|
|
155
|
+
*/
|
|
156
|
+
TouchList.prototype.length;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Returns the Touch object at the given index.
|
|
160
|
+
* @param {number} index
|
|
161
|
+
* @return {?Touch}
|
|
162
|
+
*/
|
|
163
|
+
TouchList.prototype.item = function(index) {};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @param {number} identifier
|
|
167
|
+
* @return {?Touch}
|
|
168
|
+
* @see http://www.w3.org/TR/touch-events-extensions/#widl-TouchList-identifiedTouch-Touch-long-identifier
|
|
169
|
+
*/
|
|
170
|
+
TouchList.prototype.identifiedTouch = function(identifier) {};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Creates a new TouchList object.
|
|
174
|
+
* @see http://www.w3.org/TR/touch-events/#widl-Document-createTouchList-TouchList-Touch-touches
|
|
175
|
+
* @param {Array<?Touch>} touches
|
|
176
|
+
* @return {TouchList}
|
|
177
|
+
*/
|
|
178
|
+
Document.prototype.createTouchList = function(touches) {};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @record
|
|
182
|
+
* @extends {UIEventInit}
|
|
183
|
+
*/
|
|
184
|
+
function TouchEventInit() {}
|
|
185
|
+
|
|
186
|
+
/** @type {undefined|?EventTarget} */
|
|
187
|
+
TouchEventInit.prototype.relatedTarget;
|
|
188
|
+
|
|
189
|
+
/** @type {undefined|!Array<?Touch>} */
|
|
190
|
+
TouchEventInit.prototype.touches;
|
|
191
|
+
|
|
192
|
+
/** @type {undefined|!Array<?Touch>} */
|
|
193
|
+
TouchEventInit.prototype.targetTouches;
|
|
194
|
+
|
|
195
|
+
/** @type {undefined|!Array<?Touch>} */
|
|
196
|
+
TouchEventInit.prototype.changedTouches;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The TouchEvent class encapsulates information about a touch event.
|
|
200
|
+
*
|
|
201
|
+
* <p>The system continually sends TouchEvent objects to an application as
|
|
202
|
+
* fingers touch and move across a surface. A touch event provides a snapshot of
|
|
203
|
+
* all touches during a multi-touch sequence, most importantly the touches that
|
|
204
|
+
* are new or have changed for a particular target. A multi-touch sequence
|
|
205
|
+
* begins when a finger first touches the surface. Other fingers may
|
|
206
|
+
* subsequently touch the surface, and all fingers may move across the surface.
|
|
207
|
+
* The sequence ends when the last of these fingers is lifted from the surface.
|
|
208
|
+
* An application receives touch event objects during each phase of any touch.
|
|
209
|
+
* </p>
|
|
210
|
+
*
|
|
211
|
+
* <p>The different types of TouchEvent objects that can occur are:
|
|
212
|
+
* <ul>
|
|
213
|
+
* <li>touchstart - Sent when a finger for a given event touches the surface.
|
|
214
|
+
* <li>touchmove - Sent when a given event moves on the surface.
|
|
215
|
+
* <li>touchend - Sent when a given event lifts from the surface.
|
|
216
|
+
* <li>touchcancel - Sent when the system cancels tracking for the touch.
|
|
217
|
+
* </ul>
|
|
218
|
+
* TouchEvent objects are combined together to form high-level GestureEvent
|
|
219
|
+
* objects that are also sent during a multi-touch sequence.</p>
|
|
220
|
+
*
|
|
221
|
+
* @see http://www.w3.org/TR/touch-events/#touchevent-interface
|
|
222
|
+
* @param {string} type
|
|
223
|
+
* @param {!TouchEventInit=} opt_eventInitDict
|
|
224
|
+
* @extends {UIEvent}
|
|
225
|
+
* @constructor
|
|
226
|
+
*/
|
|
227
|
+
function TouchEvent(type, opt_eventInitDict) {}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* A collection of Touch objects representing all touches associated with this
|
|
231
|
+
* target.
|
|
232
|
+
* @type {TouchList}
|
|
233
|
+
*/
|
|
234
|
+
TouchEvent.prototype.touches;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* A collection of Touch objects representing all touches associated with this
|
|
238
|
+
* target.
|
|
239
|
+
* @type {TouchList}
|
|
240
|
+
*/
|
|
241
|
+
TouchEvent.prototype.targetTouches;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* A collection of Touch objects representing all touches that changed in this event.
|
|
245
|
+
* @type {TouchList}
|
|
246
|
+
*/
|
|
247
|
+
TouchEvent.prototype.changedTouches;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @type {boolean}
|
|
251
|
+
*/
|
|
252
|
+
TouchEvent.prototype.altKey;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @type {boolean}
|
|
256
|
+
*/
|
|
257
|
+
TouchEvent.prototype.metaKey;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @type {boolean}
|
|
261
|
+
*/
|
|
262
|
+
TouchEvent.prototype.ctrlKey;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @type {boolean}
|
|
266
|
+
*/
|
|
267
|
+
TouchEvent.prototype.shiftKey;
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Specifies the JavaScript method to invoke when the system cancels tracking
|
|
272
|
+
* for the touch.
|
|
273
|
+
* @type {?function(!TouchEvent)}
|
|
274
|
+
*/
|
|
275
|
+
Element.prototype.ontouchcancel;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Specifies the JavaScript method to invoke when a given event lifts from the
|
|
279
|
+
* surface.
|
|
280
|
+
* @type {?function(!TouchEvent)}
|
|
281
|
+
*/
|
|
282
|
+
Element.prototype.ontouchend;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Specifies the JavaScript method to invoke when a finger for a given event
|
|
286
|
+
* moves on the surface.
|
|
287
|
+
* @type {?function(!TouchEvent)}
|
|
288
|
+
*/
|
|
289
|
+
Element.prototype.ontouchmove;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Specifies the JavaScript method to invoke when a finger for a given event
|
|
293
|
+
* touches the surface.
|
|
294
|
+
* @type {?function(!TouchEvent)}
|
|
295
|
+
*/
|
|
296
|
+
Element.prototype.ontouchstart;
|