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,401 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2019 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 Payment Request API.
|
|
19
|
+
* @see https://w3c.github.io/payment-request/
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @constructor
|
|
26
|
+
* @param {!Array<!PaymentMethodData>} methodData
|
|
27
|
+
* @param {!PaymentDetailsInit} details
|
|
28
|
+
* @param {!PaymentOptions=} options
|
|
29
|
+
* @implements {EventTarget}
|
|
30
|
+
* @see https://w3c.github.io/payment-request/#paymentrequest-interface
|
|
31
|
+
*/
|
|
32
|
+
function PaymentRequest(methodData, details, options) {}
|
|
33
|
+
/**
|
|
34
|
+
* @param {!Promise<!PaymentDetailsUpdate>=} detailsPromise
|
|
35
|
+
* @return {!Promise<!PaymentResponse>}
|
|
36
|
+
*/
|
|
37
|
+
PaymentRequest.prototype.show = function(detailsPromise) {};
|
|
38
|
+
/** @return {!Promise<undefined>} */
|
|
39
|
+
PaymentRequest.prototype.abort = function() {};
|
|
40
|
+
/** @return {!Promise<boolean>} */
|
|
41
|
+
PaymentRequest.prototype.canMakePayment = function() {};
|
|
42
|
+
/** @return {!Promise<boolean>} */
|
|
43
|
+
PaymentRequest.prototype.hasEnrolledInstrument = function() {};
|
|
44
|
+
/** @const {string} */
|
|
45
|
+
PaymentRequest.prototype.id;
|
|
46
|
+
/** @const {?PaymentAddress} */
|
|
47
|
+
PaymentRequest.prototype.shippingAddress;
|
|
48
|
+
/** @const {?string} */
|
|
49
|
+
PaymentRequest.prototype.shippingOption;
|
|
50
|
+
/** @const {?string} */
|
|
51
|
+
PaymentRequest.prototype.shippingType;
|
|
52
|
+
/** @type {?function(!Event)} */
|
|
53
|
+
PaymentRequest.prototype.onmerchantvalidation;
|
|
54
|
+
/** @type {?function(!Event)} */
|
|
55
|
+
PaymentRequest.prototype.onshippingaddresschange;
|
|
56
|
+
/** @type {?function(!Event)} */
|
|
57
|
+
PaymentRequest.prototype.onshippingoptionchange;
|
|
58
|
+
/** @type {?function(!Event)} */
|
|
59
|
+
PaymentRequest.prototype.onpaymentmethodchange;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @record
|
|
63
|
+
* @see https://w3c.github.io/payment-request/#paymentmethoddata-dictionary
|
|
64
|
+
*/
|
|
65
|
+
function PaymentMethodData() {};
|
|
66
|
+
/** @type {string} */
|
|
67
|
+
PaymentMethodData.prototype.supportedMethods;
|
|
68
|
+
/** @type {!Object|undefined} */
|
|
69
|
+
PaymentMethodData.prototype.data;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @record
|
|
73
|
+
* @see https://w3c.github.io/payment-request/#paymentcurrencyamount-dictionary
|
|
74
|
+
*/
|
|
75
|
+
function PaymentCurrencyAmount() {};
|
|
76
|
+
/** @type {string} */
|
|
77
|
+
PaymentCurrencyAmount.prototype.currency;
|
|
78
|
+
/** @type {string} */
|
|
79
|
+
PaymentCurrencyAmount.prototype.value;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @record
|
|
83
|
+
* @see https://w3c.github.io/payment-request/#paymentdetailsbase-dictionary
|
|
84
|
+
*/
|
|
85
|
+
function PaymentDetailsBase() {};
|
|
86
|
+
/** @type {!Array<!PaymentItem>|undefined} */
|
|
87
|
+
PaymentDetailsBase.prototype.displayItems;
|
|
88
|
+
/** @type {!Array<!PaymentShippingOption>|undefined} */
|
|
89
|
+
PaymentDetailsBase.prototype.shippingOptions;
|
|
90
|
+
/** @type {!Array<!PaymentDetailsModifier>|undefined} */
|
|
91
|
+
PaymentDetailsBase.prototype.modifiers;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @extends {PaymentDetailsBase}
|
|
95
|
+
* @record
|
|
96
|
+
* @see https://w3c.github.io/payment-request/#paymentdetailsinit-dictionary
|
|
97
|
+
*/
|
|
98
|
+
function PaymentDetailsInit() {};
|
|
99
|
+
/** @type {string|undefined} */
|
|
100
|
+
PaymentDetailsInit.prototype.id;
|
|
101
|
+
/** @type {!PaymentItem} */
|
|
102
|
+
PaymentDetailsInit.prototype.total;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @extends {PaymentDetailsBase}
|
|
106
|
+
* @record
|
|
107
|
+
* @see https://w3c.github.io/payment-request/#paymentdetailsupdate-dictionary
|
|
108
|
+
*/
|
|
109
|
+
function PaymentDetailsUpdate() {};
|
|
110
|
+
/** @type {string|undefined} */
|
|
111
|
+
PaymentDetailsUpdate.prototype.error;
|
|
112
|
+
/** @type {!PaymentItem|undefined} */
|
|
113
|
+
PaymentDetailsUpdate.prototype.total;
|
|
114
|
+
/** @type {!AddressErrors|undefined} */
|
|
115
|
+
PaymentDetailsUpdate.prototype.shippingAddressErrors;
|
|
116
|
+
/** @type {!PayerErrors|undefined} */
|
|
117
|
+
PaymentDetailsUpdate.prototype.payerErrors;
|
|
118
|
+
/** @type {!Object|undefined} */
|
|
119
|
+
PaymentDetailsUpdate.prototype.paymentMethodErrors;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @record
|
|
123
|
+
* @see https://w3c.github.io/payment-request/#paymentdetailsmodifier-dictionary
|
|
124
|
+
*/
|
|
125
|
+
function PaymentDetailsModifier() {};
|
|
126
|
+
/** @type {string} */
|
|
127
|
+
PaymentDetailsModifier.prototype.supportedMethods;
|
|
128
|
+
/** @type {!PaymentItem|undefined} */
|
|
129
|
+
PaymentDetailsModifier.prototype.total;
|
|
130
|
+
/** @type {!Array<!PaymentItem>|undefined} */
|
|
131
|
+
PaymentDetailsModifier.prototype.additionalDisplayItems;
|
|
132
|
+
/** @type {!Object|undefined} */
|
|
133
|
+
PaymentDetailsModifier.prototype.data;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @record
|
|
137
|
+
* @see https://w3c.github.io/payment-request/#paymentoptions-dictionary
|
|
138
|
+
*/
|
|
139
|
+
function PaymentOptions() {};
|
|
140
|
+
/** @type {boolean|undefined} */
|
|
141
|
+
PaymentOptions.prototype.requestPayerName;
|
|
142
|
+
/** @type {boolean|undefined} */
|
|
143
|
+
PaymentOptions.prototype.requestBillingAddress;
|
|
144
|
+
/** @type {boolean|undefined} */
|
|
145
|
+
PaymentOptions.prototype.requestPayerEmail;
|
|
146
|
+
/** @type {boolean|undefined} */
|
|
147
|
+
PaymentOptions.prototype.requestPayerPhone;
|
|
148
|
+
/** @type {boolean|undefined} */
|
|
149
|
+
PaymentOptions.prototype.requestShipping;
|
|
150
|
+
/** @type {string|undefined} */
|
|
151
|
+
PaymentOptions.prototype.shippingType;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @record
|
|
155
|
+
* @see https://w3c.github.io/payment-request/#paymentitem-dictionary
|
|
156
|
+
*/
|
|
157
|
+
function PaymentItem() {};
|
|
158
|
+
/** @type {string} */
|
|
159
|
+
PaymentItem.prototype.label;
|
|
160
|
+
/** @type {!PaymentCurrencyAmount} */
|
|
161
|
+
PaymentItem.prototype.amount;
|
|
162
|
+
/** @type {boolean|undefined} */
|
|
163
|
+
PaymentItem.prototype.pending;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @interface
|
|
167
|
+
* @see https://w3c.github.io/payment-request/#paymentaddress-interface
|
|
168
|
+
*/
|
|
169
|
+
function PaymentAddress() {}
|
|
170
|
+
/**
|
|
171
|
+
* @return {Object}
|
|
172
|
+
* @override
|
|
173
|
+
*/
|
|
174
|
+
PaymentAddress.prototype.toJSON = function() {};
|
|
175
|
+
/** @const {string|undefined} */
|
|
176
|
+
PaymentAddress.prototype.city;
|
|
177
|
+
/** @const {string|undefined} */
|
|
178
|
+
PaymentAddress.prototype.country;
|
|
179
|
+
/** @const {string|undefined} */
|
|
180
|
+
PaymentAddress.prototype.dependentLocality;
|
|
181
|
+
/** @const {string|undefined} */
|
|
182
|
+
PaymentAddress.prototype.organization;
|
|
183
|
+
/** @const {string|undefined} */
|
|
184
|
+
PaymentAddress.prototype.phone;
|
|
185
|
+
/** @const {string|undefined} */
|
|
186
|
+
PaymentAddress.prototype.postalCode;
|
|
187
|
+
/** @const {string|undefined} */
|
|
188
|
+
PaymentAddress.prototype.recipient;
|
|
189
|
+
/** @const {string|undefined} */
|
|
190
|
+
PaymentAddress.prototype.region;
|
|
191
|
+
/** @const {string|undefined} */
|
|
192
|
+
PaymentAddress.prototype.sortingCode;
|
|
193
|
+
/** @const {!Array<string>|undefined} */
|
|
194
|
+
PaymentAddress.prototype.addressLine;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @record
|
|
198
|
+
* @see https://w3c.github.io/payment-request/#addressinit-dictionary
|
|
199
|
+
*/
|
|
200
|
+
function AddressInit() {};
|
|
201
|
+
/** @type {string|undefined} */
|
|
202
|
+
AddressInit.prototype.country;
|
|
203
|
+
/** @type {!Array<string>|undefined} */
|
|
204
|
+
AddressInit.prototype.addressLine;
|
|
205
|
+
/** @type {string|undefined} */
|
|
206
|
+
AddressInit.prototype.region;
|
|
207
|
+
/** @type {string|undefined} */
|
|
208
|
+
AddressInit.prototype.city;
|
|
209
|
+
/** @type {string|undefined} */
|
|
210
|
+
AddressInit.prototype.dependentLocality;
|
|
211
|
+
/** @type {string|undefined} */
|
|
212
|
+
AddressInit.prototype.postalCode;
|
|
213
|
+
/** @type {string|undefined} */
|
|
214
|
+
AddressInit.prototype.sortingCode;
|
|
215
|
+
/** @type {string|undefined} */
|
|
216
|
+
AddressInit.prototype.organization;
|
|
217
|
+
/** @type {string|undefined} */
|
|
218
|
+
AddressInit.prototype.recipient;
|
|
219
|
+
/** @type {string|undefined} */
|
|
220
|
+
AddressInit.prototype.phone;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @record
|
|
224
|
+
* @see https://w3c.github.io/payment-request/#addresserrors-dictionary
|
|
225
|
+
*/
|
|
226
|
+
function AddressErrors() {};
|
|
227
|
+
/** @type {string|undefined} */
|
|
228
|
+
AddressErrors.prototype.addressLine;
|
|
229
|
+
/** @type {string|undefined} */
|
|
230
|
+
AddressErrors.prototype.city;
|
|
231
|
+
/** @type {string|undefined} */
|
|
232
|
+
AddressErrors.prototype.country;
|
|
233
|
+
/** @type {string|undefined} */
|
|
234
|
+
AddressErrors.prototype.dependentLocality;
|
|
235
|
+
/** @type {string|undefined} */
|
|
236
|
+
AddressErrors.prototype.organization;
|
|
237
|
+
/** @type {string|undefined} */
|
|
238
|
+
AddressErrors.prototype.phone;
|
|
239
|
+
/** @type {string|undefined} */
|
|
240
|
+
AddressErrors.prototype.postalCode;
|
|
241
|
+
/** @type {string|undefined} */
|
|
242
|
+
AddressErrors.prototype.recipient;
|
|
243
|
+
/** @type {string|undefined} */
|
|
244
|
+
AddressErrors.prototype.region;
|
|
245
|
+
/** @type {string|undefined} */
|
|
246
|
+
AddressErrors.prototype.sortingCode;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @record
|
|
250
|
+
* @see https://w3c.github.io/payment-request/#paymentshippingoption-dictionary
|
|
251
|
+
*/
|
|
252
|
+
function PaymentShippingOption() {};
|
|
253
|
+
/** @type {string} */
|
|
254
|
+
PaymentShippingOption.prototype.id;
|
|
255
|
+
/** @type {string} */
|
|
256
|
+
PaymentShippingOption.prototype.label;
|
|
257
|
+
/** @type {!PaymentCurrencyAmount} */
|
|
258
|
+
PaymentShippingOption.prototype.amount;
|
|
259
|
+
/** @type {boolean|undefined} */
|
|
260
|
+
PaymentShippingOption.prototype.selected;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @constructor
|
|
264
|
+
* @implements {EventTarget}
|
|
265
|
+
* @see https://w3c.github.io/payment-request/#paymentresponse-interface
|
|
266
|
+
*/
|
|
267
|
+
function PaymentResponse() {}
|
|
268
|
+
/**
|
|
269
|
+
* @return {!Object}
|
|
270
|
+
* @override
|
|
271
|
+
*/
|
|
272
|
+
PaymentResponse.prototype.toJSON = function() {};
|
|
273
|
+
/** @const {string} */
|
|
274
|
+
PaymentResponse.prototype.requestId;
|
|
275
|
+
/** @const {string} */
|
|
276
|
+
PaymentResponse.prototype.methodName;
|
|
277
|
+
/** @const {!Object} */
|
|
278
|
+
PaymentResponse.prototype.details;
|
|
279
|
+
/** @const {?PaymentAddress} */
|
|
280
|
+
PaymentResponse.prototype.shippingAddress;
|
|
281
|
+
/** @const {?string} */
|
|
282
|
+
PaymentResponse.prototype.shippingOption;
|
|
283
|
+
/** @const {?string} */
|
|
284
|
+
PaymentResponse.prototype.payerName;
|
|
285
|
+
/** @const {?string} */
|
|
286
|
+
PaymentResponse.prototype.payerEmail;
|
|
287
|
+
/** @const {?string} */
|
|
288
|
+
PaymentResponse.prototype.payerPhone;
|
|
289
|
+
/**
|
|
290
|
+
* @param {string=} result
|
|
291
|
+
* @return {!Promise<undefined>}
|
|
292
|
+
*/
|
|
293
|
+
PaymentResponse.prototype.complete = function(result) {};
|
|
294
|
+
/**
|
|
295
|
+
* @param {!PaymentValidationErrors=} errorFields
|
|
296
|
+
* @return {!Promise<undefined>}
|
|
297
|
+
*/
|
|
298
|
+
PaymentResponse.prototype.retry = function(errorFields) {};
|
|
299
|
+
/** @type {?function(!Event)} */
|
|
300
|
+
PaymentResponse.prototype.onpayerdetailchange;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @record
|
|
304
|
+
* @see https://w3c.github.io/payment-request/#paymentvalidationerrors-dictionary
|
|
305
|
+
*/
|
|
306
|
+
function PaymentValidationErrors() {};
|
|
307
|
+
/** @type {!PayerErrors|undefined} */
|
|
308
|
+
PaymentValidationErrors.prototype.payer;
|
|
309
|
+
/** @type {!AddressErrors|undefined} */
|
|
310
|
+
PaymentValidationErrors.prototype.shippingAddress;
|
|
311
|
+
/** @type {string|undefined} */
|
|
312
|
+
PaymentValidationErrors.prototype.error;
|
|
313
|
+
/** @type {!Object|undefined} */
|
|
314
|
+
PaymentValidationErrors.prototype.paymentMethod;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @record
|
|
318
|
+
* @see https://w3c.github.io/payment-request/#payererrors-dictionary
|
|
319
|
+
*/
|
|
320
|
+
function PayerErrors() {};
|
|
321
|
+
/** @type {string|undefined} */
|
|
322
|
+
PayerErrors.prototype.email;
|
|
323
|
+
/** @type {string|undefined} */
|
|
324
|
+
PayerErrors.prototype.name;
|
|
325
|
+
/** @type {string|undefined} */
|
|
326
|
+
PayerErrors.prototype.phone;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @constructor
|
|
330
|
+
* @param {string} type
|
|
331
|
+
* @param {!MerchantValidationEventInit=} eventInitDict
|
|
332
|
+
* @extends {Event}
|
|
333
|
+
* @see https://w3c.github.io/payment-request/#merchantvalidationevent-interface
|
|
334
|
+
*/
|
|
335
|
+
function MerchantValidationEvent(type, eventInitDict) {};
|
|
336
|
+
/** @const {string} */
|
|
337
|
+
MerchantValidationEvent.prototype.methodName;
|
|
338
|
+
/** @const {string} */
|
|
339
|
+
MerchantValidationEvent.prototype.validationURL;
|
|
340
|
+
/**
|
|
341
|
+
* @param {!Promise<undefined>} merchantSessionPromise
|
|
342
|
+
* @return {undefined}
|
|
343
|
+
*/
|
|
344
|
+
MerchantValidationEvent.prototype.complete = function(
|
|
345
|
+
merchantSessionPromise) {};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @extends {EventInit}
|
|
349
|
+
* @record
|
|
350
|
+
* @see https://w3c.github.io/payment-request/#merchantvalidationeventinit-dictionary
|
|
351
|
+
*/
|
|
352
|
+
function MerchantValidationEventInit() {};
|
|
353
|
+
/** @type {string|undefined} */
|
|
354
|
+
MerchantValidationEventInit.prototype.methodName;
|
|
355
|
+
/** @type {string|undefined} */
|
|
356
|
+
MerchantValidationEventInit.prototype.validationURL;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @constructor
|
|
360
|
+
* @param {string} type
|
|
361
|
+
* @param {!PaymentMethodChangeEventInit=} eventInitDict
|
|
362
|
+
* @extends {PaymentRequestUpdateEvent}
|
|
363
|
+
* @see https://w3c.github.io/payment-request/#paymentmethodchangeevent-interface
|
|
364
|
+
*/
|
|
365
|
+
function PaymentMethodChangeEvent(type, eventInitDict) {};
|
|
366
|
+
/** @const {string} */
|
|
367
|
+
PaymentMethodChangeEvent.prototype.methodName;
|
|
368
|
+
/** @const {?Object} */
|
|
369
|
+
PaymentMethodChangeEvent.prototype.methodDetails;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @extends {PaymentRequestUpdateEventInit}
|
|
373
|
+
* @record
|
|
374
|
+
* @see https://w3c.github.io/payment-request/#paymentmethodchangeeventinit-dictionary
|
|
375
|
+
*/
|
|
376
|
+
function PaymentMethodChangeEventInit() {};
|
|
377
|
+
/** @type {string|undefined} */
|
|
378
|
+
PaymentMethodChangeEventInit.prototype.methodName;
|
|
379
|
+
/** @type {?Object|undefined} */
|
|
380
|
+
PaymentMethodChangeEventInit.prototype.methodDetails;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* @constructor
|
|
384
|
+
* @param {string} type
|
|
385
|
+
* @param {!PaymentRequestUpdateEventInit=} eventInitDict
|
|
386
|
+
* @extends {Event}
|
|
387
|
+
* @see https://w3c.github.io/payment-request/#paymentrequestupdateevent-interface
|
|
388
|
+
*/
|
|
389
|
+
function PaymentRequestUpdateEvent(type, eventInitDict) {};
|
|
390
|
+
/**
|
|
391
|
+
* @param {!Promise<!PaymentDetailsUpdate>} detailsPromise
|
|
392
|
+
* @return {undefined}
|
|
393
|
+
*/
|
|
394
|
+
PaymentRequestUpdateEvent.prototype.updateWith = function(detailsPromise) {};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @extends {EventInit}
|
|
398
|
+
* @record
|
|
399
|
+
* @see https://w3c.github.io/payment-request/#paymentrequestupdateeventinit-dictionary
|
|
400
|
+
*/
|
|
401
|
+
function PaymentRequestUpdateEventInit() {};
|
|
@@ -0,0 +1,112 @@
|
|
|
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 Permissions API.
|
|
19
|
+
* @see https://w3c.github.io/permissions/
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @record
|
|
27
|
+
* @struct
|
|
28
|
+
* @see https://w3c.github.io/permissions/#permission-descriptor
|
|
29
|
+
*/
|
|
30
|
+
var PermissionDescriptor = function() {};
|
|
31
|
+
|
|
32
|
+
/** @type {!PermissionName} */
|
|
33
|
+
PermissionDescriptor.prototype.name;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {{name: PermissionName, userVisibleOnly: boolean}}
|
|
38
|
+
* @see https://w3c.github.io/permissions/#push
|
|
39
|
+
*/
|
|
40
|
+
var PushPermissionDescriptor;
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @typedef {{name: PermissionName, sysex: boolean}}
|
|
45
|
+
* @see https://w3c.github.io/permissions/#midi
|
|
46
|
+
*/
|
|
47
|
+
var MidiPermissionDescriptor;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Set of possible values: 'geolocation', 'notifications', 'push', 'midi'.
|
|
52
|
+
* @typedef {string}
|
|
53
|
+
* @see https://w3c.github.io/permissions/#idl-def-PermissionName
|
|
54
|
+
*/
|
|
55
|
+
var PermissionName;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Set of possible values: 'granted', 'denied', 'prompt'.
|
|
60
|
+
* @typedef {string}
|
|
61
|
+
* @see https://w3c.github.io/permissions/#idl-def-PermissionState
|
|
62
|
+
*/
|
|
63
|
+
var PermissionState;
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @constructor
|
|
68
|
+
* @implements {EventTarget}
|
|
69
|
+
* @see https://w3c.github.io/permissions/#status-of-a-permission
|
|
70
|
+
*/
|
|
71
|
+
function PermissionStatus() {}
|
|
72
|
+
|
|
73
|
+
/** @type {PermissionState} */
|
|
74
|
+
PermissionStatus.prototype.state;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @type {PermissionState}
|
|
78
|
+
* @deprecated, use PermissionStatus.state for newer clients
|
|
79
|
+
*/
|
|
80
|
+
PermissionStatus.prototype.status;
|
|
81
|
+
|
|
82
|
+
/** @type {?function(!Event)} */
|
|
83
|
+
PermissionStatus.prototype.onchange;
|
|
84
|
+
|
|
85
|
+
/** @override */
|
|
86
|
+
PermissionStatus.prototype.addEventListener = function(
|
|
87
|
+
type, listener, opt_options) {};
|
|
88
|
+
|
|
89
|
+
/** @override */
|
|
90
|
+
PermissionStatus.prototype.removeEventListener = function(
|
|
91
|
+
type, listener, opt_options) {};
|
|
92
|
+
|
|
93
|
+
/** @override */
|
|
94
|
+
PermissionStatus.prototype.dispatchEvent = function(evt) {};
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @constructor
|
|
99
|
+
* @see https://w3c.github.io/permissions/#idl-def-permissions
|
|
100
|
+
*/
|
|
101
|
+
function Permissions() {}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @param {!PermissionDescriptor} permission The permission to look up
|
|
105
|
+
* @return {!Promise<!PermissionStatus>}
|
|
106
|
+
* @see https://w3c.github.io/permissions/#dom-permissions-query
|
|
107
|
+
*/
|
|
108
|
+
Permissions.prototype.query = function(permission) {};
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/** @type {Permissions} */
|
|
112
|
+
Navigator.prototype.permissions;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 W3C's Permissions Policy API and Feature Policy API.
|
|
19
|
+
* @see https://w3c.github.io/webappsec-permissions-policy/
|
|
20
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy
|
|
21
|
+
*
|
|
22
|
+
* @externs
|
|
23
|
+
* @author zhengwe@google.com (Zheng Wei)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @interface
|
|
28
|
+
* @see https://w3c.github.io/webappsec-permissions-policy/#the-policy-object
|
|
29
|
+
*/
|
|
30
|
+
function PermissionsPolicy() {}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {string} feature
|
|
34
|
+
* @param {string=} origin
|
|
35
|
+
* @return {boolean}
|
|
36
|
+
*/
|
|
37
|
+
PermissionsPolicy.prototype.allowsFeature = function(feature, origin) {};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @return {!Array<string>}
|
|
41
|
+
*/
|
|
42
|
+
PermissionsPolicy.prototype.features = function() {};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @return {!Array<string>}
|
|
46
|
+
*/
|
|
47
|
+
PermissionsPolicy.prototype.allowedFeatures = function() {};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} feature
|
|
51
|
+
* @return {!Array<string>}
|
|
52
|
+
*/
|
|
53
|
+
PermissionsPolicy.prototype.getAllowlistForFeature = function(feature) {};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @type {!PermissionsPolicy|undefined}
|
|
57
|
+
*/
|
|
58
|
+
Document.prototype.featurePolicy;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @type {!PermissionsPolicy|undefined}
|
|
62
|
+
* @see https://w3c.github.io/webappsec-permissions-policy/#the-policy-object
|
|
63
|
+
*/
|
|
64
|
+
Document.prototype.permissionsPolicy;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @type {!PermissionsPolicy|undefined}
|
|
68
|
+
* @see https://w3c.github.io/webappsec-permissions-policy/#the-policy-object
|
|
69
|
+
*/
|
|
70
|
+
HTMLIFrameElement.prototype.featurePolicy;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @type {!PermissionsPolicy|undefined}
|
|
74
|
+
* @see https://w3c.github.io/webappsec-permissions-policy/#the-policy-object
|
|
75
|
+
*/
|
|
76
|
+
HTMLIFrameElement.prototype.permissionsPolicy;
|
|
77
|
+
|
|
78
|
+
|