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,258 @@
|
|
|
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 W3C's Notifications specification.
|
|
18
|
+
* @externs
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {{
|
|
23
|
+
* dir: (string|undefined),
|
|
24
|
+
* lang: (string|undefined),
|
|
25
|
+
* body: (string|undefined),
|
|
26
|
+
* tag: (string|undefined),
|
|
27
|
+
* image: (string|undefined),
|
|
28
|
+
* icon: (string|undefined),
|
|
29
|
+
* badge: (string|undefined),
|
|
30
|
+
* vibrate: (!Array<number>|undefined),
|
|
31
|
+
* timestamp: (number|undefined),
|
|
32
|
+
* renotify: (boolean|undefined),
|
|
33
|
+
* silent: (boolean|undefined),
|
|
34
|
+
* requireInteraction: (boolean|undefined),
|
|
35
|
+
* data: (*|undefined),
|
|
36
|
+
* actions: (!Array<!NotificationAction>|undefined),
|
|
37
|
+
* }}
|
|
38
|
+
* TODO(user): change the type of data to a serializable object
|
|
39
|
+
* (https://html.spec.whatwg.org/multipage/structured-data.html).
|
|
40
|
+
*
|
|
41
|
+
* @see http://notifications.spec.whatwg.org/#notification
|
|
42
|
+
*/
|
|
43
|
+
var NotificationOptions;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @typedef {{action: string, title: string, icon: (string|undefined)}}
|
|
47
|
+
* @see https://notifications.spec.whatwg.org/#dictdef-notificationoptions
|
|
48
|
+
*/
|
|
49
|
+
var NotificationAction;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @typedef {{tag: (string|undefined)}}
|
|
53
|
+
* @see https://notifications.spec.whatwg.org/#dictdef-getnotificationoptions
|
|
54
|
+
*/
|
|
55
|
+
var GetNotificationOptions;
|
|
56
|
+
|
|
57
|
+
/** @interface */
|
|
58
|
+
var NotificationOptionsInterface_ = function() {}
|
|
59
|
+
/** @type {string} */ NotificationOptionsInterface_.prototype.dir;
|
|
60
|
+
/** @type {string} */ NotificationOptionsInterface_.prototype.lang;
|
|
61
|
+
/** @type {string} */ NotificationOptionsInterface_.prototype.body;
|
|
62
|
+
/** @type {string} */ NotificationOptionsInterface_.prototype.tag;
|
|
63
|
+
/** @type {string} */ NotificationOptionsInterface_.prototype.icon;
|
|
64
|
+
/** @type {boolean} */
|
|
65
|
+
NotificationOptionsInterface_.prototype.requireInteraction;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param {string} title
|
|
69
|
+
* @param {NotificationOptions=} opt_options
|
|
70
|
+
* @constructor
|
|
71
|
+
* @implements {EventTarget}
|
|
72
|
+
* @see http://notifications.spec.whatwg.org/#notification
|
|
73
|
+
*/
|
|
74
|
+
function Notification(title, opt_options) {}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @type {string}
|
|
78
|
+
*/
|
|
79
|
+
Notification.permission;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @param {NotificationPermissionCallback=} opt_callback
|
|
83
|
+
* @return {!Promise<string>}
|
|
84
|
+
*/
|
|
85
|
+
Notification.requestPermission = function(opt_callback) {};
|
|
86
|
+
|
|
87
|
+
/** @override */
|
|
88
|
+
Notification.prototype.addEventListener = function(
|
|
89
|
+
type, listener, opt_options) {};
|
|
90
|
+
|
|
91
|
+
/** @override */
|
|
92
|
+
Notification.prototype.removeEventListener = function(
|
|
93
|
+
type, listener, opt_options) {};
|
|
94
|
+
|
|
95
|
+
/** @override */
|
|
96
|
+
Notification.prototype.dispatchEvent = function(evt) {};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @type {string}
|
|
100
|
+
*/
|
|
101
|
+
Notification.prototype.title;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @type {string}
|
|
105
|
+
*/
|
|
106
|
+
Notification.prototype.body;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @type {string}
|
|
110
|
+
*/
|
|
111
|
+
Notification.prototype.icon;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The string used by clients to identify the notification.
|
|
115
|
+
* @type {string}
|
|
116
|
+
*/
|
|
117
|
+
Notification.prototype.tag;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The ID used by clients to uniquely identify notifications to eliminate
|
|
121
|
+
* duplicate notifications.
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @deprecated Use NotificationOptions.tag instead.
|
|
124
|
+
*/
|
|
125
|
+
Notification.prototype.replaceId;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @type {*}
|
|
129
|
+
*/
|
|
130
|
+
Notification.prototype.data;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The string used by clients to specify the directionality (rtl/ltr) of the
|
|
134
|
+
* notification.
|
|
135
|
+
* @type {string}
|
|
136
|
+
* @deprecated Use NotificationOptions.titleDir and bodyDir instead.
|
|
137
|
+
*/
|
|
138
|
+
Notification.prototype.dir;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Displays the notification.
|
|
142
|
+
* @return {undefined}
|
|
143
|
+
*/
|
|
144
|
+
Notification.prototype.show = function() {};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Prevents the notification from being displayed, or closes it if it is already
|
|
148
|
+
* displayed.
|
|
149
|
+
* @return {undefined}
|
|
150
|
+
*/
|
|
151
|
+
Notification.prototype.cancel = function() {};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Prevents the notification from being displayed, or closes it if it is already
|
|
155
|
+
* displayed.
|
|
156
|
+
* @return {undefined}
|
|
157
|
+
*/
|
|
158
|
+
Notification.prototype.close = function() {};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* An event handler called when notification is closed.
|
|
162
|
+
* @type {?function(Event)}
|
|
163
|
+
*/
|
|
164
|
+
Notification.prototype.onclose;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* An event handler called if the notification could not be displayed due to
|
|
168
|
+
* an error (i.e. resource could not be loaded).
|
|
169
|
+
* @type {?function(Event)}
|
|
170
|
+
*/
|
|
171
|
+
Notification.prototype.onerror;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* An event handler called when the notification has become visible.
|
|
175
|
+
* @type {?function(Event)}
|
|
176
|
+
* @deprecated Use onshow instead.
|
|
177
|
+
*/
|
|
178
|
+
Notification.prototype.ondisplay;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* An event handler called when the notification has become visible.
|
|
182
|
+
* @type {?function(Event)}
|
|
183
|
+
*/
|
|
184
|
+
Notification.prototype.onshow;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* An event handler called when the notification has been clicked on.
|
|
188
|
+
* @type {?function(Event)}
|
|
189
|
+
*/
|
|
190
|
+
Notification.prototype.onclick;
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @typedef {function(string)}
|
|
196
|
+
* @see http://notifications.spec.whatwg.org/#notificationpermissioncallback
|
|
197
|
+
*/
|
|
198
|
+
var NotificationPermissionCallback;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @constructor
|
|
202
|
+
* @see http://dev.w3.org/2006/webapi/WebNotifications/publish/#dialog-if
|
|
203
|
+
* @deprecated Use Notification instead.
|
|
204
|
+
*/
|
|
205
|
+
function NotificationCenter() {}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Creates a text+icon notification and displays it to the user.
|
|
209
|
+
* @param {string} iconUrl
|
|
210
|
+
* @param {string} title
|
|
211
|
+
* @param {string} body
|
|
212
|
+
* @return {Notification}
|
|
213
|
+
*/
|
|
214
|
+
NotificationCenter.prototype.createNotification =
|
|
215
|
+
function(iconUrl, title, body) {};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Creates an HTML notification and displays it to the user.
|
|
219
|
+
* @param {string} url
|
|
220
|
+
* @return {Notification}
|
|
221
|
+
*/
|
|
222
|
+
NotificationCenter.prototype.createHTMLNotification = function(url) {};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Checks if the user has permission to display notifications.
|
|
226
|
+
* @return {number}
|
|
227
|
+
*/
|
|
228
|
+
NotificationCenter.prototype.checkPermission = function() {};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Requests permission from the user to display notifications.
|
|
232
|
+
* @param {Function=} opt_callback
|
|
233
|
+
* @return {void}
|
|
234
|
+
*/
|
|
235
|
+
NotificationCenter.prototype.requestPermission = function(opt_callback) {};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* WebKit browsers expose the NotificationCenter API through
|
|
239
|
+
* window.webkitNotifications.
|
|
240
|
+
* @type {NotificationCenter}
|
|
241
|
+
*/
|
|
242
|
+
Window.prototype.webkitNotifications;
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @see https://notifications.spec.whatwg.org/#notificationevent
|
|
247
|
+
* @constructor
|
|
248
|
+
* @param {string} type
|
|
249
|
+
* @param {!ExtendableEventInit=} opt_eventInitDict
|
|
250
|
+
* @extends {ExtendableEvent}
|
|
251
|
+
*/
|
|
252
|
+
function NotificationEvent(type, opt_eventInitDict) {}
|
|
253
|
+
|
|
254
|
+
/** @type {!Notification} */
|
|
255
|
+
NotificationEvent.prototype.notification;
|
|
256
|
+
|
|
257
|
+
/** @type {string} */
|
|
258
|
+
NotificationEvent.prototype.action;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016 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 WKWebView's User Content interface.
|
|
18
|
+
* https://developer.apple.com/library/prerelease/ios/documentation/WebKit/Reference/WKUserContentController_Ref/
|
|
19
|
+
* https://trac.webkit.org/browser/trunk/Source/WebCore/page/WebKitNamespace.h
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/** @constructor */
|
|
25
|
+
function WebKitNamespace() {}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @type {!UserMessageHandlersNamespace}
|
|
30
|
+
*/
|
|
31
|
+
WebKitNamespace.prototype.messageHandlers;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @constructor
|
|
36
|
+
* @implements {IObject<string, UserMessageHandler>}
|
|
37
|
+
*/
|
|
38
|
+
function UserMessageHandlersNamespace() {}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/** @constructor */
|
|
42
|
+
function UserMessageHandler() {}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {*} message
|
|
47
|
+
* @return {undefined}
|
|
48
|
+
*/
|
|
49
|
+
UserMessageHandler.prototype.postMessage = function(message) {};
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @const {!WebKitNamespace}
|
|
54
|
+
*/
|
|
55
|
+
var webkit;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2018 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 Web Locks API. Details of the
|
|
18
|
+
* API are at:
|
|
19
|
+
* @see https://w3c.github.io/web-locks/
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
* @author ohsnapitscolin@google.com (Colin Dunn)
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Possible values are "shared" and "exclusive".
|
|
27
|
+
* @typedef {string}
|
|
28
|
+
* @see https://w3c.github.io/web-locks/#enumdef-lockmode
|
|
29
|
+
*/
|
|
30
|
+
var LockMode;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @interface
|
|
35
|
+
* @see https://w3c.github.io/web-locks/#lock
|
|
36
|
+
*/
|
|
37
|
+
function Lock() {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @const {string}
|
|
41
|
+
* @see https://w3c.github.io/web-locks/#lock-concept-name
|
|
42
|
+
*/
|
|
43
|
+
Lock.prototype.name;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @const {!LockMode}
|
|
47
|
+
* @see https://w3c.github.io/web-locks/#lock-concept-mode
|
|
48
|
+
*/
|
|
49
|
+
Lock.prototype.mode;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @typedef {{
|
|
54
|
+
* name: string,
|
|
55
|
+
* mode: !LockMode,
|
|
56
|
+
* clientId: string
|
|
57
|
+
* }}
|
|
58
|
+
* @see https://w3c.github.io/web-locks/#dictdef-lockinfo
|
|
59
|
+
*/
|
|
60
|
+
var LockInfo;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @typedef {{
|
|
65
|
+
* mode: (!LockMode|undefined),
|
|
66
|
+
* ifAvailable: (boolean|undefined),
|
|
67
|
+
* steal: (boolean|undefined),
|
|
68
|
+
* signal: (!AbortSignal|undefined)
|
|
69
|
+
* }}
|
|
70
|
+
* @see https://w3c.github.io/web-locks/#dictdef-lockoptions
|
|
71
|
+
*/
|
|
72
|
+
var LockOptions;
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @typedef {{
|
|
77
|
+
* held: !Array<!LockInfo>,
|
|
78
|
+
* pending: !Array<!LockInfo>
|
|
79
|
+
* }}
|
|
80
|
+
* @see https://w3c.github.io/web-locks/#dictdef-lockmanagersnapshot
|
|
81
|
+
*/
|
|
82
|
+
var LockManagerSnapshot;
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @typedef {(function(?Lock) : !Promise<*>)}
|
|
87
|
+
* @see https://w3c.github.io/web-locks/#callbackdef-lockgrantedcallback
|
|
88
|
+
*/
|
|
89
|
+
var LockGrantedCallback;
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @interface
|
|
94
|
+
* @see https://w3c.github.io/web-locks/#lockmanager
|
|
95
|
+
*/
|
|
96
|
+
function LockManager() {}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @see https://w3c.github.io/web-locks/#dom-lockmanager-request
|
|
100
|
+
* @param {string} name
|
|
101
|
+
* @param {(!LockOptions|!LockGrantedCallback)} optionsOrCallback
|
|
102
|
+
* @param {!LockGrantedCallback=} callback
|
|
103
|
+
* @return {!Promise<*>}
|
|
104
|
+
*/
|
|
105
|
+
LockManager.prototype.request = function(name, optionsOrCallback, callback) {};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @see https://w3c.github.io/web-locks/#dom-lockmanager-query
|
|
109
|
+
* @return {!Promise<!LockManagerSnapshot>}
|
|
110
|
+
*/
|
|
111
|
+
LockManager.prototype.query = function() {};
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @type {!LockManager}
|
|
116
|
+
* @see https://w3c.github.io/web-locks/#lockmanager
|
|
117
|
+
*/
|
|
118
|
+
Navigator.prototype.locks;
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @type {!LockManager}
|
|
123
|
+
* @see https://w3c.github.io/web-locks/#lockmanager
|
|
124
|
+
*/
|
|
125
|
+
WorkerNavigator.prototype.locks;
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
* @fileoverview Definitions for W3C's WebStorage specification.
|
|
18
|
+
* This file depends on w3c_dom1.js and w3c_event.js.
|
|
19
|
+
* @externs
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @interface
|
|
24
|
+
* @see https://www.w3.org/TR/webstorage/#the-storage-interface
|
|
25
|
+
*/
|
|
26
|
+
function Storage() {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @const {number}
|
|
30
|
+
*/
|
|
31
|
+
Storage.prototype.length;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {number} index
|
|
35
|
+
* @return {?string}
|
|
36
|
+
*/
|
|
37
|
+
Storage.prototype.key = function(index) {};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {string} key
|
|
41
|
+
* @return {?string}
|
|
42
|
+
*/
|
|
43
|
+
Storage.prototype.getItem = function(key) {};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} key
|
|
47
|
+
* @param {string} data
|
|
48
|
+
* @return {void}
|
|
49
|
+
*/
|
|
50
|
+
Storage.prototype.setItem = function(key, data) {};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} key
|
|
54
|
+
* @return {void}
|
|
55
|
+
*/
|
|
56
|
+
Storage.prototype.removeItem = function(key) {};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @return {void}
|
|
60
|
+
*/
|
|
61
|
+
Storage.prototype.clear = function() {};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @interface
|
|
65
|
+
* @see https://www.w3.org/TR/webstorage/#the-sessionstorage-attribute
|
|
66
|
+
*/
|
|
67
|
+
function WindowSessionStorage() {}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @type {!Storage}
|
|
71
|
+
*/
|
|
72
|
+
WindowSessionStorage.prototype.sessionStorage;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Window implements WindowSessionStorage
|
|
76
|
+
*
|
|
77
|
+
* @type {!Storage}
|
|
78
|
+
*/
|
|
79
|
+
Window.prototype.sessionStorage;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @interface
|
|
83
|
+
* @see https://www.w3.org/TR/webstorage/#the-localstorage-attribute
|
|
84
|
+
*/
|
|
85
|
+
function WindowLocalStorage() {}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @type {!Storage}
|
|
89
|
+
*/
|
|
90
|
+
WindowLocalStorage.prototype.localStorage;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Window implements WindowLocalStorage
|
|
94
|
+
*
|
|
95
|
+
* @type {!Storage}
|
|
96
|
+
*/
|
|
97
|
+
Window.prototype.localStorage;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @record
|
|
101
|
+
* @extends {EventInit}
|
|
102
|
+
* @see https://www.w3.org/TR/webstorage/#the-storageevent-interface
|
|
103
|
+
*/
|
|
104
|
+
function StorageEventInit() {}
|
|
105
|
+
|
|
106
|
+
/** @type {undefined|string} */
|
|
107
|
+
StorageEventInit.prototype.key;
|
|
108
|
+
|
|
109
|
+
/** @type {undefined|string} */
|
|
110
|
+
StorageEventInit.prototype.oldValue;
|
|
111
|
+
|
|
112
|
+
/** @type {undefined|string} */
|
|
113
|
+
StorageEventInit.prototype.newValue;
|
|
114
|
+
|
|
115
|
+
/** @type {string} */
|
|
116
|
+
StorageEventInit.prototype.url;
|
|
117
|
+
|
|
118
|
+
/** @type {undefined|!Storage} */
|
|
119
|
+
StorageEventInit.prototype.storageArea;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* This is the storage event interface.
|
|
123
|
+
* @see https://www.w3.org/TR/webstorage/#the-storage-event
|
|
124
|
+
* @extends {Event}
|
|
125
|
+
* @param {string} type
|
|
126
|
+
* @param {!StorageEventInit=} eventInitDict
|
|
127
|
+
* @constructor
|
|
128
|
+
*/
|
|
129
|
+
function StorageEvent(type, eventInitDict) {}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @type {string}
|
|
133
|
+
*/
|
|
134
|
+
StorageEvent.prototype.key;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @type {?string}
|
|
138
|
+
*/
|
|
139
|
+
StorageEvent.prototype.oldValue;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @type {?string}
|
|
143
|
+
*/
|
|
144
|
+
StorageEvent.prototype.newValue;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @type {string}
|
|
148
|
+
*/
|
|
149
|
+
StorageEvent.prototype.url;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @type {?Storage}
|
|
153
|
+
*/
|
|
154
|
+
StorageEvent.prototype.storageArea;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param {string} typeArg
|
|
158
|
+
* @param {boolean} canBubbleArg
|
|
159
|
+
* @param {boolean} cancelableArg
|
|
160
|
+
* @param {string} keyArg
|
|
161
|
+
* @param {?string} oldValueArg
|
|
162
|
+
* @param {?string} newValueArg
|
|
163
|
+
* @param {!URL|string} urlArg
|
|
164
|
+
* @param {?Storage} storageAreaArg
|
|
165
|
+
* @return {void}
|
|
166
|
+
*/
|
|
167
|
+
StorageEvent.prototype.initStorageEvent = function(typeArg, canBubbleArg,
|
|
168
|
+
cancelableArg, keyArg,
|
|
169
|
+
oldValueArg, newValueArg,
|
|
170
|
+
urlArg, storageAreaArg) {};
|
|
171
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 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 ImageBitmapRenderingContext.
|
|
19
|
+
* https://html.spec.whatwg.org/multipage/canvas.html#the-imagebitmaprenderingcontext-interface
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @constructor
|
|
25
|
+
* @see https://html.spec.whatwg.org/multipage/canvas.html#the-imagebitmaprenderingcontext-interface
|
|
26
|
+
*/
|
|
27
|
+
function ImageBitmapRenderingContext() {}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param {?ImageBitmap} bitmap
|
|
31
|
+
* @return {undefined}
|
|
32
|
+
*/
|
|
33
|
+
ImageBitmapRenderingContext.prototype.transferFromImageBitmap = function(
|
|
34
|
+
bitmap) {};
|
|
35
|
+
|
|
36
|
+
/** @const {!HTMLCanvasElement|!OffscreenCanvas} */
|
|
37
|
+
ImageBitmapRenderingContext.prototype.canvas;
|