-
Notifications
You must be signed in to change notification settings - Fork 0
/
non-standard-stuff.d.ts
371 lines (303 loc) · 9.51 KB
/
non-standard-stuff.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// Various non-standard features that are not part of any specification
// Chromium, Firefox & WebKit:
interface Screen {
availLeft: number;
availTop: number;
}
// Chromium:
declare namespace chrome {
var app: any;
function csi(): {
onloadT: DOMHighResTimeStamp,
pageT: DOMHighResTimeStamp,
startE: DOMHighResTimeStamp,
tran: number,
};
function loadTimes(): {
commitLoadTime: DOMHighResTimeStamp,
connectionInfo: string,
finishDocumentLoadTime: DOMHighResTimeStamp,
finishLoadTime: DOMHighResTimeStamp,
firstPaintAfterLoadTime: DOMHighResTimeStamp,
firstPaintTime: DOMHighResTimeStamp,
navigationType: string,
npnNegotiatedProtocol: string,
requestTime: DOMHighResTimeStamp,
startLoadTime: DOMHighResTimeStamp,
wasAlternateProtocolAvailable: boolean,
wasFetchedViaSpdy: boolean,
wasNpnNegotiated: boolean,
};
}
declare namespace Intl {
type v8BreakIteratorType = (
| "character"
| "word"
| "sentence"
| "line"
);
type v8BreakIteratorBreakType = (
| "none"
| "number"
| "letter"
| "kana"
| "ideo"
| "unknown"
);
interface v8BreakIteratorOptions {
type: Intl.v8BreakIteratorType;
}
interface Resolvedv8BreakIteratorOptions {
locale: string;
type: Intl.v8BreakIteratorType;
}
interface v8BreakIterator {
first(): number;
next(): number;
current(): number;
adoptText(text: string): void;
breakType(): Intl.v8BreakIteratorBreakType;
resolvedOptions(): Intl.Resolvedv8BreakIteratorOptions;
}
const v8BreakIterator: {
new(locales?: string | string[], options?: Intl.v8BreakIteratorOptions): Intl.v8BreakIterator;
supportedLocalesOf(locales: string | string[]): string[];
};
}
interface Performance {
readonly memory: MemoryInfo;
}
interface MemoryInfo {
readonly jsHeapSizeLimit: number;
readonly totalJSHeapSize: number;
readonly usedJSHeapSize: number;
}
interface GPUAdapterInfo {
readonly driver: string;
}
// Storage Pressure Event (https://github.com/jarryd999/storage-pressure-event):
interface StorageManagerEventMap {
"quotachange": Event;
}
interface StorageManager extends EventTarget {
onquotachange: ((this: StorageManager, ev: Event) => any) | null;
addEventListener<K extends keyof StorageManagerEventMap>(type: K, listener: (this: StorageManager, ev: StorageManagerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof StorageManagerEventMap>(type: K, listener: (this: StorageManager, ev: StorageManagerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
// Chromium & WebKit:
interface Element {
scrollIntoViewIfNeeded(centerIfNeeded: boolean): void;
}
declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
declare function webkitCancelAnimationFrame(handle: number): void;
// WebKit:
// https://github.com/WebKit/WebKit/tree/main/Source/WebCore/Modules/applepay
declare var ApplePayAutomaticReloadPaymentRequest: any;
declare var ApplePayCancelEvent: any;
declare var ApplePayContactField: any;
declare var ApplePayCouponCodeChangedEvent: any;
declare var ApplePayCouponCodeDetails: any;
declare var ApplePayCouponCodeUpdate: any;
declare var ApplePayDateComponents: any;
declare var ApplePayDateComponentsRange: any;
declare var ApplePayDeferredPaymentRequest: any;
declare var ApplePayDetailsUpdateBase: any;
declare var ApplePayError: any;
declare var ApplePayErrorCode: any;
declare var ApplePayErrorContactField: any;
declare var ApplePayFeature: any;
declare var ApplePayInstallmentConfiguration: any;
declare var ApplePayInstallmentItem: any;
declare var ApplePayInstallmentItemType: any;
declare var ApplePayInstallmentRetailChannel: any;
declare var ApplePayLaterAvailability: any;
declare var ApplePayLineItem: any;
declare var ApplePayMerchantCapability: any;
declare var ApplePayPayment: any;
declare var ApplePayPaymentAuthorizationResult: any;
declare var ApplePayPaymentAuthorizedEvent: any;
declare var ApplePayPaymentContact: any;
declare var ApplePayPaymentMethod: any;
declare var ApplePayPaymentMethodSelectedEvent: any;
declare var ApplePayPaymentMethodType: any;
declare var ApplePayPaymentMethodUpdate: any;
declare var ApplePayPaymentOrderDetails: any;
declare var ApplePayPaymentPass: any;
declare var ApplePayPaymentRequest: any;
declare var ApplePayPaymentTiming: any;
declare var ApplePayPaymentTokenContext: any;
declare var ApplePayRecurringPaymentDateUnit: any;
declare var ApplePayRecurringPaymentRequest: any;
declare var ApplePayRequestBase: any;
declare var ApplePaySession: any;
declare var ApplePaySessionError: any;
declare var ApplePaySetup: any;
declare var ApplePaySetupConfiguration: any;
declare var ApplePaySetupFeature: any;
declare var ApplePaySetupFeatureState: any;
declare var ApplePaySetupFeatureType: any;
declare var ApplePayShippingContactEditingMode: any;
declare var ApplePayShippingContactSelectedEvent: any;
declare var ApplePayShippingContactUpdate: any;
declare var ApplePayShippingMethod: any;
declare var ApplePayShippingMethodSelectedEvent: any;
declare var ApplePayShippingMethodUpdate: any;
declare var ApplePayValidateMerchantEvent: any;
interface Navigator {
readonly standalone: boolean;
}
// Brave:
interface Brave {
isBrave(): Promise<boolean>;
}
declare var Brave: {
prototype: Brave;
};
interface Navigator {
brave: Brave;
}
// Opera:
declare var g_opr: {
scrap(): void;
};
declare var isOpera: boolean;
// Ulaa:
declare var ulaa: {
getVersion(): string;
};
// Samsung Internet:
declare var News: {
isHomepageNewsFeed(...args: any[]): any;
setHomepageAsNewsFeed(...args: any[]): any;
};
declare var QuickAccess: {
deleteItems(...args: any[]): any;
enterEditMode(...args: any[]): any;
enterPrivacyBoard(...args: any[]): any;
getItems(...args: any[]): any;
getPrivacyDashboardData(...args: any[]): any;
isNightModeEnabled(...args: any[]): any;
isPrivacyBoardEnabled(...args: any[]): any;
isRefererCleanerEnabled(...args: any[]): any;
isSecretMode(...args: any[]): any;
isSetAsHomePage(...args: any[]): any;
requestPrivacyDashbordData(...args: any[]): any;
sendSILog(...args: any[]): any;
showAddDialog(...args: any[]): any;
showQuickAccessSettings(...args: any[]): any;
showRenameDialog(...args: any[]): any;
turnOnPrivacyFeature(...args: any[]): any;
};
// DuckDuckGo Android:
declare var AutoconsentAndroid: any;
declare var BlobConverter: any;
declare var BrowserAutofill: any;
declare var EmailInterface: any;
declare var LoginDetection: any;
declare var Print: any;
// DuckDuckGo Desktop:
declare function gc(): void;
interface Navigator {
readonly duckduckgo: {
isDuckDuckGo(): Promise<boolean>;
readonly platform: string;
readonly taintedOrigins: Set<any>;
readonly taints: Set<any>;
};
}
// Microsoft Edge:
interface SpeechSynthesis {
preload(arg1: any, arg2: any[]): void;
}
interface HTMLVideoElement {
readonly msVideoProcessing: string;
msGetVideoProcessingTypes(): string[];
}
type MicrosoftHostEnvironmentValueName = (
| "os-architecture"
| "os-build"
| "os-mode"
| "os-sku"
);
interface External {
// https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/mt795399(v=vs.85)
getHostEnvironmentValue(name: MicrosoftHostEnvironmentValueName): string | null;
}
declare var videoAdsBlockerNativeHandler: {
logBlockSuccess: any
};
// Vivaldi:
interface DataTransfer {
SetURLAndTitle(url: string, title: string): void;
}
// Google Go:
declare var __gg__: {
karaokeNavigateToParagraph(...args: any[]): any;
loadElementCss(...args: any[]): any;
loadElementJs(...args: any[]): any;
translateNotifyApiReady(...args: any[]): any;
translateNotifyDetectionError(...args: any[]): any;
translateNotifyError(...args: any[]): any;
translateNotifyFinished(...args: any[]): any;
translateRemoteApiProxyCancel(...args: any[]): any;
translateRemoteApiProxyIsSupported(...args: any[]): any;
translateRemoteApiProxySend(...args: any[]): any;
translateSetSourceLanguage(...args: any[]): any;
}
declare var gmaSdk: {
getClickSignals(...args: any[]): any;
getClickSignalsWithTimeout(...args: any[]): any;
getQueryInfo(...args: any[]): any;
getViewSignals(...args: any[]): any;
getViewSignalsWithTimeout(...args: any[]): any;
recordClick(...args: any[]): any;
reportTouchEvent(...args: any[]): any;
}
// Firefox:
interface Navigator {
taintEnabled(): boolean;
readonly oscpu: string;
}
interface CSSMozDocumentRule { }
declare var CSSMozDocumentRule: {
prototype: CSSMozDocumentRule;
};
declare function dump(message: string): void;
interface DeviceLightEventInit extends EventInit {
value: number;
}
declare var DeviceLightEvent: {
prototype: DeviceLightEvent;
new(name: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
}
interface DeviceLightEvent extends Event {
readonly value: number;
}
/** @deprecated */
declare var ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null;
interface GlobalEventHandlersEventMap {
"devicelight": DeviceLightEvent;
}
interface DataTransfer {
addElement(element: Element): void;
}
declare var CSS2Properties: any;
interface DataTransfer {
addElement(): any;
mozCursor(): any;
mozSourceNode(): any;
mozUserCancelled(): any;
}
interface Directory {
getfiles(): any;
getfilesAndDirectories(): any;
path: any;
}
declare var Directory: {
prototype: Directory;
};
// Servo:
declare var webdriverTimeout: any;
declare var webdriverCallback: any;