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,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2012 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 EventSource API.
|
|
19
|
+
* @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** @record */
|
|
25
|
+
function EventSourceInit() {};
|
|
26
|
+
|
|
27
|
+
/** @type {(boolean|undefined)} */
|
|
28
|
+
EventSourceInit.prototype.withCredentials;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @constructor
|
|
32
|
+
* @implements {EventTarget}
|
|
33
|
+
* @param {!URL|string} url
|
|
34
|
+
* @param {EventSourceInit=} opt_eventSourceInitDict
|
|
35
|
+
*/
|
|
36
|
+
function EventSource(url, opt_eventSourceInitDict) {}
|
|
37
|
+
|
|
38
|
+
/** @override */
|
|
39
|
+
EventSource.prototype.addEventListener = function(type, listener, opt_options) {
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @override */
|
|
43
|
+
EventSource.prototype.removeEventListener = function(
|
|
44
|
+
type, listener, opt_options) {};
|
|
45
|
+
|
|
46
|
+
/** @override */
|
|
47
|
+
EventSource.prototype.dispatchEvent = function(evt) {};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @const {string}
|
|
51
|
+
*/
|
|
52
|
+
EventSource.prototype.url;
|
|
53
|
+
|
|
54
|
+
/** @const {boolean} */
|
|
55
|
+
EventSource.prototype.withCredentials;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @const {number}
|
|
59
|
+
*/
|
|
60
|
+
EventSource.prototype.CONNECTING;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @const {number}
|
|
64
|
+
*/
|
|
65
|
+
EventSource.CONNECTING;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @const {number}
|
|
69
|
+
*/
|
|
70
|
+
EventSource.prototype.OPEN;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @const {number}
|
|
74
|
+
*/
|
|
75
|
+
EventSource.OPEN;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @const {number}
|
|
79
|
+
*/
|
|
80
|
+
EventSource.prototype.CLOSED;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @const {number}
|
|
84
|
+
*/
|
|
85
|
+
EventSource.CLOSED;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @const {number}
|
|
89
|
+
*/
|
|
90
|
+
EventSource.prototype.readyState;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @type {?function(!Event): void}
|
|
94
|
+
*/
|
|
95
|
+
EventSource.prototype.onopen = function(e) {};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @type {?function(!MessageEvent<string>): void}
|
|
99
|
+
*/
|
|
100
|
+
EventSource.prototype.onmessage = function(e) {};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @type {?function(!Event): void}
|
|
104
|
+
*/
|
|
105
|
+
EventSource.prototype.onerror = function(e) {};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @return {undefined}
|
|
109
|
+
*/
|
|
110
|
+
EventSource.prototype.close = function() {};
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2010 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
|
+
* @fileoverview Definitions for objects in the File API, File Writer API, and
|
|
18
|
+
* File System API. Details of the API are at:
|
|
19
|
+
* http://www.w3.org/TR/FileAPI/
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** @record */
|
|
25
|
+
function BlobPropertyBag() {};
|
|
26
|
+
|
|
27
|
+
/** @type {(string|undefined)} */
|
|
28
|
+
BlobPropertyBag.prototype.type;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
|
|
32
|
+
* @param {Array<ArrayBuffer|ArrayBufferView|Blob|string>=} opt_blobParts
|
|
33
|
+
* @param {BlobPropertyBag=} opt_options
|
|
34
|
+
* @constructor
|
|
35
|
+
* @nosideeffects
|
|
36
|
+
*/
|
|
37
|
+
function Blob(opt_blobParts, opt_options) {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-size
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
43
|
+
Blob.prototype.size;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-type
|
|
47
|
+
* @type {string}
|
|
48
|
+
*/
|
|
49
|
+
Blob.prototype.type;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-slice
|
|
53
|
+
* @param {number=} start
|
|
54
|
+
* @param {number=} length
|
|
55
|
+
* @param {string=} opt_contentType
|
|
56
|
+
* @return {!Blob}
|
|
57
|
+
* @nosideeffects
|
|
58
|
+
*/
|
|
59
|
+
Blob.prototype.slice = function(start, length, opt_contentType) {};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @see http://www.w3.org/TR/FileAPI/#arraybuffer-method-algo
|
|
63
|
+
* @return {!Promise<!ArrayBuffer>}
|
|
64
|
+
* @nosideeffects
|
|
65
|
+
*/
|
|
66
|
+
Blob.prototype.arrayBuffer = function() {};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @see https://www.w3.org/TR/FileAPI/#bytes-method-algo
|
|
70
|
+
* @return {!Promise<!Uint8Array>}
|
|
71
|
+
* @nosideeffects
|
|
72
|
+
*/
|
|
73
|
+
Blob.prototype.bytes = function() {};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @see https://www.w3.org/TR/FileAPI/#dom-blob-text
|
|
77
|
+
* @return {!Promise<string>}
|
|
78
|
+
* @nosideeffects
|
|
79
|
+
*/
|
|
80
|
+
Blob.prototype.text = function() {};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @record
|
|
85
|
+
* @extends {BlobPropertyBag}
|
|
86
|
+
**/
|
|
87
|
+
function FilePropertyBag() {};
|
|
88
|
+
|
|
89
|
+
/** @type {(number|undefined)} */
|
|
90
|
+
FilePropertyBag.prototype.lastModified;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-file
|
|
94
|
+
* @param {!Array<string|!Blob|!ArrayBuffer>=} contents
|
|
95
|
+
* @param {string=} name
|
|
96
|
+
* @param {FilePropertyBag=} properties
|
|
97
|
+
* @constructor
|
|
98
|
+
* @extends {Blob}
|
|
99
|
+
*/
|
|
100
|
+
function File(contents, name, properties) {}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Chrome uses this instead of name.
|
|
104
|
+
* @deprecated Use name instead.
|
|
105
|
+
* @type {string}
|
|
106
|
+
*/
|
|
107
|
+
File.prototype.fileName;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Chrome uses this instead of size.
|
|
111
|
+
* @deprecated Use size instead.
|
|
112
|
+
* @type {string}
|
|
113
|
+
*/
|
|
114
|
+
File.prototype.fileSize;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-name
|
|
118
|
+
* @type {string}
|
|
119
|
+
*/
|
|
120
|
+
File.prototype.name;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate
|
|
124
|
+
* @type {Date}
|
|
125
|
+
*/
|
|
126
|
+
File.prototype.lastModifiedDate;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-lastModified
|
|
130
|
+
* @type {number}
|
|
131
|
+
*/
|
|
132
|
+
File.prototype.lastModified;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-filereader
|
|
136
|
+
* @constructor
|
|
137
|
+
* @implements {EventTarget}
|
|
138
|
+
*/
|
|
139
|
+
function FileReader() {}
|
|
140
|
+
|
|
141
|
+
/** @override */
|
|
142
|
+
FileReader.prototype.addEventListener = function(type, listener, opt_options) {
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @override */
|
|
146
|
+
FileReader.prototype.removeEventListener = function(
|
|
147
|
+
type, listener, opt_options) {};
|
|
148
|
+
|
|
149
|
+
/** @override */
|
|
150
|
+
FileReader.prototype.dispatchEvent = function(evt) {};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer
|
|
154
|
+
* @param {!Blob} blob
|
|
155
|
+
* @return {undefined}
|
|
156
|
+
*/
|
|
157
|
+
FileReader.prototype.readAsArrayBuffer = function(blob) {};
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringAsync
|
|
161
|
+
* @param {!Blob} blob
|
|
162
|
+
* @return {undefined}
|
|
163
|
+
*/
|
|
164
|
+
FileReader.prototype.readAsBinaryString = function(blob) {};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsText
|
|
168
|
+
* @param {!Blob} blob
|
|
169
|
+
* @param {string=} encoding
|
|
170
|
+
* @return {undefined}
|
|
171
|
+
*/
|
|
172
|
+
FileReader.prototype.readAsText = function(blob, encoding) {};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURL
|
|
176
|
+
* @param {!Blob} blob
|
|
177
|
+
* @return {undefined}
|
|
178
|
+
*/
|
|
179
|
+
FileReader.prototype.readAsDataURL = function(blob) {};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-abort
|
|
183
|
+
* @return {undefined}
|
|
184
|
+
*/
|
|
185
|
+
FileReader.prototype.abort = function() {};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-empty
|
|
189
|
+
* @const {number}
|
|
190
|
+
*/
|
|
191
|
+
FileReader.prototype.EMPTY;
|
|
192
|
+
|
|
193
|
+
/** @const {number} */
|
|
194
|
+
FileReader.EMPTY;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-loading
|
|
198
|
+
* @const {number}
|
|
199
|
+
*/
|
|
200
|
+
FileReader.prototype.LOADING;
|
|
201
|
+
|
|
202
|
+
/** @const {number} */
|
|
203
|
+
FileReader.LOADING;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-done
|
|
207
|
+
* @const {number}
|
|
208
|
+
*/
|
|
209
|
+
FileReader.prototype.DONE;
|
|
210
|
+
|
|
211
|
+
/** @const {number} */
|
|
212
|
+
FileReader.DONE;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readystate
|
|
216
|
+
* @type {number}
|
|
217
|
+
*/
|
|
218
|
+
FileReader.prototype.readyState;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-result
|
|
222
|
+
* @type {string|Blob|ArrayBuffer}
|
|
223
|
+
*/
|
|
224
|
+
FileReader.prototype.result;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-error
|
|
228
|
+
* @type {DOMError}
|
|
229
|
+
*/
|
|
230
|
+
FileReader.prototype.error;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadstart
|
|
234
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
235
|
+
*/
|
|
236
|
+
FileReader.prototype.onloadstart;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onprogress
|
|
240
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
241
|
+
*/
|
|
242
|
+
FileReader.prototype.onprogress;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onload
|
|
246
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
247
|
+
*/
|
|
248
|
+
FileReader.prototype.onload;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onabort
|
|
252
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
253
|
+
*/
|
|
254
|
+
FileReader.prototype.onabort;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onerror
|
|
258
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
259
|
+
*/
|
|
260
|
+
FileReader.prototype.onerror;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadend
|
|
264
|
+
* @type {?function(!ProgressEvent<!FileReader>)}
|
|
265
|
+
*/
|
|
266
|
+
FileReader.prototype.onloadend;
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @see http://www.w3.org/TR/FileAPI/#FileReaderSyncSync
|
|
271
|
+
* @constructor
|
|
272
|
+
*/
|
|
273
|
+
function FileReaderSync() {}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBufferSync
|
|
277
|
+
* @param {!Blob} blob
|
|
278
|
+
* @return {!ArrayBuffer}
|
|
279
|
+
*/
|
|
280
|
+
FileReaderSync.prototype.readAsArrayBuffer = function(blob) {};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringSync
|
|
284
|
+
* @param {!Blob} blob
|
|
285
|
+
* @return {string}
|
|
286
|
+
*/
|
|
287
|
+
FileReaderSync.prototype.readAsBinaryString = function(blob) {};
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsTextSync
|
|
291
|
+
* @param {!Blob} blob
|
|
292
|
+
* @param {string=} encoding
|
|
293
|
+
* @return {string}
|
|
294
|
+
*/
|
|
295
|
+
FileReaderSync.prototype.readAsText = function(blob, encoding) {};
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURLSync
|
|
299
|
+
* @param {!Blob} blob
|
|
300
|
+
* @return {string}
|
|
301
|
+
*/
|
|
302
|
+
FileReaderSync.prototype.readAsDataURL = function(blob) {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2013 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 Gamepad specification.
|
|
19
|
+
* @see http://www.w3.org/TR/gamepad/
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @return {!Array.<!Gamepad>}
|
|
25
|
+
*/
|
|
26
|
+
navigator.getGamepads = function() {};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @return {!Array.<!Gamepad>}
|
|
30
|
+
*/
|
|
31
|
+
navigator.webkitGetGamepads = function() {};
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @interface
|
|
36
|
+
*/
|
|
37
|
+
var Gamepad = function() {};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @type {string}
|
|
41
|
+
*/
|
|
42
|
+
Gamepad.prototype.id; // read-only
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @type {number}
|
|
46
|
+
*/
|
|
47
|
+
Gamepad.prototype.index; // read-only
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
Gamepad.prototype.connected; // read-only
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @type {number}
|
|
56
|
+
*/
|
|
57
|
+
Gamepad.prototype.timestamp; // read-only
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @type {string}
|
|
61
|
+
*/
|
|
62
|
+
Gamepad.prototype.mapping; // read-only
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @type {!Array.<number>}
|
|
66
|
+
*/
|
|
67
|
+
Gamepad.prototype.axes; // read-only
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Note: The W3C spec changed, this property now returns an array of
|
|
71
|
+
* GamepadButton objects.
|
|
72
|
+
*
|
|
73
|
+
* @type {(!Array.<!GamepadButton>|!Array.<number>)}
|
|
74
|
+
*/
|
|
75
|
+
Gamepad.prototype.buttons;
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @interface
|
|
80
|
+
*/
|
|
81
|
+
var GamepadButton = function() {};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
*/
|
|
86
|
+
GamepadButton.prototype.pressed; // read-only
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
GamepadButton.prototype.value; // read-only
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @record
|
|
95
|
+
* @extends {EventInit}
|
|
96
|
+
* @see https://w3c.github.io/gamepad/#gamepadeventinit-dictionary
|
|
97
|
+
*/
|
|
98
|
+
function GamepadEventInit() {}
|
|
99
|
+
|
|
100
|
+
/** @const {Gamepad} */
|
|
101
|
+
GamepadEventInit.prototype.gamepad;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @constructor
|
|
105
|
+
* @param {string} type
|
|
106
|
+
* @param {GamepadEventInit=} gamepadEventInit
|
|
107
|
+
* @extends {Event}
|
|
108
|
+
* @see https://w3c.github.io/gamepad/#gamepadevent-interface
|
|
109
|
+
*/
|
|
110
|
+
function GamepadEvent(type, gamepadEventInit) {}
|
|
111
|
+
|
|
112
|
+
/** @const {Gamepad} */
|
|
113
|
+
GamepadEvent.prototype.gamepad;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2009 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 Geolocation specification
|
|
19
|
+
* http://www.w3.org/TR/geolocation-API/
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @constructor
|
|
25
|
+
* @see http://www.w3.org/TR/geolocation-API/#geolocation
|
|
26
|
+
*/
|
|
27
|
+
function Geolocation() {}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {function(!GeolocationPosition): void}
|
|
31
|
+
*/
|
|
32
|
+
var PositionCallback;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @typedef {function(!GeolocationPositionError): void}
|
|
36
|
+
*/
|
|
37
|
+
var PositionErrorCallback;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {PositionCallback} successCallback
|
|
41
|
+
* @param {PositionErrorCallback=} opt_errorCallback
|
|
42
|
+
* @param {GeolocationPositionOptions=} opt_options
|
|
43
|
+
* @return {undefined}
|
|
44
|
+
*/
|
|
45
|
+
Geolocation.prototype.getCurrentPosition = function(successCallback,
|
|
46
|
+
opt_errorCallback,
|
|
47
|
+
opt_options) {};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {PositionCallback} successCallback
|
|
51
|
+
* @param {PositionErrorCallback=} opt_errorCallback
|
|
52
|
+
* @param {GeolocationPositionOptions=} opt_options
|
|
53
|
+
* @return {number}
|
|
54
|
+
*/
|
|
55
|
+
Geolocation.prototype.watchPosition = function(successCallback,
|
|
56
|
+
opt_errorCallback,
|
|
57
|
+
opt_options) {};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @param {number} watchId
|
|
61
|
+
* @return {undefined}
|
|
62
|
+
*/
|
|
63
|
+
Geolocation.prototype.clearWatch = function(watchId) {};
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @record
|
|
68
|
+
* @see http://www.w3.org/TR/geolocation-API/#coordinates
|
|
69
|
+
*/
|
|
70
|
+
function GeolocationCoordinates() {}
|
|
71
|
+
/** @type {number} */
|
|
72
|
+
GeolocationCoordinates.prototype.latitude;
|
|
73
|
+
/** @type {number} */
|
|
74
|
+
GeolocationCoordinates.prototype.longitude;
|
|
75
|
+
/** @type {number} */
|
|
76
|
+
GeolocationCoordinates.prototype.accuracy;
|
|
77
|
+
/** @type {number|null} */
|
|
78
|
+
GeolocationCoordinates.prototype.altitude;
|
|
79
|
+
/** @type {number|null} */
|
|
80
|
+
GeolocationCoordinates.prototype.altitudeAccuracy;
|
|
81
|
+
/** @type {number|null} */
|
|
82
|
+
GeolocationCoordinates.prototype.heading;
|
|
83
|
+
/** @type {number|null} */
|
|
84
|
+
GeolocationCoordinates.prototype.speed;
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @record
|
|
89
|
+
* @see http://www.w3.org/TR/geolocation-API/#position
|
|
90
|
+
*/
|
|
91
|
+
function GeolocationPosition() {}
|
|
92
|
+
/** @type {GeolocationCoordinates} */
|
|
93
|
+
GeolocationPosition.prototype.coords;
|
|
94
|
+
/** @type {number} */
|
|
95
|
+
GeolocationPosition.prototype.timestamp;
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @record
|
|
100
|
+
* @see http://www.w3.org/TR/geolocation-API/#position-options
|
|
101
|
+
*/
|
|
102
|
+
function GeolocationPositionOptions() {}
|
|
103
|
+
/** @type {boolean|undefined} */
|
|
104
|
+
GeolocationPositionOptions.prototype.enableHighAccuracy;
|
|
105
|
+
/** @type {number|undefined} */
|
|
106
|
+
GeolocationPositionOptions.prototype.maximumAge;
|
|
107
|
+
/** @type {number|undefined} */
|
|
108
|
+
GeolocationPositionOptions.prototype.timeout;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @record
|
|
113
|
+
* @see http://www.w3.org/TR/geolocation-API/#position-error
|
|
114
|
+
*/
|
|
115
|
+
function GeolocationPositionError() {}
|
|
116
|
+
/** @type {number} */
|
|
117
|
+
GeolocationPositionError.prototype.code;
|
|
118
|
+
/** @type {string} */
|
|
119
|
+
GeolocationPositionError.prototype.message;
|
|
120
|
+
/** @const {number} */
|
|
121
|
+
GeolocationPositionError.prototype.UNKNOWN_ERROR;
|
|
122
|
+
/** @const {number} */
|
|
123
|
+
GeolocationPositionError.prototype.PERMISSION_DENIED;
|
|
124
|
+
/** @const {number} */
|
|
125
|
+
GeolocationPositionError.prototype.POSITION_UNAVAILABLE;
|
|
126
|
+
/** @const {number} */
|
|
127
|
+
GeolocationPositionError.prototype.TIMEOUT;
|
|
128
|
+
|
|
129
|
+
/** @type {Geolocation} */
|
|
130
|
+
Navigator.prototype.geolocation;
|