cddl2ts 0.3.0 → 0.4.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/.release-it.ts +14 -0
- package/LICENSE +1 -1
- package/README.md +5 -9
- package/changelogithub.config.ts +6 -0
- package/cli-examples/local.ts +1013 -0
- package/cli-examples/remote.ts +1520 -0
- package/cli-examples/tsconfig.json +12 -0
- package/package.json +18 -34
- package/src/cli.ts +42 -0
- package/src/constants.ts +6 -0
- package/src/index.ts +652 -0
- package/src/utils.ts +61 -0
- package/tests/__snapshots__/group_choice.test.ts.snap +72 -0
- package/tests/__snapshots__/literals.test.ts.snap +8 -0
- package/tests/__snapshots__/mixin_union.test.ts.snap +19 -0
- package/tests/__snapshots__/mod.test.ts.snap +102 -0
- package/tests/__snapshots__/repro_proxy.test.ts.snap +14 -0
- package/tests/__snapshots__/union_extension.test.ts.snap +18 -0
- package/tests/__snapshots__/webdriver_local.test.ts.snap +1017 -0
- package/tests/__snapshots__/webdriver_remote.test.ts.snap +1524 -0
- package/tests/complex_types.test.ts +54 -0
- package/tests/group_choice.test.ts +53 -0
- package/tests/literals.test.ts +45 -0
- package/tests/mixin_union.test.ts +56 -0
- package/tests/mod.test.ts +74 -0
- package/tests/named_group_choice.test.ts +47 -0
- package/tests/transform.test.ts +21 -0
- package/tests/unknown.test.ts +51 -0
- package/tests/webdriver_local.test.ts +43 -0
- package/tests/webdriver_remote.test.ts +43 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,1520 @@
|
|
|
1
|
+
export type Command = CommandData & Extensible & {
|
|
2
|
+
id: JsUint;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type CommandData = BrowserCommand | BrowsingContextCommand | EmulationCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand | StorageCommand | WebExtensionCommand;
|
|
6
|
+
export type EmptyParams = Extensible;
|
|
7
|
+
export type Extensible = Record<string, unknown>;
|
|
8
|
+
export type JsInt = number;
|
|
9
|
+
export type JsUint = number;
|
|
10
|
+
export type SessionCommand = SessionEnd | SessionNew | SessionStatus | SessionSubscribe | SessionUnsubscribe;
|
|
11
|
+
|
|
12
|
+
export interface SessionCapabilitiesRequest {
|
|
13
|
+
alwaysMatch?: SessionCapabilityRequest;
|
|
14
|
+
firstMatch?: SessionCapabilityRequest[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type SessionCapabilityRequest = Extensible & {
|
|
18
|
+
acceptInsecureCerts?: boolean;
|
|
19
|
+
browserName?: string;
|
|
20
|
+
browserVersion?: string;
|
|
21
|
+
platformName?: string;
|
|
22
|
+
proxy?: SessionProxyConfiguration;
|
|
23
|
+
unhandledPromptBehavior?: SessionUserPromptHandler;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type SessionProxyConfiguration = SessionAutodetectProxyConfiguration | SessionDirectProxyConfiguration | SessionManualProxyConfiguration | SessionPacProxyConfiguration | SessionSystemProxyConfiguration;
|
|
27
|
+
|
|
28
|
+
export type SessionAutodetectProxyConfiguration = Extensible & {
|
|
29
|
+
proxyType: "autodetect";
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type SessionDirectProxyConfiguration = Extensible & {
|
|
33
|
+
proxyType: "direct";
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type SessionManualProxyConfiguration = SessionSocksProxyConfiguration & Extensible & {
|
|
37
|
+
proxyType: "manual";
|
|
38
|
+
httpProxy?: string;
|
|
39
|
+
sslProxy?: string;
|
|
40
|
+
noProxy?: string[];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export interface SessionSocksProxyConfiguration {
|
|
44
|
+
socksProxy: string;
|
|
45
|
+
socksVersion: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type SessionPacProxyConfiguration = Extensible & {
|
|
49
|
+
proxyType: "pac";
|
|
50
|
+
proxyAutoconfigUrl: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type SessionSystemProxyConfiguration = Extensible & {
|
|
54
|
+
proxyType: "system";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export interface SessionUserPromptHandler {
|
|
58
|
+
alert?: SessionUserPromptHandlerType;
|
|
59
|
+
beforeUnload?: SessionUserPromptHandlerType;
|
|
60
|
+
confirm?: SessionUserPromptHandlerType;
|
|
61
|
+
default?: SessionUserPromptHandlerType;
|
|
62
|
+
file?: SessionUserPromptHandlerType;
|
|
63
|
+
prompt?: SessionUserPromptHandlerType;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type SessionUserPromptHandlerType = "accept" | "dismiss" | "ignore";
|
|
67
|
+
export type SessionSubscription = string;
|
|
68
|
+
|
|
69
|
+
export interface SessionSubscribeParameters {
|
|
70
|
+
events: string[];
|
|
71
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
72
|
+
userContexts?: BrowserUserContext[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface SessionUnsubscribeByIdRequest {
|
|
76
|
+
subscriptions: SessionSubscription[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface SessionUnsubscribeByAttributesRequest {
|
|
80
|
+
events: string[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface SessionStatus {
|
|
84
|
+
method: "session.status";
|
|
85
|
+
params: EmptyParams;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface SessionNew {
|
|
89
|
+
method: "session.new";
|
|
90
|
+
params: SessionNewParameters;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface SessionNewParameters {
|
|
94
|
+
capabilities: SessionCapabilitiesRequest;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface SessionEnd {
|
|
98
|
+
method: "session.end";
|
|
99
|
+
params: EmptyParams;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface SessionSubscribe {
|
|
103
|
+
method: "session.subscribe";
|
|
104
|
+
params: SessionSubscribeParameters;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface SessionUnsubscribe {
|
|
108
|
+
method: "session.unsubscribe";
|
|
109
|
+
params: SessionUnsubscribeParameters;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type SessionUnsubscribeParameters = SessionUnsubscribeByAttributesRequest | SessionUnsubscribeByIdRequest;
|
|
113
|
+
export type BrowserCommand = BrowserClose | BrowserCreateUserContext | BrowserGetClientWindows | BrowserGetUserContexts | BrowserRemoveUserContext | BrowserSetClientWindowState | BrowserSetDownloadBehavior;
|
|
114
|
+
export type BrowserClientWindow = string;
|
|
115
|
+
|
|
116
|
+
export interface BrowserClientWindowInfo {
|
|
117
|
+
active: boolean;
|
|
118
|
+
clientWindow: BrowserClientWindow;
|
|
119
|
+
height: JsUint;
|
|
120
|
+
state: "fullscreen" | "maximized" | "minimized" | "normal";
|
|
121
|
+
width: JsUint;
|
|
122
|
+
x: JsInt;
|
|
123
|
+
y: JsInt;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type BrowserUserContext = string;
|
|
127
|
+
|
|
128
|
+
export interface BrowserUserContextInfo {
|
|
129
|
+
userContext: BrowserUserContext;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface BrowserClose {
|
|
133
|
+
method: "browser.close";
|
|
134
|
+
params: EmptyParams;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface BrowserCreateUserContext {
|
|
138
|
+
method: "browser.createUserContext";
|
|
139
|
+
params: BrowserCreateUserContextParameters;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface BrowserCreateUserContextParameters {
|
|
143
|
+
acceptInsecureCerts?: boolean;
|
|
144
|
+
proxy?: SessionProxyConfiguration;
|
|
145
|
+
unhandledPromptBehavior?: SessionUserPromptHandler;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface BrowserGetClientWindows {
|
|
149
|
+
method: "browser.getClientWindows";
|
|
150
|
+
params: EmptyParams;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface BrowserGetUserContexts {
|
|
154
|
+
method: "browser.getUserContexts";
|
|
155
|
+
params: EmptyParams;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface BrowserRemoveUserContext {
|
|
159
|
+
method: "browser.removeUserContext";
|
|
160
|
+
params: BrowserRemoveUserContextParameters;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface BrowserRemoveUserContextParameters {
|
|
164
|
+
userContext: BrowserUserContext;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface BrowserSetClientWindowState {
|
|
168
|
+
method: "browser.setClientWindowState";
|
|
169
|
+
params: BrowserSetClientWindowStateParameters;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type BrowserSetClientWindowStateParameters = (BrowserClientWindowNamedState | BrowserClientWindowRectState) & {
|
|
173
|
+
clientWindow: BrowserClientWindow;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export interface BrowserClientWindowNamedState {
|
|
177
|
+
state: "fullscreen" | "maximized" | "minimized";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface BrowserClientWindowRectState {
|
|
181
|
+
state: "normal";
|
|
182
|
+
width?: JsUint;
|
|
183
|
+
height?: JsUint;
|
|
184
|
+
x?: JsInt;
|
|
185
|
+
y?: JsInt;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface BrowserSetDownloadBehavior {
|
|
189
|
+
method: "browser.setDownloadBehavior";
|
|
190
|
+
params: BrowserSetDownloadBehaviorParameters;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface BrowserSetDownloadBehaviorParameters {
|
|
194
|
+
downloadBehavior: BrowserDownloadBehavior | null;
|
|
195
|
+
userContexts?: BrowserUserContext[];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type BrowserDownloadBehavior = (BrowserDownloadBehaviorAllowed | BrowserDownloadBehaviorDenied);
|
|
199
|
+
|
|
200
|
+
export interface BrowserDownloadBehaviorAllowed {
|
|
201
|
+
type: "allowed";
|
|
202
|
+
destinationFolder: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface BrowserDownloadBehaviorDenied {
|
|
206
|
+
type: "denied";
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetBypassCsp | BrowsingContextSetViewport | BrowsingContextTraverseHistory;
|
|
210
|
+
export type BrowsingContextBrowsingContext = string;
|
|
211
|
+
export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextContextLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
|
|
212
|
+
|
|
213
|
+
export interface BrowsingContextAccessibilityLocator {
|
|
214
|
+
type: "accessibility";
|
|
215
|
+
value: {
|
|
216
|
+
name?: string;
|
|
217
|
+
role?: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface BrowsingContextCssLocator {
|
|
222
|
+
type: "css";
|
|
223
|
+
value: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface BrowsingContextContextLocator {
|
|
227
|
+
type: "context";
|
|
228
|
+
value: {
|
|
229
|
+
context: BrowsingContextBrowsingContext;
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface BrowsingContextInnerTextLocator {
|
|
234
|
+
type: "innerText";
|
|
235
|
+
value: string;
|
|
236
|
+
ignoreCase?: boolean;
|
|
237
|
+
matchType?: "full" | "partial";
|
|
238
|
+
maxDepth?: JsUint;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface BrowsingContextXPathLocator {
|
|
242
|
+
type: "xpath";
|
|
243
|
+
value: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export type BrowsingContextNavigation = string;
|
|
247
|
+
export type BrowsingContextReadinessState = "none" | "interactive" | "complete";
|
|
248
|
+
export type BrowsingContextUserPromptType = "alert" | "beforeunload" | "confirm" | "prompt";
|
|
249
|
+
|
|
250
|
+
export interface BrowsingContextActivate {
|
|
251
|
+
method: "browsingContext.activate";
|
|
252
|
+
params: BrowsingContextActivateParameters;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface BrowsingContextActivateParameters {
|
|
256
|
+
context: BrowsingContextBrowsingContext;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface BrowsingContextCaptureScreenshot {
|
|
260
|
+
method: "browsingContext.captureScreenshot";
|
|
261
|
+
params: BrowsingContextCaptureScreenshotParameters;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface BrowsingContextCaptureScreenshotParameters {
|
|
265
|
+
context: BrowsingContextBrowsingContext;
|
|
266
|
+
/**
|
|
267
|
+
* @default 'viewport'
|
|
268
|
+
*/
|
|
269
|
+
origin?: "viewport" | "document";
|
|
270
|
+
format?: BrowsingContextImageFormat;
|
|
271
|
+
clip?: BrowsingContextClipRectangle;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface BrowsingContextImageFormat {
|
|
275
|
+
type: string;
|
|
276
|
+
quality?: number;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export type BrowsingContextClipRectangle = BrowsingContextBoxClipRectangle | BrowsingContextElementClipRectangle;
|
|
280
|
+
|
|
281
|
+
export interface BrowsingContextElementClipRectangle {
|
|
282
|
+
type: "element";
|
|
283
|
+
element: ScriptSharedReference;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface BrowsingContextBoxClipRectangle {
|
|
287
|
+
type: "box";
|
|
288
|
+
x: number;
|
|
289
|
+
y: number;
|
|
290
|
+
width: number;
|
|
291
|
+
height: number;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface BrowsingContextClose {
|
|
295
|
+
method: "browsingContext.close";
|
|
296
|
+
params: BrowsingContextCloseParameters;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface BrowsingContextCloseParameters {
|
|
300
|
+
context: BrowsingContextBrowsingContext;
|
|
301
|
+
promptUnload?: boolean;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface BrowsingContextCreate {
|
|
305
|
+
method: "browsingContext.create";
|
|
306
|
+
params: BrowsingContextCreateParameters;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export type BrowsingContextCreateType = "tab" | "window";
|
|
310
|
+
|
|
311
|
+
export interface BrowsingContextCreateParameters {
|
|
312
|
+
type: BrowsingContextCreateType;
|
|
313
|
+
referenceContext?: BrowsingContextBrowsingContext;
|
|
314
|
+
background?: boolean;
|
|
315
|
+
userContext?: BrowserUserContext;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface BrowsingContextGetTree {
|
|
319
|
+
method: "browsingContext.getTree";
|
|
320
|
+
params: BrowsingContextGetTreeParameters;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface BrowsingContextGetTreeParameters {
|
|
324
|
+
maxDepth?: JsUint;
|
|
325
|
+
root?: BrowsingContextBrowsingContext;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface BrowsingContextHandleUserPrompt {
|
|
329
|
+
method: "browsingContext.handleUserPrompt";
|
|
330
|
+
params: BrowsingContextHandleUserPromptParameters;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface BrowsingContextHandleUserPromptParameters {
|
|
334
|
+
context: BrowsingContextBrowsingContext;
|
|
335
|
+
accept?: boolean;
|
|
336
|
+
userText?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface BrowsingContextLocateNodes {
|
|
340
|
+
method: "browsingContext.locateNodes";
|
|
341
|
+
params: BrowsingContextLocateNodesParameters;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface BrowsingContextLocateNodesParameters {
|
|
345
|
+
context: BrowsingContextBrowsingContext;
|
|
346
|
+
locator: BrowsingContextLocator;
|
|
347
|
+
maxNodeCount?: JsUint;
|
|
348
|
+
serializationOptions?: ScriptSerializationOptions;
|
|
349
|
+
startNodes?: ScriptSharedReference[];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface BrowsingContextNavigate {
|
|
353
|
+
method: "browsingContext.navigate";
|
|
354
|
+
params: BrowsingContextNavigateParameters;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface BrowsingContextNavigateParameters {
|
|
358
|
+
context: BrowsingContextBrowsingContext;
|
|
359
|
+
url: string;
|
|
360
|
+
wait?: BrowsingContextReadinessState;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface BrowsingContextPrint {
|
|
364
|
+
method: "browsingContext.print";
|
|
365
|
+
params: BrowsingContextPrintParameters;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface BrowsingContextPrintParameters {
|
|
369
|
+
context: BrowsingContextBrowsingContext;
|
|
370
|
+
background?: boolean;
|
|
371
|
+
margin?: BrowsingContextPrintMarginParameters;
|
|
372
|
+
/**
|
|
373
|
+
* @default 'portrait'
|
|
374
|
+
*/
|
|
375
|
+
orientation?: "portrait" | "landscape";
|
|
376
|
+
page?: BrowsingContextPrintPageParameters;
|
|
377
|
+
pageRanges?: (JsUint | string)[];
|
|
378
|
+
/**
|
|
379
|
+
* @default 1
|
|
380
|
+
*/
|
|
381
|
+
scale?: number;
|
|
382
|
+
/**
|
|
383
|
+
* @default true
|
|
384
|
+
*/
|
|
385
|
+
shrinkToFit?: boolean;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export // Minimum size is 1pt x 1pt. Conversion follows from
|
|
389
|
+
// https://www.w3.org/TR/css3-values/#absolute-lengths
|
|
390
|
+
interface BrowsingContextPrintMarginParameters {
|
|
391
|
+
/**
|
|
392
|
+
* @default 1
|
|
393
|
+
*/
|
|
394
|
+
bottom?: number;
|
|
395
|
+
/**
|
|
396
|
+
* @default 1
|
|
397
|
+
*/
|
|
398
|
+
left?: number;
|
|
399
|
+
/**
|
|
400
|
+
* @default 1
|
|
401
|
+
*/
|
|
402
|
+
right?: number;
|
|
403
|
+
/**
|
|
404
|
+
* @default 1
|
|
405
|
+
*/
|
|
406
|
+
top?: number;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface BrowsingContextPrintPageParameters {
|
|
410
|
+
/**
|
|
411
|
+
* @default 27.94
|
|
412
|
+
*/
|
|
413
|
+
height?: number;
|
|
414
|
+
/**
|
|
415
|
+
* @default 21.59
|
|
416
|
+
*/
|
|
417
|
+
width?: number;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export interface BrowsingContextReload {
|
|
421
|
+
method: "browsingContext.reload";
|
|
422
|
+
params: BrowsingContextReloadParameters;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface BrowsingContextReloadParameters {
|
|
426
|
+
context: BrowsingContextBrowsingContext;
|
|
427
|
+
ignoreCache?: boolean;
|
|
428
|
+
wait?: BrowsingContextReadinessState;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface BrowsingContextSetBypassCsp {
|
|
432
|
+
method: "browsingContext.setBypassCSP";
|
|
433
|
+
params: BrowsingContextSetBypassCspParameters;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export interface BrowsingContextSetBypassCspParameters {
|
|
437
|
+
bypass: true | null;
|
|
438
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
439
|
+
userContexts?: BrowserUserContext[];
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface BrowsingContextSetViewport {
|
|
443
|
+
method: "browsingContext.setViewport";
|
|
444
|
+
params: BrowsingContextSetViewportParameters;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface BrowsingContextSetViewportParameters {
|
|
448
|
+
context?: BrowsingContextBrowsingContext;
|
|
449
|
+
viewport?: BrowsingContextViewport | null;
|
|
450
|
+
devicePixelRatio?: number | null;
|
|
451
|
+
userContexts?: BrowserUserContext[];
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface BrowsingContextViewport {
|
|
455
|
+
width: JsUint;
|
|
456
|
+
height: JsUint;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export interface BrowsingContextTraverseHistory {
|
|
460
|
+
method: "browsingContext.traverseHistory";
|
|
461
|
+
params: BrowsingContextTraverseHistoryParameters;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface BrowsingContextTraverseHistoryParameters {
|
|
465
|
+
context: BrowsingContextBrowsingContext;
|
|
466
|
+
delta: JsInt;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type EmulationCommand = EmulationSetForcedColorsModeThemeOverride | EmulationSetGeolocationOverride | EmulationSetLocaleOverride | EmulationSetNetworkConditions | EmulationSetScreenOrientationOverride | EmulationSetScreenSettingsOverride | EmulationSetScriptingEnabled | EmulationSetScrollbarTypeOverride | EmulationSetTimezoneOverride | EmulationSetTouchOverride | EmulationSetUserAgentOverride;
|
|
470
|
+
|
|
471
|
+
export interface EmulationSetForcedColorsModeThemeOverride {
|
|
472
|
+
method: "emulation.setForcedColorsModeThemeOverride";
|
|
473
|
+
params: EmulationSetForcedColorsModeThemeOverrideParameters;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export interface EmulationSetForcedColorsModeThemeOverrideParameters {
|
|
477
|
+
theme: EmulationForcedColorsModeTheme | null;
|
|
478
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
479
|
+
userContexts?: BrowserUserContext[];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export type EmulationForcedColorsModeTheme = "light" | "dark";
|
|
483
|
+
|
|
484
|
+
export interface EmulationSetGeolocationOverride {
|
|
485
|
+
method: "emulation.setGeolocationOverride";
|
|
486
|
+
params: EmulationSetGeolocationOverrideParameters;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export type EmulationSetGeolocationOverrideParameters = ({
|
|
490
|
+
coordinates: EmulationGeolocationCoordinates | null;
|
|
491
|
+
} | {
|
|
492
|
+
error: EmulationGeolocationPositionError;
|
|
493
|
+
}) & {
|
|
494
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
495
|
+
userContexts?: BrowserUserContext[];
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
export interface EmulationGeolocationCoordinates {
|
|
499
|
+
latitude: number;
|
|
500
|
+
longitude: number;
|
|
501
|
+
/**
|
|
502
|
+
* @default 1
|
|
503
|
+
*/
|
|
504
|
+
accuracy?: number;
|
|
505
|
+
/**
|
|
506
|
+
* @default null
|
|
507
|
+
*/
|
|
508
|
+
altitude?: number | null;
|
|
509
|
+
/**
|
|
510
|
+
* @default null
|
|
511
|
+
*/
|
|
512
|
+
altitudeAccuracy?: number | null;
|
|
513
|
+
/**
|
|
514
|
+
* @default null
|
|
515
|
+
*/
|
|
516
|
+
heading?: number | null;
|
|
517
|
+
/**
|
|
518
|
+
* @default null
|
|
519
|
+
*/
|
|
520
|
+
speed?: number | null;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface EmulationGeolocationPositionError {
|
|
524
|
+
type: "positionUnavailable";
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export interface EmulationSetLocaleOverride {
|
|
528
|
+
method: "emulation.setLocaleOverride";
|
|
529
|
+
params: EmulationSetLocaleOverrideParameters;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface EmulationSetLocaleOverrideParameters {
|
|
533
|
+
locale: string | null;
|
|
534
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
535
|
+
userContexts?: BrowserUserContext[];
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface EmulationSetNetworkConditions {
|
|
539
|
+
method: "emulation.setNetworkConditions";
|
|
540
|
+
params: EmulationSetNetworkConditionsParameters;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface EmulationSetNetworkConditionsParameters {
|
|
544
|
+
networkConditions: EmulationNetworkConditions | null;
|
|
545
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
546
|
+
userContexts?: BrowserUserContext[];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export type EmulationNetworkConditions = EmulationNetworkConditionsOffline;
|
|
550
|
+
|
|
551
|
+
export interface EmulationNetworkConditionsOffline {
|
|
552
|
+
type: "offline";
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export interface EmulationSetScreenSettingsOverride {
|
|
556
|
+
method: "emulation.setScreenSettingsOverride";
|
|
557
|
+
params: EmulationSetScreenSettingsOverrideParameters;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export interface EmulationScreenArea {
|
|
561
|
+
width: JsUint;
|
|
562
|
+
height: JsUint;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface EmulationSetScreenSettingsOverrideParameters {
|
|
566
|
+
screenArea: EmulationScreenArea | null;
|
|
567
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
568
|
+
userContexts?: BrowserUserContext[];
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export interface EmulationSetScreenOrientationOverride {
|
|
572
|
+
method: "emulation.setScreenOrientationOverride";
|
|
573
|
+
params: EmulationSetScreenOrientationOverrideParameters;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export type EmulationScreenOrientationNatural = "portrait" | "landscape";
|
|
577
|
+
export type EmulationScreenOrientationType = "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary";
|
|
578
|
+
|
|
579
|
+
export interface EmulationScreenOrientation {
|
|
580
|
+
natural: EmulationScreenOrientationNatural;
|
|
581
|
+
type: EmulationScreenOrientationType;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface EmulationSetScreenOrientationOverrideParameters {
|
|
585
|
+
screenOrientation: EmulationScreenOrientation | null;
|
|
586
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
587
|
+
userContexts?: BrowserUserContext[];
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
export interface EmulationSetUserAgentOverride {
|
|
591
|
+
method: "emulation.setUserAgentOverride";
|
|
592
|
+
params: EmulationSetUserAgentOverrideParameters;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export interface EmulationSetUserAgentOverrideParameters {
|
|
596
|
+
userAgent: string | null;
|
|
597
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
598
|
+
userContexts?: BrowserUserContext[];
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface EmulationSetScriptingEnabled {
|
|
602
|
+
method: "emulation.setScriptingEnabled";
|
|
603
|
+
params: EmulationSetScriptingEnabledParameters;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export interface EmulationSetScriptingEnabledParameters {
|
|
607
|
+
enabled: false | null;
|
|
608
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
609
|
+
userContexts?: BrowserUserContext[];
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export interface EmulationSetScrollbarTypeOverride {
|
|
613
|
+
method: "emulation.setScrollbarTypeOverride";
|
|
614
|
+
params: EmulationSetScrollbarTypeOverrideParameters;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export interface EmulationSetScrollbarTypeOverrideParameters {
|
|
618
|
+
scrollbarType: "classic" | "overlay" | null;
|
|
619
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
620
|
+
userContexts?: BrowserUserContext[];
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export interface EmulationSetTimezoneOverride {
|
|
624
|
+
method: "emulation.setTimezoneOverride";
|
|
625
|
+
params: EmulationSetTimezoneOverrideParameters;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export interface EmulationSetTimezoneOverrideParameters {
|
|
629
|
+
timezone: string | null;
|
|
630
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
631
|
+
userContexts?: BrowserUserContext[];
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface EmulationSetTouchOverride {
|
|
635
|
+
method: "emulation.setTouchOverride";
|
|
636
|
+
params: EmulationSetTouchOverrideParameters;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export interface EmulationSetTouchOverrideParameters {
|
|
640
|
+
maxTouchPoints: JsUint | null;
|
|
641
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
642
|
+
userContexts?: BrowserUserContext[];
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export type NetworkCommand = NetworkAddDataCollector | NetworkAddIntercept | NetworkContinueRequest | NetworkContinueResponse | NetworkContinueWithAuth | NetworkDisownData | NetworkFailRequest | NetworkGetData | NetworkProvideResponse | NetworkRemoveDataCollector | NetworkRemoveIntercept | NetworkSetCacheBehavior | NetworkSetExtraHeaders;
|
|
646
|
+
|
|
647
|
+
export interface NetworkAuthCredentials {
|
|
648
|
+
type: "password";
|
|
649
|
+
username: string;
|
|
650
|
+
password: string;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export type NetworkBytesValue = NetworkStringValue | NetworkBase64Value;
|
|
654
|
+
|
|
655
|
+
export interface NetworkStringValue {
|
|
656
|
+
type: "string";
|
|
657
|
+
value: string;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface NetworkBase64Value {
|
|
661
|
+
type: "base64";
|
|
662
|
+
value: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export type NetworkCollector = string;
|
|
666
|
+
export type NetworkCollectorType = "blob";
|
|
667
|
+
export type NetworkSameSite = "strict" | "lax" | "none" | "default";
|
|
668
|
+
|
|
669
|
+
export type NetworkCookie = Extensible & {
|
|
670
|
+
name: string;
|
|
671
|
+
value: NetworkBytesValue;
|
|
672
|
+
domain: string;
|
|
673
|
+
path: string;
|
|
674
|
+
size: JsUint;
|
|
675
|
+
httpOnly: boolean;
|
|
676
|
+
secure: boolean;
|
|
677
|
+
sameSite: NetworkSameSite;
|
|
678
|
+
expiry?: JsUint;
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
export interface NetworkCookieHeader {
|
|
682
|
+
name: string;
|
|
683
|
+
value: NetworkBytesValue;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export type NetworkDataType = "request" | "response";
|
|
687
|
+
|
|
688
|
+
export interface NetworkHeader {
|
|
689
|
+
name: string;
|
|
690
|
+
value: NetworkBytesValue;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export type NetworkIntercept = string;
|
|
694
|
+
export type NetworkRequest = string;
|
|
695
|
+
|
|
696
|
+
export interface NetworkSetCookieHeader {
|
|
697
|
+
name: string;
|
|
698
|
+
value: NetworkBytesValue;
|
|
699
|
+
domain?: string;
|
|
700
|
+
httpOnly?: boolean;
|
|
701
|
+
expiry?: string;
|
|
702
|
+
maxAge?: JsInt;
|
|
703
|
+
path?: string;
|
|
704
|
+
sameSite?: NetworkSameSite;
|
|
705
|
+
secure?: boolean;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export type NetworkUrlPattern = NetworkUrlPatternPattern | NetworkUrlPatternString;
|
|
709
|
+
|
|
710
|
+
export interface NetworkUrlPatternPattern {
|
|
711
|
+
type: "pattern";
|
|
712
|
+
protocol?: string;
|
|
713
|
+
hostname?: string;
|
|
714
|
+
port?: string;
|
|
715
|
+
pathname?: string;
|
|
716
|
+
search?: string;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export interface NetworkUrlPatternString {
|
|
720
|
+
type: "string";
|
|
721
|
+
pattern: string;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export interface NetworkAddDataCollector {
|
|
725
|
+
method: "network.addDataCollector";
|
|
726
|
+
params: NetworkAddDataCollectorParameters;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export interface NetworkAddDataCollectorParameters {
|
|
730
|
+
dataTypes: NetworkDataType[];
|
|
731
|
+
maxEncodedDataSize: JsUint;
|
|
732
|
+
/**
|
|
733
|
+
* @default 'blob'
|
|
734
|
+
*/
|
|
735
|
+
collectorType?: NetworkCollectorType;
|
|
736
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
737
|
+
userContexts?: BrowserUserContext[];
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export interface NetworkAddIntercept {
|
|
741
|
+
method: "network.addIntercept";
|
|
742
|
+
params: NetworkAddInterceptParameters;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export interface NetworkAddInterceptParameters {
|
|
746
|
+
phases: NetworkInterceptPhase[];
|
|
747
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
748
|
+
urlPatterns?: NetworkUrlPattern[];
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
export type NetworkInterceptPhase = "beforeRequestSent" | "responseStarted" | "authRequired";
|
|
752
|
+
|
|
753
|
+
export interface NetworkContinueRequest {
|
|
754
|
+
method: "network.continueRequest";
|
|
755
|
+
params: NetworkContinueRequestParameters;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
export interface NetworkContinueRequestParameters {
|
|
759
|
+
request: NetworkRequest;
|
|
760
|
+
body?: NetworkBytesValue;
|
|
761
|
+
cookies?: NetworkCookieHeader[];
|
|
762
|
+
headers?: NetworkHeader[];
|
|
763
|
+
method?: string;
|
|
764
|
+
url?: string;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export interface NetworkContinueResponse {
|
|
768
|
+
method: "network.continueResponse";
|
|
769
|
+
params: NetworkContinueResponseParameters;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
export interface NetworkContinueResponseParameters {
|
|
773
|
+
request: NetworkRequest;
|
|
774
|
+
cookies?: NetworkSetCookieHeader[];
|
|
775
|
+
credentials?: NetworkAuthCredentials;
|
|
776
|
+
headers?: NetworkHeader[];
|
|
777
|
+
reasonPhrase?: string;
|
|
778
|
+
statusCode?: JsUint;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export interface NetworkContinueWithAuth {
|
|
782
|
+
method: "network.continueWithAuth";
|
|
783
|
+
params: NetworkContinueWithAuthParameters;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export type NetworkContinueWithAuthParameters = (NetworkContinueWithAuthCredentials | NetworkContinueWithAuthNoCredentials) & {
|
|
787
|
+
request: NetworkRequest;
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
export interface NetworkContinueWithAuthCredentials {
|
|
791
|
+
action: "provideCredentials";
|
|
792
|
+
credentials: NetworkAuthCredentials;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export interface NetworkContinueWithAuthNoCredentials {
|
|
796
|
+
action: "default" | "cancel";
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
export interface NetworkDisownData {
|
|
800
|
+
method: "network.disownData";
|
|
801
|
+
params: NetworkDisownDataParameters;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export interface NetworkDisownDataParameters {
|
|
805
|
+
dataType: NetworkDataType;
|
|
806
|
+
collector: NetworkCollector;
|
|
807
|
+
request: NetworkRequest;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
export interface NetworkFailRequest {
|
|
811
|
+
method: "network.failRequest";
|
|
812
|
+
params: NetworkFailRequestParameters;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export interface NetworkFailRequestParameters {
|
|
816
|
+
request: NetworkRequest;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export interface NetworkGetData {
|
|
820
|
+
method: "network.getData";
|
|
821
|
+
params: NetworkGetDataParameters;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export interface NetworkGetDataParameters {
|
|
825
|
+
dataType: NetworkDataType;
|
|
826
|
+
collector?: NetworkCollector;
|
|
827
|
+
disown?: boolean;
|
|
828
|
+
request: NetworkRequest;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export interface NetworkProvideResponse {
|
|
832
|
+
method: "network.provideResponse";
|
|
833
|
+
params: NetworkProvideResponseParameters;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export interface NetworkProvideResponseParameters {
|
|
837
|
+
request: NetworkRequest;
|
|
838
|
+
body?: NetworkBytesValue;
|
|
839
|
+
cookies?: NetworkSetCookieHeader[];
|
|
840
|
+
headers?: NetworkHeader[];
|
|
841
|
+
reasonPhrase?: string;
|
|
842
|
+
statusCode?: JsUint;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export interface NetworkRemoveDataCollector {
|
|
846
|
+
method: "network.removeDataCollector";
|
|
847
|
+
params: NetworkRemoveDataCollectorParameters;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
export interface NetworkRemoveDataCollectorParameters {
|
|
851
|
+
collector: NetworkCollector;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export interface NetworkRemoveIntercept {
|
|
855
|
+
method: "network.removeIntercept";
|
|
856
|
+
params: NetworkRemoveInterceptParameters;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export interface NetworkRemoveInterceptParameters {
|
|
860
|
+
intercept: NetworkIntercept;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export interface NetworkSetCacheBehavior {
|
|
864
|
+
method: "network.setCacheBehavior";
|
|
865
|
+
params: NetworkSetCacheBehaviorParameters;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export interface NetworkSetCacheBehaviorParameters {
|
|
869
|
+
cacheBehavior: "default" | "bypass";
|
|
870
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export interface NetworkSetExtraHeaders {
|
|
874
|
+
method: "network.setExtraHeaders";
|
|
875
|
+
params: NetworkSetExtraHeadersParameters;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export interface NetworkSetExtraHeadersParameters {
|
|
879
|
+
headers: NetworkHeader[];
|
|
880
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
881
|
+
userContexts?: BrowserUserContext[];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export type ScriptCommand = ScriptAddPreloadScript | ScriptCallFunction | ScriptDisown | ScriptEvaluate | ScriptGetRealms | ScriptRemovePreloadScript;
|
|
885
|
+
export type ScriptChannel = string;
|
|
886
|
+
|
|
887
|
+
export interface ScriptChannelValue {
|
|
888
|
+
type: "channel";
|
|
889
|
+
value: ScriptChannelProperties;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export interface ScriptChannelProperties {
|
|
893
|
+
channel: ScriptChannel;
|
|
894
|
+
serializationOptions?: ScriptSerializationOptions;
|
|
895
|
+
ownership?: ScriptResultOwnership;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
export type ScriptEvaluateResult = ScriptEvaluateResultSuccess | ScriptEvaluateResultException;
|
|
899
|
+
|
|
900
|
+
export interface ScriptEvaluateResultSuccess {
|
|
901
|
+
type: "success";
|
|
902
|
+
result: ScriptRemoteValue;
|
|
903
|
+
realm: ScriptRealm;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
export interface ScriptEvaluateResultException {
|
|
907
|
+
type: "exception";
|
|
908
|
+
exceptionDetails: ScriptExceptionDetails;
|
|
909
|
+
realm: ScriptRealm;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export interface ScriptExceptionDetails {
|
|
913
|
+
columnNumber: JsUint;
|
|
914
|
+
exception: ScriptRemoteValue;
|
|
915
|
+
lineNumber: JsUint;
|
|
916
|
+
stackTrace: ScriptStackTrace;
|
|
917
|
+
text: string;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export type ScriptHandle = string;
|
|
921
|
+
export type ScriptInternalId = string;
|
|
922
|
+
export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
|
|
923
|
+
export type ScriptListLocalValue = ScriptLocalValue[];
|
|
924
|
+
|
|
925
|
+
export interface ScriptArrayLocalValue {
|
|
926
|
+
type: "array";
|
|
927
|
+
value: ScriptListLocalValue;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export interface ScriptDateLocalValue {
|
|
931
|
+
type: "date";
|
|
932
|
+
value: string;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
|
|
936
|
+
|
|
937
|
+
export interface ScriptMapLocalValue {
|
|
938
|
+
type: "map";
|
|
939
|
+
value: ScriptMappingLocalValue;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
export interface ScriptObjectLocalValue {
|
|
943
|
+
type: "object";
|
|
944
|
+
value: ScriptMappingLocalValue;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export interface ScriptRegExpValue {
|
|
948
|
+
pattern: string;
|
|
949
|
+
flags?: string;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
export interface ScriptRegExpLocalValue {
|
|
953
|
+
type: "regexp";
|
|
954
|
+
value: ScriptRegExpValue;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export interface ScriptSetLocalValue {
|
|
958
|
+
type: "set";
|
|
959
|
+
value: ScriptListLocalValue;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export type ScriptPreloadScript = string;
|
|
963
|
+
export type ScriptRealm = string;
|
|
964
|
+
export type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
|
|
965
|
+
|
|
966
|
+
export interface ScriptUndefinedValue {
|
|
967
|
+
type: "undefined";
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export interface ScriptNullValue {
|
|
971
|
+
type: null;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
export interface ScriptStringValue {
|
|
975
|
+
type: "string";
|
|
976
|
+
value: string;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export type ScriptSpecialNumber = "NaN" | "-0" | "Infinity" | "-Infinity";
|
|
980
|
+
|
|
981
|
+
export interface ScriptNumberValue {
|
|
982
|
+
type: "number";
|
|
983
|
+
value: Number | ScriptSpecialNumber;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export interface ScriptBooleanValue {
|
|
987
|
+
type: "boolean";
|
|
988
|
+
value: boolean;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
export interface ScriptBigIntValue {
|
|
992
|
+
type: "bigint";
|
|
993
|
+
value: string;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
export type ScriptRealmType = "window" | "dedicated-worker" | "shared-worker" | "service-worker" | "worker" | "paint-worklet" | "audio-worklet" | "worklet";
|
|
997
|
+
export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
|
|
998
|
+
|
|
999
|
+
export type ScriptSharedReference = Extensible & {
|
|
1000
|
+
sharedId: ScriptSharedId;
|
|
1001
|
+
handle?: ScriptHandle;
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
export type ScriptRemoteObjectReference = Extensible & {
|
|
1005
|
+
handle: ScriptHandle;
|
|
1006
|
+
sharedId?: ScriptSharedId;
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
|
|
1010
|
+
export type ScriptListRemoteValue = ScriptRemoteValue[];
|
|
1011
|
+
export type ScriptMappingRemoteValue = (ScriptRemoteValue | ScriptRemoteValue)[];
|
|
1012
|
+
|
|
1013
|
+
export interface ScriptSymbolRemoteValue {
|
|
1014
|
+
type: "symbol";
|
|
1015
|
+
handle?: ScriptHandle;
|
|
1016
|
+
internalId?: ScriptInternalId;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
export interface ScriptArrayRemoteValue {
|
|
1020
|
+
type: "array";
|
|
1021
|
+
handle?: ScriptHandle;
|
|
1022
|
+
internalId?: ScriptInternalId;
|
|
1023
|
+
value?: ScriptListRemoteValue;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export interface ScriptObjectRemoteValue {
|
|
1027
|
+
type: "object";
|
|
1028
|
+
handle?: ScriptHandle;
|
|
1029
|
+
internalId?: ScriptInternalId;
|
|
1030
|
+
value?: ScriptMappingRemoteValue;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export interface ScriptFunctionRemoteValue {
|
|
1034
|
+
type: "function";
|
|
1035
|
+
handle?: ScriptHandle;
|
|
1036
|
+
internalId?: ScriptInternalId;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
export type ScriptRegExpRemoteValue = ScriptRegExpLocalValue & {
|
|
1040
|
+
handle?: ScriptHandle;
|
|
1041
|
+
internalId?: ScriptInternalId;
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
export type ScriptDateRemoteValue = ScriptDateLocalValue & {
|
|
1045
|
+
handle?: ScriptHandle;
|
|
1046
|
+
internalId?: ScriptInternalId;
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
export interface ScriptMapRemoteValue {
|
|
1050
|
+
type: "map";
|
|
1051
|
+
handle?: ScriptHandle;
|
|
1052
|
+
internalId?: ScriptInternalId;
|
|
1053
|
+
value?: ScriptMappingRemoteValue;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export interface ScriptSetRemoteValue {
|
|
1057
|
+
type: "set";
|
|
1058
|
+
handle?: ScriptHandle;
|
|
1059
|
+
internalId?: ScriptInternalId;
|
|
1060
|
+
value?: ScriptListRemoteValue;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
export interface ScriptWeakMapRemoteValue {
|
|
1064
|
+
type: "weakmap";
|
|
1065
|
+
handle?: ScriptHandle;
|
|
1066
|
+
internalId?: ScriptInternalId;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
export interface ScriptWeakSetRemoteValue {
|
|
1070
|
+
type: "weakset";
|
|
1071
|
+
handle?: ScriptHandle;
|
|
1072
|
+
internalId?: ScriptInternalId;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export interface ScriptGeneratorRemoteValue {
|
|
1076
|
+
type: "generator";
|
|
1077
|
+
handle?: ScriptHandle;
|
|
1078
|
+
internalId?: ScriptInternalId;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export interface ScriptErrorRemoteValue {
|
|
1082
|
+
type: "error";
|
|
1083
|
+
handle?: ScriptHandle;
|
|
1084
|
+
internalId?: ScriptInternalId;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
export interface ScriptProxyRemoteValue {
|
|
1088
|
+
type: "proxy";
|
|
1089
|
+
handle?: ScriptHandle;
|
|
1090
|
+
internalId?: ScriptInternalId;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export interface ScriptPromiseRemoteValue {
|
|
1094
|
+
type: "promise";
|
|
1095
|
+
handle?: ScriptHandle;
|
|
1096
|
+
internalId?: ScriptInternalId;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export interface ScriptTypedArrayRemoteValue {
|
|
1100
|
+
type: "typedarray";
|
|
1101
|
+
handle?: ScriptHandle;
|
|
1102
|
+
internalId?: ScriptInternalId;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export interface ScriptArrayBufferRemoteValue {
|
|
1106
|
+
type: "arraybuffer";
|
|
1107
|
+
handle?: ScriptHandle;
|
|
1108
|
+
internalId?: ScriptInternalId;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export interface ScriptNodeListRemoteValue {
|
|
1112
|
+
type: "nodelist";
|
|
1113
|
+
handle?: ScriptHandle;
|
|
1114
|
+
internalId?: ScriptInternalId;
|
|
1115
|
+
value?: ScriptListRemoteValue;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export interface ScriptHtmlCollectionRemoteValue {
|
|
1119
|
+
type: "htmlcollection";
|
|
1120
|
+
handle?: ScriptHandle;
|
|
1121
|
+
internalId?: ScriptInternalId;
|
|
1122
|
+
value?: ScriptListRemoteValue;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
export interface ScriptNodeRemoteValue {
|
|
1126
|
+
type: "node";
|
|
1127
|
+
sharedId?: ScriptSharedId;
|
|
1128
|
+
handle?: ScriptHandle;
|
|
1129
|
+
internalId?: ScriptInternalId;
|
|
1130
|
+
value?: ScriptNodeProperties;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
export interface ScriptNodeProperties {
|
|
1134
|
+
nodeType: JsUint;
|
|
1135
|
+
childNodeCount: JsUint;
|
|
1136
|
+
attributes?: Record<string, string>;
|
|
1137
|
+
children?: ScriptNodeRemoteValue[];
|
|
1138
|
+
localName?: string;
|
|
1139
|
+
mode?: "open" | "closed";
|
|
1140
|
+
namespaceUri?: string;
|
|
1141
|
+
nodeValue?: string;
|
|
1142
|
+
shadowRoot?: ScriptNodeRemoteValue | null;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
export interface ScriptWindowProxyRemoteValue {
|
|
1146
|
+
type: "window";
|
|
1147
|
+
value: ScriptWindowProxyProperties;
|
|
1148
|
+
handle?: ScriptHandle;
|
|
1149
|
+
internalId?: ScriptInternalId;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export interface ScriptWindowProxyProperties {
|
|
1153
|
+
context: BrowsingContextBrowsingContext;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
export type ScriptResultOwnership = "root" | "none";
|
|
1157
|
+
|
|
1158
|
+
export interface ScriptSerializationOptions {
|
|
1159
|
+
maxDomDepth?: JsUint | null;
|
|
1160
|
+
/**
|
|
1161
|
+
* @default null
|
|
1162
|
+
*/
|
|
1163
|
+
maxObjectDepth?: JsUint | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* @default 'none'
|
|
1166
|
+
*/
|
|
1167
|
+
includeShadowTree?: "none" | "open" | "all";
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
export type ScriptSharedId = string;
|
|
1171
|
+
|
|
1172
|
+
export interface ScriptStackFrame {
|
|
1173
|
+
columnNumber: JsUint;
|
|
1174
|
+
functionName: string;
|
|
1175
|
+
lineNumber: JsUint;
|
|
1176
|
+
url: string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export interface ScriptStackTrace {
|
|
1180
|
+
callFrames: ScriptStackFrame[];
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export interface ScriptRealmTarget {
|
|
1184
|
+
realm: ScriptRealm;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
export interface ScriptContextTarget {
|
|
1188
|
+
context: BrowsingContextBrowsingContext;
|
|
1189
|
+
sandbox?: string;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
export type ScriptTarget = ScriptContextTarget | ScriptRealmTarget;
|
|
1193
|
+
|
|
1194
|
+
export interface ScriptAddPreloadScript {
|
|
1195
|
+
method: "script.addPreloadScript";
|
|
1196
|
+
params: ScriptAddPreloadScriptParameters;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
export interface ScriptAddPreloadScriptParameters {
|
|
1200
|
+
functionDeclaration: string;
|
|
1201
|
+
arguments?: ScriptChannelValue[];
|
|
1202
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
1203
|
+
userContexts?: BrowserUserContext[];
|
|
1204
|
+
sandbox?: string;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export interface ScriptDisown {
|
|
1208
|
+
method: "script.disown";
|
|
1209
|
+
params: ScriptDisownParameters;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
export interface ScriptDisownParameters {
|
|
1213
|
+
handles: ScriptHandle[];
|
|
1214
|
+
target: ScriptTarget;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
export interface ScriptCallFunction {
|
|
1218
|
+
method: "script.callFunction";
|
|
1219
|
+
params: ScriptCallFunctionParameters;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
export interface ScriptCallFunctionParameters {
|
|
1223
|
+
functionDeclaration: string;
|
|
1224
|
+
awaitPromise: boolean;
|
|
1225
|
+
target: ScriptTarget;
|
|
1226
|
+
arguments?: ScriptLocalValue[];
|
|
1227
|
+
resultOwnership?: ScriptResultOwnership;
|
|
1228
|
+
serializationOptions?: ScriptSerializationOptions;
|
|
1229
|
+
this?: ScriptLocalValue;
|
|
1230
|
+
userActivation?: boolean;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export interface ScriptEvaluate {
|
|
1234
|
+
method: "script.evaluate";
|
|
1235
|
+
params: ScriptEvaluateParameters;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
export interface ScriptEvaluateParameters {
|
|
1239
|
+
expression: string;
|
|
1240
|
+
target: ScriptTarget;
|
|
1241
|
+
awaitPromise: boolean;
|
|
1242
|
+
resultOwnership?: ScriptResultOwnership;
|
|
1243
|
+
serializationOptions?: ScriptSerializationOptions;
|
|
1244
|
+
userActivation?: boolean;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export interface ScriptGetRealms {
|
|
1248
|
+
method: "script.getRealms";
|
|
1249
|
+
params: ScriptGetRealmsParameters;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
export interface ScriptGetRealmsParameters {
|
|
1253
|
+
context?: BrowsingContextBrowsingContext;
|
|
1254
|
+
type?: ScriptRealmType;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export interface ScriptRemovePreloadScript {
|
|
1258
|
+
method: "script.removePreloadScript";
|
|
1259
|
+
params: ScriptRemovePreloadScriptParameters;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export interface ScriptRemovePreloadScriptParameters {
|
|
1263
|
+
script: ScriptPreloadScript;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
export type StorageCommand = StorageDeleteCookies | StorageGetCookies | StorageSetCookie;
|
|
1267
|
+
|
|
1268
|
+
export type StoragePartitionKey = Extensible & {
|
|
1269
|
+
userContext?: string;
|
|
1270
|
+
sourceOrigin?: string;
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
export interface StorageGetCookies {
|
|
1274
|
+
method: "storage.getCookies";
|
|
1275
|
+
params: StorageGetCookiesParameters;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export type StorageCookieFilter = Extensible & {
|
|
1279
|
+
name?: string;
|
|
1280
|
+
value?: NetworkBytesValue;
|
|
1281
|
+
domain?: string;
|
|
1282
|
+
path?: string;
|
|
1283
|
+
size?: JsUint;
|
|
1284
|
+
httpOnly?: boolean;
|
|
1285
|
+
secure?: boolean;
|
|
1286
|
+
sameSite?: NetworkSameSite;
|
|
1287
|
+
expiry?: JsUint;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
export interface StorageBrowsingContextPartitionDescriptor {
|
|
1291
|
+
type: "context";
|
|
1292
|
+
context: BrowsingContextBrowsingContext;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
export type StorageStorageKeyPartitionDescriptor = Extensible & {
|
|
1296
|
+
type: "storageKey";
|
|
1297
|
+
userContext?: string;
|
|
1298
|
+
sourceOrigin?: string;
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
export type StoragePartitionDescriptor = StorageBrowsingContextPartitionDescriptor | StorageStorageKeyPartitionDescriptor;
|
|
1302
|
+
|
|
1303
|
+
export interface StorageGetCookiesParameters {
|
|
1304
|
+
filter?: StorageCookieFilter;
|
|
1305
|
+
partition?: StoragePartitionDescriptor;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
export interface StorageSetCookie {
|
|
1309
|
+
method: "storage.setCookie";
|
|
1310
|
+
params: StorageSetCookieParameters;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export type StoragePartialCookie = Extensible & {
|
|
1314
|
+
name: string;
|
|
1315
|
+
value: NetworkBytesValue;
|
|
1316
|
+
domain: string;
|
|
1317
|
+
path?: string;
|
|
1318
|
+
httpOnly?: boolean;
|
|
1319
|
+
secure?: boolean;
|
|
1320
|
+
sameSite?: NetworkSameSite;
|
|
1321
|
+
expiry?: JsUint;
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
export interface StorageSetCookieParameters {
|
|
1325
|
+
cookie: StoragePartialCookie;
|
|
1326
|
+
partition?: StoragePartitionDescriptor;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
export interface StorageDeleteCookies {
|
|
1330
|
+
method: "storage.deleteCookies";
|
|
1331
|
+
params: StorageDeleteCookiesParameters;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
export interface StorageDeleteCookiesParameters {
|
|
1335
|
+
filter?: StorageCookieFilter;
|
|
1336
|
+
partition?: StoragePartitionDescriptor;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
export type InputCommand = InputPerformActions | InputReleaseActions | InputSetFiles;
|
|
1340
|
+
|
|
1341
|
+
export interface InputElementOrigin {
|
|
1342
|
+
type: "element";
|
|
1343
|
+
element: ScriptSharedReference;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
export interface InputPerformActions {
|
|
1347
|
+
method: "input.performActions";
|
|
1348
|
+
params: InputPerformActionsParameters;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
export interface InputPerformActionsParameters {
|
|
1352
|
+
context: BrowsingContextBrowsingContext;
|
|
1353
|
+
actions: InputSourceActions[];
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
export type InputSourceActions = InputNoneSourceActions | InputKeySourceActions | InputPointerSourceActions | InputWheelSourceActions;
|
|
1357
|
+
|
|
1358
|
+
export interface InputNoneSourceActions {
|
|
1359
|
+
type: "none";
|
|
1360
|
+
id: string;
|
|
1361
|
+
actions: InputNoneSourceAction[];
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
export type InputNoneSourceAction = InputPauseAction;
|
|
1365
|
+
|
|
1366
|
+
export interface InputKeySourceActions {
|
|
1367
|
+
type: "key";
|
|
1368
|
+
id: string;
|
|
1369
|
+
actions: InputKeySourceAction[];
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
export type InputKeySourceAction = InputPauseAction | InputKeyDownAction | InputKeyUpAction;
|
|
1373
|
+
|
|
1374
|
+
export interface InputPointerSourceActions {
|
|
1375
|
+
type: "pointer";
|
|
1376
|
+
id: string;
|
|
1377
|
+
parameters?: InputPointerParameters;
|
|
1378
|
+
actions: InputPointerSourceAction[];
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export type InputPointerType = "mouse" | "pen" | "touch";
|
|
1382
|
+
|
|
1383
|
+
export interface InputPointerParameters {
|
|
1384
|
+
/**
|
|
1385
|
+
* @default 'mouse'
|
|
1386
|
+
*/
|
|
1387
|
+
pointerType?: InputPointerType;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
export type InputPointerSourceAction = InputPauseAction | InputPointerDownAction | InputPointerUpAction | InputPointerMoveAction;
|
|
1391
|
+
|
|
1392
|
+
export interface InputWheelSourceActions {
|
|
1393
|
+
type: "wheel";
|
|
1394
|
+
id: string;
|
|
1395
|
+
actions: InputWheelSourceAction[];
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
export type InputWheelSourceAction = InputPauseAction | InputWheelScrollAction;
|
|
1399
|
+
|
|
1400
|
+
export interface InputPauseAction {
|
|
1401
|
+
type: "pause";
|
|
1402
|
+
duration?: JsUint;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
export interface InputKeyDownAction {
|
|
1406
|
+
type: "keyDown";
|
|
1407
|
+
value: string;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
export interface InputKeyUpAction {
|
|
1411
|
+
type: "keyUp";
|
|
1412
|
+
value: string;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
export interface InputPointerUpAction {
|
|
1416
|
+
type: "pointerUp";
|
|
1417
|
+
button: JsUint;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
export type InputPointerDownAction = InputPointerCommonProperties & {
|
|
1421
|
+
type: "pointerDown";
|
|
1422
|
+
button: JsUint;
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1425
|
+
export type InputPointerMoveAction = InputPointerCommonProperties & {
|
|
1426
|
+
type: "pointerMove";
|
|
1427
|
+
x: number;
|
|
1428
|
+
y: number;
|
|
1429
|
+
duration?: JsUint;
|
|
1430
|
+
origin?: InputOrigin;
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
export interface InputWheelScrollAction {
|
|
1434
|
+
type: "scroll";
|
|
1435
|
+
x: JsInt;
|
|
1436
|
+
y: JsInt;
|
|
1437
|
+
deltaX: JsInt;
|
|
1438
|
+
deltaY: JsInt;
|
|
1439
|
+
duration?: JsUint;
|
|
1440
|
+
/**
|
|
1441
|
+
* @default 'viewport'
|
|
1442
|
+
*/
|
|
1443
|
+
origin?: InputOrigin;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
export interface InputPointerCommonProperties {
|
|
1447
|
+
width?: JsUint;
|
|
1448
|
+
height?: JsUint;
|
|
1449
|
+
pressure?: number;
|
|
1450
|
+
tangentialPressure?: number;
|
|
1451
|
+
/**
|
|
1452
|
+
* 0 .. Math.PI / 2
|
|
1453
|
+
*/
|
|
1454
|
+
twist?: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* 0 .. 2 * Math.PI
|
|
1457
|
+
*/
|
|
1458
|
+
altitudeAngle?: number;
|
|
1459
|
+
azimuthAngle?: number;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
export type InputOrigin = "viewport" | "pointer" | InputElementOrigin;
|
|
1463
|
+
|
|
1464
|
+
export interface InputReleaseActions {
|
|
1465
|
+
method: "input.releaseActions";
|
|
1466
|
+
params: InputReleaseActionsParameters;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export interface InputReleaseActionsParameters {
|
|
1470
|
+
context: BrowsingContextBrowsingContext;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
export interface InputSetFiles {
|
|
1474
|
+
method: "input.setFiles";
|
|
1475
|
+
params: InputSetFilesParameters;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
export interface InputSetFilesParameters {
|
|
1479
|
+
context: BrowsingContextBrowsingContext;
|
|
1480
|
+
element: ScriptSharedReference;
|
|
1481
|
+
files: string[];
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
export type WebExtensionCommand = WebExtensionInstall | WebExtensionUninstall;
|
|
1485
|
+
export type WebExtensionExtension = string;
|
|
1486
|
+
|
|
1487
|
+
export interface WebExtensionInstall {
|
|
1488
|
+
method: "webExtension.install";
|
|
1489
|
+
params: WebExtensionInstallParameters;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export interface WebExtensionInstallParameters {
|
|
1493
|
+
extensionData: WebExtensionExtensionData;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
export type WebExtensionExtensionData = WebExtensionExtensionArchivePath | WebExtensionExtensionBase64Encoded | WebExtensionExtensionPath;
|
|
1497
|
+
|
|
1498
|
+
export interface WebExtensionExtensionPath {
|
|
1499
|
+
type: "path";
|
|
1500
|
+
path: string;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
export interface WebExtensionExtensionArchivePath {
|
|
1504
|
+
type: "archivePath";
|
|
1505
|
+
path: string;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
export interface WebExtensionExtensionBase64Encoded {
|
|
1509
|
+
type: "base64";
|
|
1510
|
+
value: string;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export interface WebExtensionUninstall {
|
|
1514
|
+
method: "webExtension.uninstall";
|
|
1515
|
+
params: WebExtensionUninstallParameters;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
export interface WebExtensionUninstallParameters {
|
|
1519
|
+
extension: WebExtensionExtension;
|
|
1520
|
+
}
|