1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export type Message = CommandResponse | ErrorResponse | Event;
|
16 | export interface CommandResponse extends Extensible {
|
17 | type: 'success';
|
18 | id: JsUint;
|
19 | result: ResultData;
|
20 | }
|
21 | export interface ErrorResponse extends Extensible {
|
22 | type: 'error';
|
23 | id: JsUint | null;
|
24 | error: ErrorCode;
|
25 | message: string;
|
26 | stacktrace?: string;
|
27 | }
|
28 | export type ResultData = BrowsingContextResult | EmptyResult | NetworkResult | ScriptResult | SessionResult | StorageResult;
|
29 | export interface EmptyResult extends Extensible {
|
30 | }
|
31 | export interface Event extends Extensible {
|
32 | type: 'event';
|
33 | }
|
34 | export type EventData = BrowsingContextEvent | LogEvent | NetworkEvent | ScriptEvent;
|
35 | export type Extensible = Record<string, unknown>;
|
36 | export type JsInt = number;
|
37 | export type JsUint = number;
|
38 | export type ErrorCode = 'invalid argument' | 'invalid selector' | 'invalid session id' | 'move target out of bounds' | 'no such alert' | 'no such element' | 'no such frame' | 'no such handle' | 'no such history entry' | 'no such intercept' | 'no such node' | 'no such request' | 'no such script' | 'no such storage partition' | 'no such user context' | 'session not created' | 'unable to capture screen' | 'unable to close browser' | 'unable to set cookie' | 'unable to set file input' | 'underspecified storage partition' | 'unknown command' | 'unknown error' | 'unsupported operation';
|
39 | export type SessionResult = SessionNewResult | SessionStatusResult;
|
40 | export interface SessionCapabilitiesRequest {
|
41 | alwaysMatch?: SessionCapabilityRequest;
|
42 | firstMatch?: SessionCapabilityRequest[];
|
43 | }
|
44 | export interface SessionCapabilityRequest extends Extensible {
|
45 | acceptInsecureCerts?: boolean;
|
46 | browserName?: string;
|
47 | browserVersion?: string;
|
48 | platformName?: string;
|
49 | proxy?: SessionProxyConfiguration;
|
50 | webSocketUrl?: boolean;
|
51 | }
|
52 | export type SessionProxyConfiguration = SessionAutodetectProxyConfiguration | SessionDirectProxyConfiguration | SessionManualProxyConfiguration | SessionPacProxyConfiguration | SessionSystemProxyConfiguration;
|
53 | export interface SessionAutodetectProxyConfiguration extends Extensible {
|
54 | proxyType: 'autodetect';
|
55 | }
|
56 | export interface SessionDirectProxyConfiguration extends Extensible {
|
57 | proxyType: 'direct';
|
58 | }
|
59 | export interface SessionManualProxyConfiguration extends SessionSocksProxyConfiguration, Extensible {
|
60 | proxyType: 'manual';
|
61 | ftpProxy?: string;
|
62 | httpProxy?: string;
|
63 | sslProxy?: string;
|
64 | noProxy?: string[];
|
65 | }
|
66 | export interface SessionSocksProxyConfiguration {
|
67 | socksProxy: string;
|
68 | socksVersion: number;
|
69 | }
|
70 | export interface SessionPacProxyConfiguration extends Extensible {
|
71 | proxyType: 'pac';
|
72 | proxyAutoconfigUrl: string;
|
73 | }
|
74 | export interface SessionSystemProxyConfiguration extends Extensible {
|
75 | proxyType: 'system';
|
76 | }
|
77 | export interface SessionStatusResult {
|
78 | ready: boolean;
|
79 | message: string;
|
80 | }
|
81 | export interface SessionNewResult {
|
82 | sessionId: string;
|
83 | capabilities: {
|
84 | acceptInsecureCerts: boolean;
|
85 | browserName: string;
|
86 | browserVersion: string;
|
87 | platformName: string;
|
88 | setWindowRect: boolean;
|
89 | userAgent: string;
|
90 | proxy?: SessionProxyConfiguration;
|
91 | webSocketUrl?: string;
|
92 | };
|
93 | }
|
94 | export type BrowserResult = BrowserCreateUserContextResult | BrowserGetUserContextsResult;
|
95 | export type BrowserUserContext = string;
|
96 | export interface BrowserUserContextInfo {
|
97 | userContext: BrowserUserContext;
|
98 | }
|
99 | export type BrowserCreateUserContextResult = BrowserUserContextInfo;
|
100 | export interface BrowserGetUserContextsResult {
|
101 | userContexts: BrowserUserContextInfo[];
|
102 | }
|
103 | export type BrowsingContextResult = BrowsingContextCaptureScreenshotResult | BrowsingContextCreateResult | BrowsingContextGetTreeResult | BrowsingContextLocateNodesResult | BrowsingContextNavigateResult | BrowsingContextPrintResult | BrowsingContextTraverseHistoryResult;
|
104 | export type BrowsingContextEvent = BrowsingContextContextCreated | BrowsingContextContextDestroyed | BrowsingContextDomContentLoaded | BrowsingContextDownloadWillBegin | BrowsingContextFragmentNavigated | BrowsingContextLoad | BrowsingContextNavigationAborted | BrowsingContextNavigationFailed | BrowsingContextNavigationStarted | BrowsingContextUserPromptClosed | BrowsingContextUserPromptOpened;
|
105 | export type BrowsingContextBrowsingContext = string;
|
106 | export type BrowsingContextInfoList = (BrowsingContextInfo)[];
|
107 | export interface BrowsingContextInfo {
|
108 | children: BrowsingContextInfoList | null;
|
109 | context: BrowsingContextBrowsingContext;
|
110 | url: string;
|
111 | userContext: BrowserUserContext;
|
112 | parent?: BrowsingContextBrowsingContext | null;
|
113 | }
|
114 | export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
|
115 | export interface BrowsingContextAccessibilityLocator {
|
116 | type: 'accessibility';
|
117 | value: {
|
118 | name?: string;
|
119 | role?: string;
|
120 | };
|
121 | }
|
122 | export interface BrowsingContextCssLocator {
|
123 | type: 'css';
|
124 | value: string;
|
125 | }
|
126 | export interface BrowsingContextInnerTextLocator {
|
127 | type: 'innerText';
|
128 | value: string;
|
129 | ignoreCase?: boolean;
|
130 | matchType?: 'full' | 'partial';
|
131 | maxDepth?: JsUint;
|
132 | }
|
133 | export interface BrowsingContextXPathLocator {
|
134 | type: 'xpath';
|
135 | value: string;
|
136 | }
|
137 | export type BrowsingContextNavigation = string;
|
138 | export interface BrowsingContextNavigationInfo {
|
139 | context: BrowsingContextBrowsingContext;
|
140 | navigation: BrowsingContextNavigation | null;
|
141 | timestamp: JsUint;
|
142 | url: string;
|
143 | }
|
144 | export interface BrowsingContextCaptureScreenshotResult {
|
145 | data: string;
|
146 | }
|
147 | export interface BrowsingContextCreateResult {
|
148 | context: BrowsingContextBrowsingContext;
|
149 | }
|
150 | export interface BrowsingContextGetTreeResult {
|
151 | contexts: BrowsingContextInfoList;
|
152 | }
|
153 | export interface BrowsingContextLocateNodesResult {
|
154 | nodes: ScriptNodeRemoteValue[];
|
155 | }
|
156 | export interface BrowsingContextNavigateResult {
|
157 | navigation: BrowsingContextNavigation | null;
|
158 | url: string;
|
159 | }
|
160 | export interface BrowsingContextPrintResult {
|
161 | data: string;
|
162 | }
|
163 | export interface BrowsingContextTraverseHistoryResult {
|
164 | }
|
165 | export interface BrowsingContextContextCreated {
|
166 | method: 'browsingContext.contextCreated';
|
167 | params: BrowsingContextInfo;
|
168 | }
|
169 | export interface BrowsingContextContextDestroyed {
|
170 | method: 'browsingContext.contextDestroyed';
|
171 | params: BrowsingContextInfo;
|
172 | }
|
173 | export interface BrowsingContextNavigationStarted {
|
174 | method: 'browsingContext.navigationStarted';
|
175 | params: BrowsingContextNavigationInfo;
|
176 | }
|
177 | export interface BrowsingContextFragmentNavigated {
|
178 | method: 'browsingContext.fragmentNavigated';
|
179 | params: BrowsingContextNavigationInfo;
|
180 | }
|
181 | export interface BrowsingContextDomContentLoaded {
|
182 | method: 'browsingContext.domContentLoaded';
|
183 | params: BrowsingContextNavigationInfo;
|
184 | }
|
185 | export interface BrowsingContextLoad {
|
186 | method: 'browsingContext.load';
|
187 | params: BrowsingContextNavigationInfo;
|
188 | }
|
189 | export interface BrowsingContextDownloadWillBegin {
|
190 | method: 'browsingContext.downloadWillBegin';
|
191 | params: BrowsingContextNavigationInfo;
|
192 | }
|
193 | export interface BrowsingContextNavigationAborted {
|
194 | method: 'browsingContext.navigationAborted';
|
195 | params: BrowsingContextNavigationInfo;
|
196 | }
|
197 | export interface BrowsingContextNavigationFailed {
|
198 | method: 'browsingContext.navigationFailed';
|
199 | params: BrowsingContextNavigationInfo;
|
200 | }
|
201 | export interface BrowsingContextUserPromptClosed {
|
202 | method: 'browsingContext.userPromptClosed';
|
203 | params: BrowsingContextUserPromptClosedParameters;
|
204 | }
|
205 | export interface BrowsingContextUserPromptClosedParameters {
|
206 | context: BrowsingContextBrowsingContext;
|
207 | accepted: boolean;
|
208 | userText?: string;
|
209 | }
|
210 | export interface BrowsingContextUserPromptOpened {
|
211 | method: 'browsingContext.userPromptOpened';
|
212 | params: BrowsingContextUserPromptOpenedParameters;
|
213 | }
|
214 | export interface BrowsingContextUserPromptOpenedParameters {
|
215 | context: BrowsingContextBrowsingContext;
|
216 | type: 'alert' | 'confirm' | 'prompt' | 'beforeunload';
|
217 | message: string;
|
218 | defaultValue?: string;
|
219 | }
|
220 | export interface NetworkResult extends NetworkAddInterceptResult {
|
221 | }
|
222 | export type NetworkEvent = NetworkAuthRequired | NetworkBeforeRequestSent | NetworkFetchError | NetworkResponseCompleted | NetworkResponseStarted;
|
223 | export interface NetworkAuthChallenge {
|
224 | scheme: string;
|
225 | realm: string;
|
226 | }
|
227 | export interface NetworkBaseParameters {
|
228 | context: BrowsingContextBrowsingContext | null;
|
229 | isBlocked: boolean;
|
230 | navigation: BrowsingContextNavigation | null;
|
231 | redirectCount: JsUint;
|
232 | request: NetworkRequestData;
|
233 | timestamp: JsUint;
|
234 | intercepts?: NetworkIntercept[];
|
235 | }
|
236 | export type NetworkBytesValue = NetworkStringValue | NetworkBase64Value;
|
237 | export interface NetworkStringValue {
|
238 | type: 'string';
|
239 | value: string;
|
240 | }
|
241 | export interface NetworkBase64Value {
|
242 | type: 'base64';
|
243 | value: string;
|
244 | }
|
245 | export type NetworkSameSite = 'strict' | 'lax' | 'none';
|
246 | export interface NetworkCookie extends Extensible {
|
247 | name: string;
|
248 | value: NetworkBytesValue;
|
249 | domain: string;
|
250 | path: string;
|
251 | size: JsUint;
|
252 | httpOnly: boolean;
|
253 | secure: boolean;
|
254 | sameSite: NetworkSameSite;
|
255 | expiry?: JsUint;
|
256 | }
|
257 | export interface NetworkFetchTimingInfo {
|
258 | timeOrigin: number;
|
259 | requestTime: number;
|
260 | redirectStart: number;
|
261 | redirectEnd: number;
|
262 | fetchStart: number;
|
263 | dnsStart: number;
|
264 | dnsEnd: number;
|
265 | connectStart: number;
|
266 | connectEnd: number;
|
267 | tlsStart: number;
|
268 | requestStart: number;
|
269 | responseStart: number;
|
270 | responseEnd: number;
|
271 | }
|
272 | export interface NetworkHeader {
|
273 | name: string;
|
274 | value: NetworkBytesValue;
|
275 | }
|
276 | export interface NetworkInitiator {
|
277 | type: 'parser' | 'script' | 'preflight' | 'other';
|
278 | columnNumber?: JsUint;
|
279 | lineNumber?: JsUint;
|
280 | stackTrace?: ScriptStackTrace;
|
281 | request?: NetworkRequest;
|
282 | }
|
283 | export type NetworkIntercept = string;
|
284 | export type NetworkRequest = string;
|
285 | export interface NetworkRequestData {
|
286 | request: NetworkRequest;
|
287 | url: string;
|
288 | method: string;
|
289 | headers: NetworkHeader[];
|
290 | cookies: NetworkCookie[];
|
291 | headersSize: JsUint;
|
292 | bodySize: JsUint | null;
|
293 | timings: NetworkFetchTimingInfo;
|
294 | }
|
295 | export interface NetworkResponseContent {
|
296 | size: JsUint;
|
297 | }
|
298 | export interface NetworkResponseData {
|
299 | url: string;
|
300 | protocol: string;
|
301 | status: JsUint;
|
302 | statusText: string;
|
303 | fromCache: boolean;
|
304 | headers: NetworkHeader[];
|
305 | mimeType: string;
|
306 | bytesReceived: JsUint;
|
307 | headersSize: JsUint | null;
|
308 | bodySize: JsUint | null;
|
309 | content: NetworkResponseContent;
|
310 | authChallenges?: NetworkAuthChallenge[];
|
311 | }
|
312 | export interface NetworkAddInterceptResult {
|
313 | intercept: NetworkIntercept;
|
314 | }
|
315 | export interface NetworkAuthRequired {
|
316 | method: 'network.authRequired';
|
317 | params: NetworkAuthRequiredParameters;
|
318 | }
|
319 | export interface NetworkAuthRequiredParameters extends NetworkBaseParameters {
|
320 | response: NetworkResponseData;
|
321 | }
|
322 | export interface NetworkBeforeRequestSent {
|
323 | method: 'network.beforeRequestSent';
|
324 | params: NetworkBeforeRequestSentParameters;
|
325 | }
|
326 | export interface NetworkBeforeRequestSentParameters extends NetworkBaseParameters {
|
327 | initiator: NetworkInitiator;
|
328 | }
|
329 | export interface NetworkFetchError {
|
330 | method: 'network.fetchError';
|
331 | params: NetworkFetchErrorParameters;
|
332 | }
|
333 | export interface NetworkFetchErrorParameters extends NetworkBaseParameters {
|
334 | errorText: string;
|
335 | }
|
336 | export interface NetworkResponseCompleted {
|
337 | method: 'network.responseCompleted';
|
338 | params: NetworkResponseCompletedParameters;
|
339 | }
|
340 | export interface NetworkResponseCompletedParameters extends NetworkBaseParameters {
|
341 | response: NetworkResponseData;
|
342 | }
|
343 | export interface NetworkResponseStarted {
|
344 | method: 'network.responseStarted';
|
345 | params: NetworkResponseStartedParameters;
|
346 | }
|
347 | export interface NetworkResponseStartedParameters extends NetworkBaseParameters {
|
348 | response: NetworkResponseData;
|
349 | }
|
350 | export type ScriptResult = ScriptAddPreloadScriptResult | ScriptEvaluateResult | ScriptGetRealmsResult;
|
351 | export type ScriptEvent = ScriptMessage | ScriptRealmCreated | ScriptRealmDestroyed;
|
352 | export type ScriptChannel = string;
|
353 | export interface ScriptChannelValue {
|
354 | type: 'channel';
|
355 | value: ScriptChannelProperties;
|
356 | }
|
357 | export interface ScriptChannelProperties {
|
358 | channel: ScriptChannel;
|
359 | serializationOptions?: ScriptSerializationOptions;
|
360 | ownership?: ScriptResultOwnership;
|
361 | }
|
362 | export type ScriptEvaluateResult = ScriptEvaluateResultSuccess | ScriptEvaluateResultException;
|
363 | export interface ScriptEvaluateResultSuccess {
|
364 | type: 'success';
|
365 | result: ScriptRemoteValue;
|
366 | realm: ScriptRealm;
|
367 | }
|
368 | export interface ScriptEvaluateResultException {
|
369 | type: 'exception';
|
370 | exceptionDetails: ScriptExceptionDetails;
|
371 | realm: ScriptRealm;
|
372 | }
|
373 | export interface ScriptExceptionDetails {
|
374 | columnNumber: JsUint;
|
375 | exception: ScriptRemoteValue;
|
376 | lineNumber: JsUint;
|
377 | stackTrace: ScriptStackTrace;
|
378 | text: string;
|
379 | }
|
380 | export type ScriptHandle = string;
|
381 | export type ScriptInternalId = string;
|
382 | export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
|
383 | export type ScriptListLocalValue = (ScriptLocalValue)[];
|
384 | export interface ScriptArrayLocalValue {
|
385 | type: 'array';
|
386 | value: ScriptListLocalValue;
|
387 | }
|
388 | export interface ScriptDateLocalValue {
|
389 | type: 'date';
|
390 | value: string;
|
391 | }
|
392 | export type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
|
393 | export interface ScriptMapLocalValue {
|
394 | type: 'map';
|
395 | value: ScriptMappingLocalValue;
|
396 | }
|
397 | export interface ScriptObjectLocalValue {
|
398 | type: 'object';
|
399 | value: ScriptMappingLocalValue;
|
400 | }
|
401 | export interface ScriptRegExpValue {
|
402 | pattern: string;
|
403 | flags?: string;
|
404 | }
|
405 | export interface ScriptRegExpLocalValue {
|
406 | type: 'regexp';
|
407 | value: ScriptRegExpValue;
|
408 | }
|
409 | export interface ScriptSetLocalValue {
|
410 | type: 'set';
|
411 | value: ScriptListLocalValue;
|
412 | }
|
413 | export type ScriptPreloadScript = string;
|
414 | export type ScriptRealm = string;
|
415 | export type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
|
416 | export interface ScriptUndefinedValue {
|
417 | type: 'undefined';
|
418 | }
|
419 | export interface ScriptNullValue {
|
420 | type: null;
|
421 | }
|
422 | export interface ScriptStringValue {
|
423 | type: 'string';
|
424 | value: string;
|
425 | }
|
426 | export type ScriptSpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
|
427 | export interface ScriptNumberValue {
|
428 | type: 'number';
|
429 | value: number | ScriptSpecialNumber;
|
430 | }
|
431 | export interface ScriptBooleanValue {
|
432 | type: 'boolean';
|
433 | value: boolean;
|
434 | }
|
435 | export interface ScriptBigIntValue {
|
436 | type: 'bigint';
|
437 | value: string;
|
438 | }
|
439 | export type ScriptRealmInfo = ScriptWindowRealmInfo | ScriptDedicatedWorkerRealmInfo | ScriptSharedWorkerRealmInfo | ScriptServiceWorkerRealmInfo | ScriptWorkerRealmInfo | ScriptPaintWorkletRealmInfo | ScriptAudioWorkletRealmInfo | ScriptWorkletRealmInfo;
|
440 | export interface ScriptBaseRealmInfo {
|
441 | realm: ScriptRealm;
|
442 | origin: string;
|
443 | }
|
444 | export interface ScriptWindowRealmInfo extends ScriptBaseRealmInfo {
|
445 | type: 'window';
|
446 | context: BrowsingContextBrowsingContext;
|
447 | sandbox?: string;
|
448 | }
|
449 | export interface ScriptDedicatedWorkerRealmInfo extends ScriptBaseRealmInfo {
|
450 | type: 'dedicated-worker';
|
451 | owners: ScriptRealm[];
|
452 | }
|
453 | export interface ScriptSharedWorkerRealmInfo extends ScriptBaseRealmInfo {
|
454 | type: 'shared-worker';
|
455 | }
|
456 | export interface ScriptServiceWorkerRealmInfo extends ScriptBaseRealmInfo {
|
457 | type: 'service-worker';
|
458 | }
|
459 | export interface ScriptWorkerRealmInfo extends ScriptBaseRealmInfo {
|
460 | type: 'worker';
|
461 | }
|
462 | export interface ScriptPaintWorkletRealmInfo extends ScriptBaseRealmInfo {
|
463 | type: 'paint-worklet';
|
464 | }
|
465 | export interface ScriptAudioWorkletRealmInfo extends ScriptBaseRealmInfo {
|
466 | type: 'audio-worklet';
|
467 | }
|
468 | export interface ScriptWorkletRealmInfo extends ScriptBaseRealmInfo {
|
469 | type: 'worklet';
|
470 | }
|
471 | export type ScriptRealmType = 'window' | 'dedicated-worker' | 'shared-worker' | 'service-worker' | 'worker' | 'paint-worklet' | 'audio-worklet' | 'worklet';
|
472 | export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
|
473 | export interface ScriptSharedReference extends Extensible {
|
474 | sharedId: ScriptSharedId;
|
475 | handle?: ScriptHandle;
|
476 | }
|
477 | export interface ScriptRemoteObjectReference extends Extensible {
|
478 | handle: ScriptHandle;
|
479 | sharedId?: ScriptSharedId;
|
480 | }
|
481 | export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
|
482 | export type ScriptListRemoteValue = (ScriptRemoteValue)[];
|
483 | export type ScriptMappingRemoteValue = (ScriptRemoteValue | ScriptRemoteValue)[];
|
484 | export interface ScriptSymbolRemoteValue {
|
485 | type: 'symbol';
|
486 | handle?: ScriptHandle;
|
487 | internalId?: ScriptInternalId;
|
488 | }
|
489 | export interface ScriptArrayRemoteValue {
|
490 | type: 'array';
|
491 | handle?: ScriptHandle;
|
492 | internalId?: ScriptInternalId;
|
493 | value?: ScriptListRemoteValue;
|
494 | }
|
495 | export interface ScriptObjectRemoteValue {
|
496 | type: 'object';
|
497 | handle?: ScriptHandle;
|
498 | internalId?: ScriptInternalId;
|
499 | value?: ScriptMappingRemoteValue;
|
500 | }
|
501 | export interface ScriptFunctionRemoteValue {
|
502 | type: 'function';
|
503 | handle?: ScriptHandle;
|
504 | internalId?: ScriptInternalId;
|
505 | }
|
506 | export interface ScriptRegExpRemoteValue extends ScriptRegExpLocalValue {
|
507 | handle?: ScriptHandle;
|
508 | internalId?: ScriptInternalId;
|
509 | }
|
510 | export interface ScriptDateRemoteValue extends ScriptDateLocalValue {
|
511 | handle?: ScriptHandle;
|
512 | internalId?: ScriptInternalId;
|
513 | }
|
514 | export interface ScriptMapRemoteValue {
|
515 | type: 'map';
|
516 | handle?: ScriptHandle;
|
517 | internalId?: ScriptInternalId;
|
518 | value?: ScriptMappingRemoteValue;
|
519 | }
|
520 | export interface ScriptSetRemoteValue {
|
521 | type: 'set';
|
522 | handle?: ScriptHandle;
|
523 | internalId?: ScriptInternalId;
|
524 | value?: ScriptListRemoteValue;
|
525 | }
|
526 | export interface ScriptWeakMapRemoteValue {
|
527 | type: 'weakmap';
|
528 | handle?: ScriptHandle;
|
529 | internalId?: ScriptInternalId;
|
530 | }
|
531 | export interface ScriptWeakSetRemoteValue {
|
532 | type: 'weakset';
|
533 | handle?: ScriptHandle;
|
534 | internalId?: ScriptInternalId;
|
535 | }
|
536 | export interface ScriptGeneratorRemoteValue {
|
537 | type: 'generator';
|
538 | handle?: ScriptHandle;
|
539 | internalId?: ScriptInternalId;
|
540 | }
|
541 | export interface ScriptErrorRemoteValue {
|
542 | type: 'error';
|
543 | handle?: ScriptHandle;
|
544 | internalId?: ScriptInternalId;
|
545 | }
|
546 | export interface ScriptProxyRemoteValue {
|
547 | type: 'proxy';
|
548 | handle?: ScriptHandle;
|
549 | internalId?: ScriptInternalId;
|
550 | }
|
551 | export interface ScriptPromiseRemoteValue {
|
552 | type: 'promise';
|
553 | handle?: ScriptHandle;
|
554 | internalId?: ScriptInternalId;
|
555 | }
|
556 | export interface ScriptTypedArrayRemoteValue {
|
557 | type: 'typedarray';
|
558 | handle?: ScriptHandle;
|
559 | internalId?: ScriptInternalId;
|
560 | }
|
561 | export interface ScriptArrayBufferRemoteValue {
|
562 | type: 'arraybuffer';
|
563 | handle?: ScriptHandle;
|
564 | internalId?: ScriptInternalId;
|
565 | }
|
566 | export interface ScriptNodeListRemoteValue {
|
567 | type: 'nodelist';
|
568 | handle?: ScriptHandle;
|
569 | internalId?: ScriptInternalId;
|
570 | value?: ScriptListRemoteValue;
|
571 | }
|
572 | export interface ScriptHtmlCollectionRemoteValue {
|
573 | type: 'htmlcollection';
|
574 | handle?: ScriptHandle;
|
575 | internalId?: ScriptInternalId;
|
576 | value?: ScriptListRemoteValue;
|
577 | }
|
578 | export interface ScriptNodeRemoteValue {
|
579 | type: 'node';
|
580 | sharedId?: ScriptSharedId;
|
581 | handle?: ScriptHandle;
|
582 | internalId?: ScriptInternalId;
|
583 | value?: ScriptNodeProperties;
|
584 | }
|
585 | export interface ScriptNodeProperties {
|
586 | nodeType: JsUint;
|
587 | childNodeCount: JsUint;
|
588 | attributes?: Record<string, string>;
|
589 | children?: ScriptNodeRemoteValue[];
|
590 | localName?: string;
|
591 | mode?: 'open' | 'closed';
|
592 | namespaceUri?: string;
|
593 | nodeValue?: string;
|
594 | shadowRoot?: ScriptNodeRemoteValue | null;
|
595 | }
|
596 | export interface ScriptWindowProxyRemoteValue {
|
597 | type: 'window';
|
598 | value: ScriptWindowProxyProperties;
|
599 | handle?: ScriptHandle;
|
600 | internalId?: ScriptInternalId;
|
601 | }
|
602 | export interface ScriptWindowProxyProperties {
|
603 | context: BrowsingContextBrowsingContext;
|
604 | }
|
605 | export type ScriptResultOwnership = 'root' | 'none';
|
606 | export interface ScriptSerializationOptions {
|
607 | maxDomDepth?: JsUint | null;
|
608 | |
609 |
|
610 |
|
611 | maxObjectDepth?: JsUint | null;
|
612 | |
613 |
|
614 |
|
615 | includeShadowTree?: 'none' | 'open' | 'all';
|
616 | }
|
617 | export type ScriptSharedId = string;
|
618 | export interface ScriptStackFrame {
|
619 | columnNumber: JsUint;
|
620 | functionName: string;
|
621 | lineNumber: JsUint;
|
622 | url: string;
|
623 | }
|
624 | export interface ScriptStackTrace {
|
625 | callFrames: ScriptStackFrame[];
|
626 | }
|
627 | export interface ScriptSource {
|
628 | realm: ScriptRealm;
|
629 | context?: BrowsingContextBrowsingContext;
|
630 | }
|
631 | export interface ScriptAddPreloadScriptResult {
|
632 | script: ScriptPreloadScript;
|
633 | }
|
634 | export interface ScriptGetRealmsResult {
|
635 | realms: ScriptRealmInfo[];
|
636 | }
|
637 | export interface ScriptMessage {
|
638 | method: 'script.message';
|
639 | params: ScriptMessageParameters;
|
640 | }
|
641 | export interface ScriptMessageParameters {
|
642 | channel: ScriptChannel;
|
643 | data: ScriptRemoteValue;
|
644 | source: ScriptSource;
|
645 | }
|
646 | export interface ScriptRealmCreated {
|
647 | method: 'script.realmCreated';
|
648 | params: ScriptRealmInfo;
|
649 | }
|
650 | export interface ScriptRealmDestroyed {
|
651 | method: 'script.realmDestroyed';
|
652 | params: ScriptRealmDestroyedParameters;
|
653 | }
|
654 | export interface ScriptRealmDestroyedParameters {
|
655 | realm: ScriptRealm;
|
656 | }
|
657 | export type StorageResult = StorageDeleteCookiesResult | StorageGetCookiesResult | StorageSetCookieResult;
|
658 | export interface StoragePartitionKey extends Extensible {
|
659 | userContext?: string;
|
660 | sourceOrigin?: string;
|
661 | }
|
662 | export interface StorageGetCookiesResult {
|
663 | cookies: NetworkCookie[];
|
664 | partitionKey: StoragePartitionKey;
|
665 | }
|
666 | export interface StorageSetCookieResult {
|
667 | partitionKey: StoragePartitionKey;
|
668 | }
|
669 | export interface StorageDeleteCookiesResult {
|
670 | partitionKey: StoragePartitionKey;
|
671 | }
|
672 | export interface LogEvent extends LogEntryAdded {
|
673 | }
|
674 | export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
675 | export type LogEntry = LogGenericLogEntry | LogConsoleLogEntry | LogJavascriptLogEntry;
|
676 | export interface LogBaseLogEntry {
|
677 | level: LogLevel;
|
678 | source: ScriptSource;
|
679 | text: string | null;
|
680 | timestamp: JsUint;
|
681 | stackTrace?: ScriptStackTrace;
|
682 | }
|
683 | export interface LogGenericLogEntry extends LogBaseLogEntry {
|
684 | type: string;
|
685 | }
|
686 | export interface LogConsoleLogEntry extends LogBaseLogEntry {
|
687 | type: 'console';
|
688 | method: string;
|
689 | args: ScriptRemoteValue[];
|
690 | }
|
691 | export interface LogJavascriptLogEntry extends LogBaseLogEntry {
|
692 | type: 'javascript';
|
693 | }
|
694 | export interface LogEntryAdded {
|
695 | method: 'log.entryAdded';
|
696 | params: LogEntry;
|
697 | }
|
698 |
|
\ | No newline at end of file |