UNPKG

26.3 kBTypeScriptView Raw
1/**
2 * !!! PLEASE DO NOT EDIT THIS FILE !!!
3 *
4 * This source file, even though checked in, is auto-generated based on the
5 * current development within the WebDriver Bidi spec. Any changes to this
6 * file need to come from the specification. You can generate this file by calling
7 *
8 * ```
9 * $ npm run generate:bidi
10 * ```
11 *
12 * from the project root. You can find the scripts that generates this file in
13 * ./scripts/bidi/**
14 */
15export interface Command {
16 id: JsUint;
17}
18export type CommandData = BrowserCommand | BrowsingContextCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand;
19export interface EmptyParams extends Extensible {
20}
21export type Extensible = Record<string, any>;
22export type JsInt = number;
23export type JsUint = number;
24export type SessionCommand = SessionEnd | SessionNew | SessionStatus | SessionSubscribe | SessionUnsubscribe;
25export interface SessionCapabilitiesRequest {
26 alwaysMatch?: SessionCapabilityRequest;
27 firstMatch?: SessionCapabilityRequest[];
28}
29export interface SessionCapabilityRequest extends Extensible {
30 acceptInsecureCerts?: boolean;
31 browserName?: string;
32 browserVersion?: string;
33 platformName?: string;
34 proxy?: {
35 proxyType?: 'pac' | 'direct' | 'autodetect' | 'system' | 'manual';
36 proxyAutoconfigUrl?: string;
37 ftpProxy?: string;
38 httpProxy?: string;
39 noProxy?: string[];
40 sslProxy?: string;
41 socksProxy?: string;
42 socksVersion?: number;
43 };
44}
45export interface SessionSubscriptionRequest {
46 events: string[];
47 contexts?: BrowsingContextBrowsingContext[];
48}
49export interface SessionStatus extends Command {
50 method: 'session.status';
51 params: EmptyParams;
52}
53export interface SessionNew extends Command {
54 method: 'session.new';
55 params: SessionNewParameters;
56}
57export interface SessionNewParameters {
58 capabilities: SessionCapabilitiesRequest;
59}
60export interface SessionEnd extends Command {
61 method: 'session.end';
62 params: EmptyParams;
63}
64export interface SessionSubscribe extends Command {
65 method: 'session.subscribe';
66 params: SessionSubscriptionRequest;
67}
68export interface SessionUnsubscribe extends Command {
69 method: 'session.unsubscribe';
70 params: SessionSubscriptionRequest;
71}
72export interface BrowserCommand extends BrowserClose {
73}
74export interface BrowserClose extends Command {
75 method: 'browser.close';
76 params: EmptyParams;
77}
78export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetViewport | BrowsingContextTraverseHistory;
79export type BrowsingContextBrowsingContext = string;
80export type BrowsingContextLocator = BrowsingContextCssLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
81export interface BrowsingContextCssLocator {
82 type: 'css';
83 value: string;
84}
85export interface BrowsingContextInnerTextLocator {
86 type: 'innerText';
87 value: string;
88 ignoreCase?: boolean;
89 matchType?: 'full' | 'partial';
90 maxDepth?: JsUint;
91}
92export interface BrowsingContextXPathLocator {
93 type: 'xpath';
94 value: string;
95}
96export type BrowsingContextNavigation = string;
97export type BrowsingContextReadinessState = 'none' | 'interactive' | 'complete';
98export interface BrowsingContextActivate extends Command {
99 method: 'browsingContext.activate';
100 params: BrowsingContextActivateParameters;
101}
102export interface BrowsingContextActivateParameters {
103 context: BrowsingContextBrowsingContext;
104}
105export interface BrowsingContextCaptureScreenshot extends Command {
106 method: 'browsingContext.captureScreenshot';
107 params: BrowsingContextCaptureScreenshotParameters;
108}
109export interface BrowsingContextCaptureScreenshotParameters {
110 context: BrowsingContextBrowsingContext;
111 /**
112 * @default 'viewport'
113 */
114 origin?: 'viewport' | 'document';
115 format?: BrowsingContextImageFormat;
116 clip?: BrowsingContextClipRectangle;
117}
118export interface BrowsingContextImageFormat {
119 type: string;
120 quality?: number;
121}
122export type BrowsingContextClipRectangle = BrowsingContextBoxClipRectangle | BrowsingContextElementClipRectangle;
123export interface BrowsingContextElementClipRectangle {
124 type: 'element';
125 element: ScriptSharedReference;
126}
127export interface BrowsingContextBoxClipRectangle {
128 type: 'box';
129 x: number;
130 y: number;
131 width: number;
132 height: number;
133}
134export interface BrowsingContextClose extends Command {
135 method: 'browsingContext.close';
136 params: BrowsingContextCloseParameters;
137}
138export interface BrowsingContextCloseParameters {
139 context: BrowsingContextBrowsingContext;
140 promptUnload?: boolean;
141}
142export interface BrowsingContextCreate extends Command {
143 method: 'browsingContext.create';
144 params: BrowsingContextCreateParameters;
145}
146export type BrowsingContextCreateType = 'tab' | 'window';
147export interface BrowsingContextCreateParameters {
148 type: BrowsingContextCreateType;
149 referenceContext?: BrowsingContextBrowsingContext;
150 background?: boolean;
151}
152export interface BrowsingContextGetTree extends Command {
153 method: 'browsingContext.getTree';
154 params: BrowsingContextGetTreeParameters;
155}
156export interface BrowsingContextGetTreeParameters {
157 maxDepth?: JsUint;
158 root?: BrowsingContextBrowsingContext;
159}
160export interface BrowsingContextHandleUserPrompt extends Command {
161 method: 'browsingContext.handleUserPrompt';
162 params: BrowsingContextHandleUserPromptParameters;
163}
164export interface BrowsingContextHandleUserPromptParameters {
165 context: BrowsingContextBrowsingContext;
166 accept?: boolean;
167 userText?: string;
168}
169export interface BrowsingContextLocateNodes extends Command {
170 method: 'browsingContext.locateNodes';
171 params: BrowsingContextLocateNodesParameters;
172}
173export interface BrowsingContextLocateNodesParameters {
174 context: BrowsingContextBrowsingContext;
175 locator: BrowsingContextLocator;
176 maxNodeCount?: JsUint;
177 ownership?: ScriptResultOwnership;
178 sandbox?: string;
179 serializationOptions?: ScriptSerializationOptions;
180 startNodes?: ScriptSharedReference[];
181}
182export interface BrowsingContextNavigate extends Command {
183 method: 'browsingContext.navigate';
184 params: BrowsingContextNavigateParameters;
185}
186export interface BrowsingContextNavigateParameters {
187 context: BrowsingContextBrowsingContext;
188 url: string;
189 wait?: BrowsingContextReadinessState;
190}
191export interface BrowsingContextPrint extends Command {
192 method: 'browsingContext.print';
193 params: BrowsingContextPrintParameters;
194}
195export interface BrowsingContextPrintParameters {
196 context: BrowsingContextBrowsingContext;
197 background?: boolean;
198 margin?: BrowsingContextPrintMarginParameters;
199 /**
200 * @default 'portrait'
201 */
202 orientation?: 'portrait' | 'landscape';
203 page?: BrowsingContextPrintPageParameters;
204 pageRanges?: (JsUint | string)[];
205 /**
206 * @default 1
207 */
208 scale?: number;
209 /**
210 * @default true
211 */
212 shrinkToFit?: boolean;
213}
214export interface BrowsingContextPrintMarginParameters {
215 /**
216 * @default 1
217 */
218 bottom?: number;
219 /**
220 * @default 1
221 */
222 left?: number;
223 /**
224 * @default 1
225 */
226 right?: number;
227 /**
228 * @default 1
229 */
230 top?: number;
231}
232export interface BrowsingContextPrintPageParameters {
233 /**
234 * @default 27.94
235 */
236 height?: number;
237 /**
238 * @default 21.59
239 */
240 width?: number;
241}
242export interface BrowsingContextReload extends Command {
243 method: 'browsingContext.reload';
244 params: BrowsingContextReloadParameters;
245}
246export interface BrowsingContextReloadParameters {
247 context: BrowsingContextBrowsingContext;
248 ignoreCache?: boolean;
249 wait?: BrowsingContextReadinessState;
250}
251export interface BrowsingContextSetViewport extends Command {
252 method: 'browsingContext.setViewport';
253 params: BrowsingContextSetViewportParameters;
254}
255export interface BrowsingContextSetViewportParameters {
256 context: BrowsingContextBrowsingContext;
257 viewport?: BrowsingContextViewport | null;
258 devicePixelRatio?: number | null;
259}
260export interface BrowsingContextViewport {
261 width: JsUint;
262 height: JsUint;
263}
264export interface BrowsingContextTraverseHistory extends Command {
265 method: 'browsingContext.traverseHistory';
266 params: BrowsingContextTraverseHistoryParameters;
267}
268export interface BrowsingContextTraverseHistoryParameters {
269 context: BrowsingContextBrowsingContext;
270 delta: JsInt;
271}
272export type NetworkCommand = NetworkAddIntercept | NetworkContinueRequest | NetworkContinueResponse | NetworkContinueWithAuth | NetworkFailRequest | NetworkProvideResponse | NetworkRemoveIntercept;
273export interface NetworkAuthCredentials {
274 type: 'password';
275 username: string;
276 password: string;
277}
278export type NetworkBytesValue = NetworkStringValue | NetworkBase64Value;
279export interface NetworkStringValue {
280 type: 'string';
281 value: string;
282}
283export interface NetworkBase64Value {
284 type: 'base64';
285 value: string;
286}
287export interface NetworkCookie {
288 name: string;
289 value: NetworkBytesValue;
290 domain: string;
291 path: string;
292 size: JsUint;
293 httpOnly: boolean;
294 secure: boolean;
295 sameSite: 'strict' | 'lax' | 'none';
296 expiry?: JsUint;
297}
298export interface NetworkCookieHeader {
299 name: string;
300 value: NetworkBytesValue;
301}
302export interface NetworkHeader {
303 name: string;
304 value: NetworkBytesValue;
305}
306export type NetworkIntercept = string;
307export type NetworkRequest = string;
308export interface NetworkSetCookieHeader {
309 name: string;
310 value: NetworkBytesValue;
311 domain?: string;
312 httpOnly?: boolean;
313 expiry?: string;
314 maxAge?: JsInt;
315 path?: string;
316 sameSite?: 'strict' | 'lax' | 'none';
317 secure?: boolean;
318}
319export type NetworkUrlPattern = NetworkUrlPatternPattern | NetworkUrlPatternString;
320export interface NetworkUrlPatternPattern {
321 type: 'pattern';
322 protocol?: string;
323 hostname?: string;
324 port?: string;
325 pathname?: string;
326 search?: string;
327}
328export interface NetworkUrlPatternString {
329 type: 'string';
330 pattern: string;
331}
332export interface NetworkAddIntercept extends Command {
333 method: 'network.addIntercept';
334 params: NetworkAddInterceptParameters;
335}
336export interface NetworkAddInterceptParameters {
337 phases: NetworkInterceptPhase[];
338 urlPatterns?: NetworkUrlPattern[];
339}
340export type NetworkInterceptPhase = 'beforeRequestSent' | 'responseStarted' | 'authRequired';
341export interface NetworkContinueRequest extends Command {
342 method: 'network.continueRequest';
343 params: NetworkContinueRequestParameters;
344}
345export interface NetworkContinueRequestParameters {
346 request: NetworkRequest;
347 body?: NetworkBytesValue;
348 cookies?: NetworkCookieHeader[];
349 headers?: NetworkHeader[];
350 method?: string;
351 url?: string;
352}
353export interface NetworkContinueResponse extends Command {
354 method: 'network.continueResponse';
355 params: NetworkContinueResponseParameters;
356}
357export interface NetworkContinueResponseParameters {
358 request: NetworkRequest;
359 cookies?: NetworkSetCookieHeader[];
360 credentials?: NetworkAuthCredentials;
361 headers?: NetworkHeader[];
362 reasonPhrase?: string;
363 statusCode?: JsUint;
364}
365export interface NetworkContinueWithAuth extends Command {
366 method: 'network.continueWithAuth';
367 params: NetworkContinueWithAuthParameters;
368}
369export interface NetworkContinueWithAuthParameters extends NetworkContinueWithAuthCredentials {
370 request: NetworkRequest;
371}
372export interface NetworkContinueWithAuthCredentials {
373 action: 'provideCredentials';
374 credentials: NetworkAuthCredentials;
375}
376export interface NetworkContinueWithAuthNoCredentials {
377 action: 'default' | 'cancel';
378}
379export interface NetworkFailRequest extends Command {
380 method: 'network.failRequest';
381 params: NetworkFailRequestParameters;
382}
383export interface NetworkFailRequestParameters {
384 request: NetworkRequest;
385}
386export interface NetworkProvideResponse extends Command {
387 method: 'network.provideResponse';
388 params: NetworkProvideResponseParameters;
389}
390export interface NetworkProvideResponseParameters {
391 request: NetworkRequest;
392 body?: NetworkBytesValue;
393 cookies?: NetworkSetCookieHeader[];
394 headers?: NetworkHeader[];
395 reasonPhrase?: string;
396 statusCode?: JsUint;
397}
398export interface NetworkRemoveIntercept extends Command {
399 method: 'network.removeIntercept';
400 params: NetworkRemoveInterceptParameters;
401}
402export interface NetworkRemoveInterceptParameters {
403 intercept: NetworkIntercept;
404}
405export type ScriptCommand = ScriptAddPreloadScript | ScriptCallFunction | ScriptDisown | ScriptEvaluate | ScriptGetRealms | ScriptRemovePreloadScript;
406export type ScriptChannel = string;
407export interface ScriptChannelValue {
408 type: 'channel';
409 value: ScriptChannelProperties;
410}
411export interface ScriptChannelProperties {
412 channel: ScriptChannel;
413 serializationOptions?: ScriptSerializationOptions;
414 ownership?: ScriptResultOwnership;
415}
416export type ScriptEvaluateResult = ScriptEvaluateResultSuccess | ScriptEvaluateResultException;
417export interface ScriptEvaluateResultSuccess {
418 type: 'success';
419 result: ScriptRemoteValue;
420 realm: ScriptRealm;
421}
422export interface ScriptEvaluateResultException {
423 type: 'exception';
424 exceptionDetails: ScriptExceptionDetails;
425 realm: ScriptRealm;
426}
427export interface ScriptExceptionDetails {
428 columnNumber: JsUint;
429 exception: ScriptRemoteValue;
430 lineNumber: JsUint;
431 stackTrace: ScriptStackTrace;
432 text: string;
433}
434export type ScriptHandle = string;
435export type ScriptInternalId = string;
436export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
437export type ScriptListLocalValue = (ScriptLocalValue)[];
438export interface ScriptArrayLocalValue {
439 type: 'array';
440 value: ScriptListLocalValue;
441}
442export interface ScriptDateLocalValue {
443 type: 'date';
444 value: string;
445}
446export type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
447export interface ScriptMapLocalValue {
448 type: 'map';
449 value: ScriptMappingLocalValue;
450}
451export interface ScriptObjectLocalValue {
452 type: 'object';
453 value: ScriptMappingLocalValue;
454}
455export interface ScriptRegExpValue {
456 pattern: string;
457 flags?: string;
458}
459export interface ScriptRegExpLocalValue {
460 type: 'regexp';
461 value: ScriptRegExpValue;
462}
463export interface ScriptSetLocalValue {
464 type: 'set';
465 value: ScriptListLocalValue;
466}
467export type ScriptPreloadScript = string;
468export type ScriptRealm = string;
469export type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
470export interface ScriptUndefinedValue {
471 type: 'undefined';
472}
473export interface ScriptNullValue {
474 type: null;
475}
476export interface ScriptStringValue {
477 type: 'string';
478 value: string;
479}
480export type ScriptSpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
481export interface ScriptNumberValue {
482 type: 'number';
483 value: Number | ScriptSpecialNumber;
484}
485export interface ScriptBooleanValue {
486 type: 'boolean';
487 value: boolean;
488}
489export interface ScriptBigIntValue {
490 type: 'bigint';
491 value: string;
492}
493export type ScriptRealmType = 'window' | 'dedicated-worker' | 'shared-worker' | 'service-worker' | 'worker' | 'paint-worklet' | 'audio-worklet' | 'worklet';
494export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
495export interface ScriptSharedReference extends Extensible {
496 sharedId: ScriptSharedId;
497 handle?: ScriptHandle;
498}
499export interface ScriptRemoteObjectReference extends Extensible {
500 handle: ScriptHandle;
501 sharedId?: ScriptSharedId;
502}
503export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptIteratorRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
504export type ScriptListRemoteValue = (ScriptRemoteValue)[];
505export type ScriptMappingRemoteValue = (ScriptRemoteValue | ScriptRemoteValue)[];
506export interface ScriptSymbolRemoteValue {
507 type: 'symbol';
508 handle?: ScriptHandle;
509 internalId?: ScriptInternalId;
510}
511export interface ScriptArrayRemoteValue {
512 type: 'array';
513 handle?: ScriptHandle;
514 internalId?: ScriptInternalId;
515 value?: ScriptListRemoteValue;
516}
517export interface ScriptObjectRemoteValue {
518 type: 'object';
519 handle?: ScriptHandle;
520 internalId?: ScriptInternalId;
521 value?: ScriptMappingRemoteValue;
522}
523export interface ScriptFunctionRemoteValue {
524 type: 'function';
525 handle?: ScriptHandle;
526 internalId?: ScriptInternalId;
527}
528export interface ScriptRegExpRemoteValue extends ScriptRegExpLocalValue {
529 handle?: ScriptHandle;
530 internalId?: ScriptInternalId;
531}
532export interface ScriptDateRemoteValue extends ScriptDateLocalValue {
533 handle?: ScriptHandle;
534 internalId?: ScriptInternalId;
535}
536export interface ScriptMapRemoteValue {
537 type: 'map';
538 handle?: ScriptHandle;
539 internalId?: ScriptInternalId;
540 value?: ScriptMappingRemoteValue;
541}
542export interface ScriptSetRemoteValue {
543 type: 'set';
544 handle?: ScriptHandle;
545 internalId?: ScriptInternalId;
546 value?: ScriptListRemoteValue;
547}
548export interface ScriptWeakMapRemoteValue {
549 type: 'weakmap';
550 handle?: ScriptHandle;
551 internalId?: ScriptInternalId;
552}
553export interface ScriptWeakSetRemoteValue {
554 type: 'weakset';
555 handle?: ScriptHandle;
556 internalId?: ScriptInternalId;
557}
558export interface ScriptIteratorRemoteValue {
559 type: 'iterator';
560 handle?: ScriptHandle;
561 internalId?: ScriptInternalId;
562}
563export interface ScriptGeneratorRemoteValue {
564 type: 'generator';
565 handle?: ScriptHandle;
566 internalId?: ScriptInternalId;
567}
568export interface ScriptErrorRemoteValue {
569 type: 'error';
570 handle?: ScriptHandle;
571 internalId?: ScriptInternalId;
572}
573export interface ScriptProxyRemoteValue {
574 type: 'proxy';
575 handle?: ScriptHandle;
576 internalId?: ScriptInternalId;
577}
578export interface ScriptPromiseRemoteValue {
579 type: 'promise';
580 handle?: ScriptHandle;
581 internalId?: ScriptInternalId;
582}
583export interface ScriptTypedArrayRemoteValue {
584 type: 'typedarray';
585 handle?: ScriptHandle;
586 internalId?: ScriptInternalId;
587}
588export interface ScriptArrayBufferRemoteValue {
589 type: 'arraybuffer';
590 handle?: ScriptHandle;
591 internalId?: ScriptInternalId;
592}
593export interface ScriptNodeListRemoteValue {
594 type: 'nodelist';
595 handle?: ScriptHandle;
596 internalId?: ScriptInternalId;
597 value?: ScriptListRemoteValue;
598}
599export interface ScriptHtmlCollectionRemoteValue {
600 type: 'htmlcollection';
601 handle?: ScriptHandle;
602 internalId?: ScriptInternalId;
603 value?: ScriptListRemoteValue;
604}
605export interface ScriptNodeRemoteValue {
606 type: 'node';
607 sharedId?: ScriptSharedId;
608 handle?: ScriptHandle;
609 internalId?: ScriptInternalId;
610 value?: ScriptNodeProperties;
611}
612export interface ScriptNodeProperties {
613 nodeType: JsUint;
614 childNodeCount: JsUint;
615 attributes?: Record<string, string>;
616 children?: ScriptNodeRemoteValue[];
617 localName?: string;
618 mode?: 'open' | 'closed';
619 namespaceUri?: string;
620 nodeValue?: string;
621 shadowRoot?: ScriptNodeRemoteValue | null;
622}
623export interface ScriptWindowProxyRemoteValue {
624 type: 'window';
625 value: ScriptWindowProxyProperties;
626 handle?: ScriptHandle;
627 internalId?: ScriptInternalId;
628}
629export interface ScriptWindowProxyProperties {
630 context: BrowsingContextBrowsingContext;
631}
632export type ScriptResultOwnership = 'root' | 'none';
633export interface ScriptSerializationOptions {
634 maxDomDepth?: JsUint | null;
635 /**
636 * @default null
637 */
638 maxObjectDepth?: JsUint | null;
639 /**
640 * @default 'none'
641 */
642 includeShadowTree?: 'none' | 'open' | 'all';
643}
644export type ScriptSharedId = string;
645export interface ScriptStackFrame {
646 columnNumber: JsUint;
647 functionName: string;
648 lineNumber: JsUint;
649 url: string;
650}
651export interface ScriptStackTrace {
652 callFrames: ScriptStackFrame[];
653}
654export interface ScriptRealmTarget {
655 realm: ScriptRealm;
656}
657export interface ScriptContextTarget {
658 context: BrowsingContextBrowsingContext;
659 sandbox?: string;
660}
661export type ScriptTarget = ScriptRealmTarget | ScriptContextTarget;
662export interface ScriptAddPreloadScript extends Command {
663 method: 'script.addPreloadScript';
664 params: ScriptAddPreloadScriptParameters;
665}
666export interface ScriptAddPreloadScriptParameters {
667 functionDeclaration: string;
668 arguments?: ScriptChannelValue[];
669 contexts?: BrowsingContextBrowsingContext[];
670 sandbox?: string;
671}
672export interface ScriptDisown extends Command {
673 method: 'script.disown';
674 params: ScriptDisownParameters;
675}
676export interface ScriptDisownParameters {
677 handles: ScriptHandle[];
678 target: ScriptTarget;
679}
680export interface ScriptCallFunction extends Command {
681 method: 'script.callFunction';
682 params: ScriptCallFunctionParameters;
683}
684export interface ScriptCallFunctionParameters {
685 functionDeclaration: string;
686 awaitPromise: boolean;
687 target: ScriptTarget;
688 arguments?: ScriptLocalValue[];
689 resultOwnership?: ScriptResultOwnership;
690 serializationOptions?: ScriptSerializationOptions;
691 this?: ScriptLocalValue;
692 userActivation?: boolean;
693}
694export interface ScriptEvaluate extends Command {
695 method: 'script.evaluate';
696 params: ScriptEvaluateParameters;
697}
698export interface ScriptEvaluateParameters {
699 expression: string;
700 target: ScriptTarget;
701 awaitPromise: boolean;
702 resultOwnership?: ScriptResultOwnership;
703 serializationOptions?: ScriptSerializationOptions;
704 userActivation?: boolean;
705}
706export interface ScriptGetRealms extends Command {
707 method: 'script.getRealms';
708 params: ScriptGetRealmsParameters;
709}
710export interface ScriptGetRealmsParameters {
711 context?: BrowsingContextBrowsingContext;
712 type?: ScriptRealmType;
713}
714export interface ScriptRemovePreloadScript extends Command {
715 method: 'script.removePreloadScript';
716 params: ScriptRemovePreloadScriptParameters;
717}
718export interface ScriptRemovePreloadScriptParameters {
719 script: ScriptPreloadScript;
720}
721export type InputCommand = InputPerformActions | InputReleaseActions;
722export interface InputElementOrigin {
723 type: 'element';
724 element: ScriptSharedReference;
725}
726export interface InputPerformActions extends Command {
727 method: 'input.performActions';
728 params: InputPerformActionsParameters;
729}
730export interface InputPerformActionsParameters {
731 context: BrowsingContextBrowsingContext;
732 actions: InputSourceActions[];
733}
734export type InputSourceActions = InputNoneSourceActions | InputKeySourceActions | InputPointerSourceActions | InputWheelSourceActions;
735export interface InputNoneSourceActions {
736 type: 'none';
737 id: string;
738 actions: InputNoneSourceAction[];
739}
740export type InputNoneSourceAction = InputPauseAction;
741export interface InputKeySourceActions {
742 type: 'key';
743 id: string;
744 actions: InputKeySourceAction[];
745}
746export type InputKeySourceAction = InputPauseAction | InputKeyDownAction | InputKeyUpAction;
747export interface InputPointerSourceActions {
748 type: 'pointer';
749 id: string;
750 parameters?: InputPointerParameters;
751 actions: InputPointerSourceAction[];
752}
753export type InputPointerType = 'mouse' | 'pen' | 'touch';
754export interface InputPointerParameters {
755 /**
756 * @default 'mouse'
757 */
758 pointerType?: InputPointerType;
759}
760export type InputPointerSourceAction = InputPauseAction | InputPointerDownAction | InputPointerUpAction | InputPointerMoveAction;
761export interface InputWheelSourceActions {
762 type: 'wheel';
763 id: string;
764 actions: InputWheelSourceAction[];
765}
766export type InputWheelSourceAction = InputPauseAction | InputWheelScrollAction;
767export interface InputPauseAction {
768 type: 'pause';
769 duration?: JsUint;
770}
771export interface InputKeyDownAction {
772 type: 'keyDown';
773 value: string;
774}
775export interface InputKeyUpAction {
776 type: 'keyUp';
777 value: string;
778}
779export interface InputPointerUpAction extends InputPointerCommonProperties {
780 type: 'pointerUp';
781 button: JsUint;
782}
783export interface InputPointerDownAction extends InputPointerCommonProperties {
784 type: 'pointerDown';
785 button: JsUint;
786}
787export interface InputPointerMoveAction extends InputPointerCommonProperties {
788 type: 'pointerMove';
789 x: JsInt;
790 y: JsInt;
791 duration?: JsUint;
792 origin?: InputOrigin;
793}
794export interface InputWheelScrollAction {
795 type: 'scroll';
796 x: JsInt;
797 y: JsInt;
798 deltaX: JsInt;
799 deltaY: JsInt;
800 duration?: JsUint;
801 /**
802 * @default 'viewport'
803 */
804 origin?: InputOrigin;
805}
806export interface InputPointerCommonProperties {
807 /**
808 * @default 1
809 */
810 width?: JsUint;
811 /**
812 * @default 1
813 */
814 height?: JsUint;
815 pressure?: number;
816 tangentialPressure?: number;
817 /**
818 * 0 .. Math.PI / 2
819 */
820 twist?: number;
821 /**
822 * 0 .. 2 * Math.PI
823 */
824 altitudeAngle?: number;
825 azimuthAngle?: number;
826}
827export type InputOrigin = 'viewport' | 'pointer' | InputElementOrigin;
828export interface InputReleaseActions extends Command {
829 method: 'input.releaseActions';
830 params: InputReleaseActionsParameters;
831}
832export interface InputReleaseActionsParameters {
833 context: BrowsingContextBrowsingContext;
834}
835//# sourceMappingURL=remoteTypes.d.ts.map
\No newline at end of file