This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
/
crdp.d.ts
8445 lines (5556 loc) · 279 KB
/
crdp.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/***********************************************************
* Auto-generated by protocolToCrdp. Do not edit manually.
***********************************************************/
export namespace Crdp {
export type integer = number
export interface CrdpClient {
Schema: SchemaClient;
Runtime: RuntimeClient;
Debugger: DebuggerClient;
Console: ConsoleClient;
Profiler: ProfilerClient;
HeapProfiler: HeapProfilerClient;
Inspector: InspectorClient;
Memory: MemoryClient;
Page: PageClient;
Rendering: RenderingClient;
Emulation: EmulationClient;
Security: SecurityClient;
Network: NetworkClient;
Database: DatabaseClient;
IndexedDB: IndexedDBClient;
CacheStorage: CacheStorageClient;
DOMStorage: DOMStorageClient;
ApplicationCache: ApplicationCacheClient;
DOM: DOMClient;
CSS: CSSClient;
IO: IOClient;
DOMDebugger: DOMDebuggerClient;
Target: TargetClient;
ServiceWorker: ServiceWorkerClient;
Input: InputClient;
LayerTree: LayerTreeClient;
DeviceOrientation: DeviceOrientationClient;
Tracing: TracingClient;
Animation: AnimationClient;
Accessibility: AccessibilityClient;
Storage: StorageClient;
Log: LogClient;
SystemInfo: SystemInfoClient;
Tethering: TetheringClient;
Browser: BrowserClient;
}
export interface CrdpServer {
Schema: SchemaServer;
Runtime: RuntimeServer;
Debugger: DebuggerServer;
Console: ConsoleServer;
Profiler: ProfilerServer;
HeapProfiler: HeapProfilerServer;
Inspector: InspectorServer;
Memory: MemoryServer;
Page: PageServer;
Rendering: RenderingServer;
Emulation: EmulationServer;
Security: SecurityServer;
Network: NetworkServer;
Database: DatabaseServer;
IndexedDB: IndexedDBServer;
CacheStorage: CacheStorageServer;
DOMStorage: DOMStorageServer;
ApplicationCache: ApplicationCacheServer;
DOM: DOMServer;
CSS: CSSServer;
IO: IOServer;
DOMDebugger: DOMDebuggerServer;
Target: TargetServer;
ServiceWorker: ServiceWorkerServer;
Input: InputServer;
LayerTree: LayerTreeServer;
DeviceOrientation: DeviceOrientationServer;
Tracing: TracingServer;
Animation: AnimationServer;
Accessibility: AccessibilityServer;
Storage: StorageServer;
Log: LogServer;
SystemInfo: SystemInfoServer;
Tethering: TetheringServer;
Browser: BrowserServer;
}
/** Provides information about the protocol schema. */
export module Schema {
/** Description of the protocol domain. */
export interface Domain {
/** Domain name. */
name: string;
/** Domain version. */
version: string;
}
export interface GetDomainsResponse {
/** List of supported domains. */
domains: Domain[];
}
}
export interface SchemaCommands {
/** Returns supported domains. */
getDomains?: () => Promise<Schema.GetDomainsResponse>;
}
export interface SchemaClient extends SchemaCommands {
}
export interface SchemaServer {
expose(domain: SchemaCommands): void;
}
/** Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group. */
export module Runtime {
/** Unique script identifier. */
export type ScriptId = string;
/** Unique object identifier. */
export type RemoteObjectId = string;
/** Primitive value which cannot be JSON-stringified. */
export type UnserializableValue = ('Infinity' | 'NaN' | '-Infinity' | '-0');
/** Mirror object referencing original JavaScript object. */
export interface RemoteObject {
/** Object type. */
type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol');
/** Object subtype hint. Specified for 'object' type values only. */
subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray');
/** Object class (constructor) name. Specified for 'object' type values only. */
className?: string;
/** Remote object value in case of primitive values or JSON values (if it was requested). */
value?: any;
/** Primitive value which can not be JSON-stringified does not have 'value', but gets this property. */
unserializableValue?: UnserializableValue;
/** String representation of the object. */
description?: string;
/** Unique object identifier (for non-primitive values). */
objectId?: RemoteObjectId;
/** Preview containing abbreviated property values. Specified for 'object' type values only. */
preview?: ObjectPreview;
customPreview?: CustomPreview;
}
export interface CustomPreview {
header: string;
hasBody: boolean;
formatterObjectId: RemoteObjectId;
bindRemoteObjectFunctionId: RemoteObjectId;
configObjectId?: RemoteObjectId;
}
/** Object containing abbreviated remote object value. */
export interface ObjectPreview {
/** Object type. */
type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol');
/** Object subtype hint. Specified for 'object' type values only. */
subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error');
/** String representation of the object. */
description?: string;
/** True iff some of the properties or entries of the original object did not fit. */
overflow: boolean;
/** List of the properties. */
properties: PropertyPreview[];
/** List of the entries. Specified for 'map</code> and <code>set' subtype values only. */
entries?: EntryPreview[];
}
export interface PropertyPreview {
/** Property name. */
name: string;
/** Object type. Accessor means that the property itself is an accessor property. */
type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'accessor');
/** User-friendly property value string. */
value?: string;
/** Nested value preview. */
valuePreview?: ObjectPreview;
/** Object subtype hint. Specified for 'object' type values only. */
subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error');
}
export interface EntryPreview {
/** Preview of the key. Specified for map-like collection entries. */
key?: ObjectPreview;
/** Preview of the value. */
value: ObjectPreview;
}
/** Object property descriptor. */
export interface PropertyDescriptor {
/** Property name or symbol description. */
name: string;
/** The value associated with the property. */
value?: RemoteObject;
/** True if the value associated with the property may be changed (data descriptors only). */
writable?: boolean;
/** A function which serves as a getter for the property, or 'undefined' if there is no getter (accessor descriptors only). */
get?: RemoteObject;
/** A function which serves as a setter for the property, or 'undefined' if there is no setter (accessor descriptors only). */
set?: RemoteObject;
/** True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. */
configurable: boolean;
/** True if this property shows up during enumeration of the properties on the corresponding object. */
enumerable: boolean;
/** True if the result was thrown during the evaluation. */
wasThrown?: boolean;
/** True if the property is owned for the object. */
isOwn?: boolean;
/** Property symbol object, if the property is of the 'symbol' type. */
symbol?: RemoteObject;
}
/** Object internal property descriptor. This property isn't normally visible in JavaScript code. */
export interface InternalPropertyDescriptor {
/** Conventional property name. */
name: string;
/** The value associated with the property. */
value?: RemoteObject;
}
/** Represents function call argument. Either remote object id 'objectId</code>, primitive <code>value', unserializable primitive value or neither of (for undefined) them should be specified. */
export interface CallArgument {
/** Primitive value. */
value?: any;
/** Primitive value which can not be JSON-stringified. */
unserializableValue?: UnserializableValue;
/** Remote object handle. */
objectId?: RemoteObjectId;
}
/** Id of an execution context. */
export type ExecutionContextId = integer;
/** Description of an isolated world. */
export interface ExecutionContextDescription {
/** Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. */
id: ExecutionContextId;
/** Execution context origin. */
origin: string;
/** Human readable name describing given context. */
name: string;
/** Embedder-specific auxiliary data. */
auxData?: any;
}
/** Detailed information about exception (or error) that was thrown during script compilation or execution. */
export interface ExceptionDetails {
/** Exception id. */
exceptionId: integer;
/** Exception text, which should be used together with exception object when available. */
text: string;
/** Line number of the exception location (0-based). */
lineNumber: integer;
/** Column number of the exception location (0-based). */
columnNumber: integer;
/** Script ID of the exception location. */
scriptId?: ScriptId;
/** URL of the exception location, to be used when the script was not reported. */
url?: string;
/** JavaScript stack trace if available. */
stackTrace?: StackTrace;
/** Exception object if available. */
exception?: RemoteObject;
/** Identifier of the context where exception happened. */
executionContextId?: ExecutionContextId;
}
/** Number of milliseconds since epoch. */
export type Timestamp = number;
/** Stack entry for runtime errors and assertions. */
export interface CallFrame {
/** JavaScript function name. */
functionName: string;
/** JavaScript script id. */
scriptId: ScriptId;
/** JavaScript script name or url. */
url: string;
/** JavaScript script line number (0-based). */
lineNumber: integer;
/** JavaScript script column number (0-based). */
columnNumber: integer;
}
/** Call frames for assertions or error messages. */
export interface StackTrace {
/** String label of this stack trace. For async traces this may be a name of the function that initiated the async call. */
description?: string;
/** JavaScript function name. */
callFrames: CallFrame[];
/** Asynchronous JavaScript stack trace that preceded this stack, if available. */
parent?: StackTrace;
/** Creation frame of the Promise which produced the next synchronous trace when resolved, if available. */
promiseCreationFrame?: CallFrame;
}
export interface EvaluateRequest {
/** Expression to evaluate. */
expression: string;
/** Symbolic group name that can be used to release multiple objects. */
objectGroup?: string;
/** Determines whether Command Line API should be available during the evaluation. */
includeCommandLineAPI?: boolean;
/** In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides 'setPauseOnException' state. */
silent?: boolean;
/** Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */
contextId?: ExecutionContextId;
/** Whether the result is expected to be a JSON object that should be sent by value. */
returnByValue?: boolean;
/** Whether preview should be generated for the result. */
generatePreview?: boolean;
/** Whether execution should be treated as initiated by user in the UI. */
userGesture?: boolean;
/** Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. */
awaitPromise?: boolean;
}
export interface EvaluateResponse {
/** Evaluation result. */
result: RemoteObject;
/** Exception details. */
exceptionDetails?: ExceptionDetails;
}
export interface AwaitPromiseRequest {
/** Identifier of the promise. */
promiseObjectId: RemoteObjectId;
/** Whether the result is expected to be a JSON object that should be sent by value. */
returnByValue?: boolean;
/** Whether preview should be generated for the result. */
generatePreview?: boolean;
}
export interface AwaitPromiseResponse {
/** Promise result. Will contain rejected value if promise was rejected. */
result: RemoteObject;
/** Exception details if stack strace is available. */
exceptionDetails?: ExceptionDetails;
}
export interface CallFunctionOnRequest {
/** Identifier of the object to call function on. */
objectId: RemoteObjectId;
/** Declaration of the function to call. */
functionDeclaration: string;
/** Call arguments. All call arguments must belong to the same JavaScript world as the target object. */
arguments?: CallArgument[];
/** In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides 'setPauseOnException' state. */
silent?: boolean;
/** Whether the result is expected to be a JSON object which should be sent by value. */
returnByValue?: boolean;
/** Whether preview should be generated for the result. */
generatePreview?: boolean;
/** Whether execution should be treated as initiated by user in the UI. */
userGesture?: boolean;
/** Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. */
awaitPromise?: boolean;
}
export interface CallFunctionOnResponse {
/** Call result. */
result: RemoteObject;
/** Exception details. */
exceptionDetails?: ExceptionDetails;
}
export interface GetPropertiesRequest {
/** Identifier of the object to return properties for. */
objectId: RemoteObjectId;
/** If true, returns properties belonging only to the element itself, not to its prototype chain. */
ownProperties?: boolean;
/** If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. */
accessorPropertiesOnly?: boolean;
/** Whether preview should be generated for the results. */
generatePreview?: boolean;
}
export interface GetPropertiesResponse {
/** Object properties. */
result: PropertyDescriptor[];
/** Internal object properties (only of the element itself). */
internalProperties?: InternalPropertyDescriptor[];
/** Exception details. */
exceptionDetails?: ExceptionDetails;
}
export interface ReleaseObjectRequest {
/** Identifier of the object to release. */
objectId: RemoteObjectId;
}
export interface ReleaseObjectGroupRequest {
/** Symbolic object group name. */
objectGroup: string;
}
export interface SetCustomObjectFormatterEnabledRequest {
enabled: boolean;
}
export interface CompileScriptRequest {
/** Expression to compile. */
expression: string;
/** Source url to be set for the script. */
sourceURL: string;
/** Specifies whether the compiled script should be persisted. */
persistScript: boolean;
/** Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */
executionContextId?: ExecutionContextId;
}
export interface CompileScriptResponse {
/** Id of the script. */
scriptId?: ScriptId;
/** Exception details. */
exceptionDetails?: ExceptionDetails;
}
export interface RunScriptRequest {
/** Id of the script to run. */
scriptId: ScriptId;
/** Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. */
executionContextId?: ExecutionContextId;
/** Symbolic group name that can be used to release multiple objects. */
objectGroup?: string;
/** In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides 'setPauseOnException' state. */
silent?: boolean;
/** Determines whether Command Line API should be available during the evaluation. */
includeCommandLineAPI?: boolean;
/** Whether the result is expected to be a JSON object which should be sent by value. */
returnByValue?: boolean;
/** Whether preview should be generated for the result. */
generatePreview?: boolean;
/** Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. */
awaitPromise?: boolean;
}
export interface RunScriptResponse {
/** Run result. */
result: RemoteObject;
/** Exception details. */
exceptionDetails?: ExceptionDetails;
}
export interface ExecutionContextCreatedEvent {
/** A newly created execution contex. */
context: ExecutionContextDescription;
}
export interface ExecutionContextDestroyedEvent {
/** Id of the destroyed context */
executionContextId: ExecutionContextId;
}
export interface ExceptionThrownEvent {
/** Timestamp of the exception. */
timestamp: Timestamp;
exceptionDetails: ExceptionDetails;
}
export interface ExceptionRevokedEvent {
/** Reason describing why exception was revoked. */
reason: string;
/** The id of revoked exception, as reported in 'exceptionUnhandled'. */
exceptionId: integer;
}
export interface ConsoleAPICalledEvent {
/** Type of the call. */
type: ('log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd');
/** Call arguments. */
args: RemoteObject[];
/** Identifier of the context where the call was made. */
executionContextId: ExecutionContextId;
/** Call timestamp. */
timestamp: Timestamp;
/** Stack trace captured when the call was made. */
stackTrace?: StackTrace;
}
export interface InspectRequestedEvent {
object: RemoteObject;
hints: any;
}
}
export interface RuntimeCommands {
/** Evaluates expression on global object. */
evaluate?: (params: Runtime.EvaluateRequest) => Promise<Runtime.EvaluateResponse>;
/** Add handler to promise with given promise object id. */
awaitPromise?: (params: Runtime.AwaitPromiseRequest) => Promise<Runtime.AwaitPromiseResponse>;
/** Calls function with given declaration on the given object. Object group of the result is inherited from the target object. */
callFunctionOn?: (params: Runtime.CallFunctionOnRequest) => Promise<Runtime.CallFunctionOnResponse>;
/** Returns properties of a given object. Object group of the result is inherited from the target object. */
getProperties?: (params: Runtime.GetPropertiesRequest) => Promise<Runtime.GetPropertiesResponse>;
/** Releases remote object with given id. */
releaseObject?: (params: Runtime.ReleaseObjectRequest) => Promise<void>;
/** Releases all remote objects that belong to a given group. */
releaseObjectGroup?: (params: Runtime.ReleaseObjectGroupRequest) => Promise<void>;
/** Tells inspected instance to run if it was waiting for debugger to attach. */
runIfWaitingForDebugger?: () => Promise<void>;
/** Enables reporting of execution contexts creation by means of 'executionContextCreated' event. When the reporting gets enabled the event will be sent immediately for each existing execution context. */
enable?: () => Promise<void>;
/** Disables reporting of execution contexts creation. */
disable?: () => Promise<void>;
/** Discards collected exceptions and console API calls. */
discardConsoleEntries?: () => Promise<void>;
setCustomObjectFormatterEnabled?: (params: Runtime.SetCustomObjectFormatterEnabledRequest) => Promise<void>;
/** Compiles expression. */
compileScript?: (params: Runtime.CompileScriptRequest) => Promise<Runtime.CompileScriptResponse>;
/** Runs script with given id in a given context. */
runScript?: (params: Runtime.RunScriptRequest) => Promise<Runtime.RunScriptResponse>;
}
export interface RuntimeClient extends RuntimeCommands {
/** Issued when new execution context is created. */
onExecutionContextCreated(handler: (params: Runtime.ExecutionContextCreatedEvent) => void): void;
/** Issued when execution context is destroyed. */
onExecutionContextDestroyed(handler: (params: Runtime.ExecutionContextDestroyedEvent) => void): void;
/** Issued when all executionContexts were cleared in browser */
onExecutionContextsCleared(handler: () => void): void;
/** Issued when exception was thrown and unhandled. */
onExceptionThrown(handler: (params: Runtime.ExceptionThrownEvent) => void): void;
/** Issued when unhandled exception was revoked. */
onExceptionRevoked(handler: (params: Runtime.ExceptionRevokedEvent) => void): void;
/** Issued when console API was called. */
onConsoleAPICalled(handler: (params: Runtime.ConsoleAPICalledEvent) => void): void;
/** Issued when object should be inspected (for example, as a result of inspect() command line API call). */
onInspectRequested(handler: (params: Runtime.InspectRequestedEvent) => void): void;
}
export interface RuntimeServer {
/** Issued when new execution context is created. */
emitExecutionContextCreated(params: Runtime.ExecutionContextCreatedEvent): void;
/** Issued when execution context is destroyed. */
emitExecutionContextDestroyed(params: Runtime.ExecutionContextDestroyedEvent): void;
/** Issued when all executionContexts were cleared in browser */
emitExecutionContextsCleared(): void;
/** Issued when exception was thrown and unhandled. */
emitExceptionThrown(params: Runtime.ExceptionThrownEvent): void;
/** Issued when unhandled exception was revoked. */
emitExceptionRevoked(params: Runtime.ExceptionRevokedEvent): void;
/** Issued when console API was called. */
emitConsoleAPICalled(params: Runtime.ConsoleAPICalledEvent): void;
/** Issued when object should be inspected (for example, as a result of inspect() command line API call). */
emitInspectRequested(params: Runtime.InspectRequestedEvent): void;
expose(domain: RuntimeCommands): void;
}
/** Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc. */
export module Debugger {
/** Breakpoint identifier. */
export type BreakpointId = string;
/** Call frame identifier. */
export type CallFrameId = string;
/** Location in the source code. */
export interface Location {
/** Script identifier as reported in the 'Debugger.scriptParsed'. */
scriptId: Runtime.ScriptId;
/** Line number in the script (0-based). */
lineNumber: integer;
/** Column number in the script (0-based). */
columnNumber?: integer;
}
/** Location in the source code. */
export interface ScriptPosition {
lineNumber: integer;
columnNumber: integer;
}
/** JavaScript call frame. Array of call frames form the call stack. */
export interface CallFrame {
/** Call frame identifier. This identifier is only valid while the virtual machine is paused. */
callFrameId: CallFrameId;
/** Name of the JavaScript function called on this call frame. */
functionName: string;
/** Location in the source code. */
functionLocation?: Location;
/** Location in the source code. */
location: Location;
/** Scope chain for this call frame. */
scopeChain: Scope[];
/** 'this' object for this call frame. */
this: Runtime.RemoteObject;
/** The value being returned, if the function is at return point. */
returnValue?: Runtime.RemoteObject;
}
/** Scope description. */
export interface Scope {
/** Scope type. */
type: ('global' | 'local' | 'with' | 'closure' | 'catch' | 'block' | 'script' | 'eval' | 'module');
/** Object representing the scope. For 'global</code> and <code>with' scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. */
object: Runtime.RemoteObject;
name?: string;
/** Location in the source code where scope starts */
startLocation?: Location;
/** Location in the source code where scope ends */
endLocation?: Location;
}
/** Search match for resource. */
export interface SearchMatch {
/** Line number in resource content. */
lineNumber: number;
/** Line with match content. */
lineContent: string;
}
export interface BreakLocation {
/** Script identifier as reported in the 'Debugger.scriptParsed'. */
scriptId: Runtime.ScriptId;
/** Line number in the script (0-based). */
lineNumber: integer;
/** Column number in the script (0-based). */
columnNumber?: integer;
type?: ('debuggerStatement' | 'call' | 'return');
}
export interface SetBreakpointsActiveRequest {
/** New value for breakpoints active state. */
active: boolean;
}
export interface SetSkipAllPausesRequest {
/** New value for skip pauses state. */
skip: boolean;
}
export interface SetBreakpointByUrlRequest {
/** Line number to set breakpoint at. */
lineNumber: integer;
/** URL of the resources to set breakpoint on. */
url?: string;
/** Regex pattern for the URLs of the resources to set breakpoints on. Either 'url</code> or <code>urlRegex' must be specified. */
urlRegex?: string;
/** Offset in the line to set breakpoint at. */
columnNumber?: integer;
/** Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */
condition?: string;
}
export interface SetBreakpointByUrlResponse {
/** Id of the created breakpoint for further reference. */
breakpointId: BreakpointId;
/** List of the locations this breakpoint resolved into upon addition. */
locations: Location[];
}
export interface SetBreakpointRequest {
/** Location to set breakpoint in. */
location: Location;
/** Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. */
condition?: string;
}
export interface SetBreakpointResponse {
/** Id of the created breakpoint for further reference. */
breakpointId: BreakpointId;
/** Location this breakpoint resolved into. */
actualLocation: Location;
}
export interface RemoveBreakpointRequest {
breakpointId: BreakpointId;
}
export interface GetPossibleBreakpointsRequest {
/** Start of range to search possible breakpoint locations in. */
start: Location;
/** End of range to search possible breakpoint locations in (excluding). When not specifed, end of scripts is used as end of range. */
end?: Location;
/** Only consider locations which are in the same (non-nested) function as start. */
restrictToFunction?: boolean;
}
export interface GetPossibleBreakpointsResponse {
/** List of the possible breakpoint locations. */
locations: BreakLocation[];
}
export interface ContinueToLocationRequest {
/** Location to continue to. */
location: Location;
}
export interface SearchInContentRequest {
/** Id of the script to search in. */
scriptId: Runtime.ScriptId;
/** String to search for. */
query: string;
/** If true, search is case sensitive. */
caseSensitive?: boolean;
/** If true, treats string parameter as regex. */
isRegex?: boolean;
}
export interface SearchInContentResponse {
/** List of search matches. */
result: SearchMatch[];
}
export interface SetScriptSourceRequest {
/** Id of the script to edit. */
scriptId: Runtime.ScriptId;
/** New content of the script. */
scriptSource: string;
/** If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. */
dryRun?: boolean;
}
export interface SetScriptSourceResponse {