-
Notifications
You must be signed in to change notification settings - Fork 240
/
Copy pathprotocol-tests-proxy-api.d.ts
4915 lines (3987 loc) · 261 KB
/
protocol-tests-proxy-api.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 protocol-dts-generator.ts, do not edit manually. *
**********************************************************************/
import Protocol from './protocol'
/**
* API generated from Protocol commands and events.
*/
export namespace ProtocolTestsProxyApi {
export interface ProtocolApi {
Console: ConsoleApi;
Debugger: DebuggerApi;
HeapProfiler: HeapProfilerApi;
Profiler: ProfilerApi;
Runtime: RuntimeApi;
Schema: SchemaApi;
Accessibility: AccessibilityApi;
Animation: AnimationApi;
Audits: AuditsApi;
Extensions: ExtensionsApi;
Autofill: AutofillApi;
BackgroundService: BackgroundServiceApi;
Browser: BrowserApi;
CSS: CSSApi;
CacheStorage: CacheStorageApi;
Cast: CastApi;
DOM: DOMApi;
DOMDebugger: DOMDebuggerApi;
EventBreakpoints: EventBreakpointsApi;
DOMSnapshot: DOMSnapshotApi;
DOMStorage: DOMStorageApi;
DeviceOrientation: DeviceOrientationApi;
Emulation: EmulationApi;
HeadlessExperimental: HeadlessExperimentalApi;
IO: IOApi;
FileSystem: FileSystemApi;
IndexedDB: IndexedDBApi;
Input: InputApi;
Inspector: InspectorApi;
LayerTree: LayerTreeApi;
Log: LogApi;
Memory: MemoryApi;
Network: NetworkApi;
Overlay: OverlayApi;
Page: PageApi;
Performance: PerformanceApi;
PerformanceTimeline: PerformanceTimelineApi;
Security: SecurityApi;
ServiceWorker: ServiceWorkerApi;
Storage: StorageApi;
SystemInfo: SystemInfoApi;
Target: TargetApi;
Tethering: TetheringApi;
Tracing: TracingApi;
Fetch: FetchApi;
WebAudio: WebAudioApi;
WebAuthn: WebAuthnApi;
Media: MediaApi;
DeviceAccess: DeviceAccessApi;
Preload: PreloadApi;
FedCm: FedCmApi;
PWA: PWAApi;
BluetoothEmulation: BluetoothEmulationApi;
}
export interface ConsoleApi {
/**
* Does nothing.
*/
clearMessages(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables console domain, prevents further console messages from being reported to the client.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables console domain, sends the messages collected so far to the client by means of the
* `messageAdded` notification.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Issued when new console message is added.
*/
onMessageAdded(listener: (event: { params: Protocol.Console.MessageAddedEvent }) => void): void;
offMessageAdded(listener: (event: { params: Protocol.Console.MessageAddedEvent }) => void): void;
onceMessageAdded(eventMatcher?: (event: { params: Protocol.Console.MessageAddedEvent }) => boolean): Promise<{ params: Protocol.Console.MessageAddedEvent }>;
}
export interface DebuggerApi {
/**
* Continues execution until specific location is reached.
*/
continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables debugger for given page.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables debugger for the given page. Clients should not assume that the debugging has been
* enabled until the result for this command is received.
*/
enable(params: Protocol.Debugger.EnableRequest): Promise<{id: number, result: Protocol.Debugger.EnableResponse, sessionId: string}>;
/**
* Evaluates expression on a given call frame.
*/
evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<{id: number, result: Protocol.Debugger.EvaluateOnCallFrameResponse, sessionId: string}>;
/**
* Returns possible locations for breakpoint. scriptId in start and end range locations should be
* the same.
*/
getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<{id: number, result: Protocol.Debugger.GetPossibleBreakpointsResponse, sessionId: string}>;
/**
* Returns source for the script with given id.
*/
getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<{id: number, result: Protocol.Debugger.GetScriptSourceResponse, sessionId: string}>;
disassembleWasmModule(params: Protocol.Debugger.DisassembleWasmModuleRequest): Promise<{id: number, result: Protocol.Debugger.DisassembleWasmModuleResponse, sessionId: string}>;
/**
* Disassemble the next chunk of lines for the module corresponding to the
* stream. If disassembly is complete, this API will invalidate the streamId
* and return an empty chunk. Any subsequent calls for the now invalid stream
* will return errors.
*/
nextWasmDisassemblyChunk(params: Protocol.Debugger.NextWasmDisassemblyChunkRequest): Promise<{id: number, result: Protocol.Debugger.NextWasmDisassemblyChunkResponse, sessionId: string}>;
/**
* This command is deprecated. Use getScriptSource instead.
*/
getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<{id: number, result: Protocol.Debugger.GetWasmBytecodeResponse, sessionId: string}>;
/**
* Returns stack trace with given `stackTraceId`.
*/
getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<{id: number, result: Protocol.Debugger.GetStackTraceResponse, sessionId: string}>;
/**
* Stops on the next JavaScript statement.
*/
pause(): Promise<{id: number, result: void, sessionId: string}>;
pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Removes JavaScript breakpoint.
*/
removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Restarts particular call frame from the beginning. The old, deprecated
* behavior of `restartFrame` is to stay paused and allow further CDP commands
* after a restart was scheduled. This can cause problems with restarting, so
* we now continue execution immediatly after it has been scheduled until we
* reach the beginning of the restarted frame.
*
* To stay back-wards compatible, `restartFrame` now expects a `mode`
* parameter to be present. If the `mode` parameter is missing, `restartFrame`
* errors out.
*
* The various return values are deprecated and `callFrames` is always empty.
* Use the call frames from the `Debugger#paused` events instead, that fires
* once V8 pauses at the beginning of the restarted function.
*/
restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<{id: number, result: Protocol.Debugger.RestartFrameResponse, sessionId: string}>;
/**
* Resumes JavaScript execution.
*/
resume(params: Protocol.Debugger.ResumeRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Searches for given string in script content.
*/
searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<{id: number, result: Protocol.Debugger.SearchInContentResponse, sessionId: string}>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Replace previous blackbox execution contexts with passed ones. Forces backend to skip
* stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by
* performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
*/
setBlackboxExecutionContexts(params: Protocol.Debugger.SetBlackboxExecutionContextsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
* scripts with url matching one of the patterns. VM will try to leave blackboxed script by
* performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
*/
setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
* scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
* Positions array contains positions where blackbox state is changed. First interval isn't
* blackboxed. Array should be sorted.
*/
setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets JavaScript breakpoint at a given location.
*/
setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<{id: number, result: Protocol.Debugger.SetBreakpointResponse, sessionId: string}>;
/**
* Sets instrumentation breakpoint.
*/
setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<{id: number, result: Protocol.Debugger.SetInstrumentationBreakpointResponse, sessionId: string}>;
/**
* Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
* command is issued, all existing parsed scripts will have breakpoints resolved and returned in
* `locations` property. Further matching script parsing will result in subsequent
* `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
*/
setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<{id: number, result: Protocol.Debugger.SetBreakpointByUrlResponse, sessionId: string}>;
/**
* Sets JavaScript breakpoint before each call to the given function.
* If another function was created from the same source as a given one,
* calling it will also trigger the breakpoint.
*/
setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<{id: number, result: Protocol.Debugger.SetBreakpointOnFunctionCallResponse, sessionId: string}>;
/**
* Activates / deactivates all breakpoints on the page.
*/
setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
* or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
*/
setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Changes return value in top frame. Available only at return break position.
*/
setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Edits JavaScript source live.
*
* In general, functions that are currently on the stack can not be edited with
* a single exception: If the edited function is the top-most stack frame and
* that is the only activation of that function on the stack. In this case
* the live edit will be successful and a `Debugger.restartFrame` for the
* top-most function is automatically triggered.
*/
setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<{id: number, result: Protocol.Debugger.SetScriptSourceResponse, sessionId: string}>;
/**
* Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
*/
setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Changes value of variable in a callframe. Object-based scopes are not supported and must be
* mutated manually.
*/
setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps into the function call.
*/
stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps out of the function call.
*/
stepOut(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps over the statement.
*/
stepOver(params: Protocol.Debugger.StepOverRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Fired when breakpoint is resolved to an actual script and location.
* Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event.
*/
onBreakpointResolved(listener: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => void): void;
offBreakpointResolved(listener: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => void): void;
onceBreakpointResolved(eventMatcher?: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => boolean): Promise<{ params: Protocol.Debugger.BreakpointResolvedEvent }>;
/**
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
*/
onPaused(listener: (event: { params: Protocol.Debugger.PausedEvent }) => void): void;
offPaused(listener: (event: { params: Protocol.Debugger.PausedEvent }) => void): void;
oncePaused(eventMatcher?: (event: { params: Protocol.Debugger.PausedEvent }) => boolean): Promise<{ params: Protocol.Debugger.PausedEvent }>;
/**
* Fired when the virtual machine resumed execution.
*/
onResumed(listener: (event: ) => void): void;
offResumed(listener: (event: ) => void): void;
onceResumed(eventMatcher?: (event: ) => boolean): Promise<>;
/**
* Fired when virtual machine fails to parse the script.
*/
onScriptFailedToParse(listener: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => void): void;
offScriptFailedToParse(listener: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => void): void;
onceScriptFailedToParse(eventMatcher?: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => boolean): Promise<{ params: Protocol.Debugger.ScriptFailedToParseEvent }>;
/**
* Fired when virtual machine parses script. This event is also fired for all known and uncollected
* scripts upon enabling debugger.
*/
onScriptParsed(listener: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => void): void;
offScriptParsed(listener: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => void): void;
onceScriptParsed(eventMatcher?: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => boolean): Promise<{ params: Protocol.Debugger.ScriptParsedEvent }>;
}
export interface HeapProfilerApi {
/**
* Enables console to refer to the node with given id via $x (see Command Line API for more details
* $x functions).
*/
addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<{id: number, result: void, sessionId: string}>;
collectGarbage(): Promise<{id: number, result: void, sessionId: string}>;
disable(): Promise<{id: number, result: void, sessionId: string}>;
enable(): Promise<{id: number, result: void, sessionId: string}>;
getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<{id: number, result: Protocol.HeapProfiler.GetHeapObjectIdResponse, sessionId: string}>;
getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<{id: number, result: Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse, sessionId: string}>;
getSamplingProfile(): Promise<{id: number, result: Protocol.HeapProfiler.GetSamplingProfileResponse, sessionId: string}>;
startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<{id: number, result: void, sessionId: string}>;
startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<{id: number, result: void, sessionId: string}>;
stopSampling(): Promise<{id: number, result: Protocol.HeapProfiler.StopSamplingResponse, sessionId: string}>;
stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<{id: number, result: void, sessionId: string}>;
takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<{id: number, result: void, sessionId: string}>;
onAddHeapSnapshotChunk(listener: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => void): void;
offAddHeapSnapshotChunk(listener: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => void): void;
onceAddHeapSnapshotChunk(eventMatcher?: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }>;
/**
* If heap objects tracking has been started then backend may send update for one or more fragments
*/
onHeapStatsUpdate(listener: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => void): void;
offHeapStatsUpdate(listener: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => void): void;
onceHeapStatsUpdate(eventMatcher?: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.HeapStatsUpdateEvent }>;
/**
* If heap objects tracking has been started then backend regularly sends a current value for last
* seen object id and corresponding timestamp. If the were changes in the heap since last event
* then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
*/
onLastSeenObjectId(listener: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => void): void;
offLastSeenObjectId(listener: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => void): void;
onceLastSeenObjectId(eventMatcher?: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.LastSeenObjectIdEvent }>;
onReportHeapSnapshotProgress(listener: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => void): void;
offReportHeapSnapshotProgress(listener: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => void): void;
onceReportHeapSnapshotProgress(eventMatcher?: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }>;
onResetProfiles(listener: (event: ) => void): void;
offResetProfiles(listener: (event: ) => void): void;
onceResetProfiles(eventMatcher?: (event: ) => boolean): Promise<>;
}
export interface ProfilerApi {
disable(): Promise<{id: number, result: void, sessionId: string}>;
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Collect coverage data for the current isolate. The coverage data may be incomplete due to
* garbage collection.
*/
getBestEffortCoverage(): Promise<{id: number, result: Protocol.Profiler.GetBestEffortCoverageResponse, sessionId: string}>;
/**
* Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
*/
setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<{id: number, result: void, sessionId: string}>;
start(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
* coverage may be incomplete. Enabling prevents running optimized code and resets execution
* counters.
*/
startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<{id: number, result: Protocol.Profiler.StartPreciseCoverageResponse, sessionId: string}>;
stop(): Promise<{id: number, result: Protocol.Profiler.StopResponse, sessionId: string}>;
/**
* Disable precise code coverage. Disabling releases unnecessary execution count records and allows
* executing optimized code.
*/
stopPreciseCoverage(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Collect coverage data for the current isolate, and resets execution counters. Precise code
* coverage needs to have started.
*/
takePreciseCoverage(): Promise<{id: number, result: Protocol.Profiler.TakePreciseCoverageResponse, sessionId: string}>;
onConsoleProfileFinished(listener: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => void): void;
offConsoleProfileFinished(listener: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => void): void;
onceConsoleProfileFinished(eventMatcher?: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => boolean): Promise<{ params: Protocol.Profiler.ConsoleProfileFinishedEvent }>;
/**
* Sent when new profile recording is started using console.profile() call.
*/
onConsoleProfileStarted(listener: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => void): void;
offConsoleProfileStarted(listener: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => void): void;
onceConsoleProfileStarted(eventMatcher?: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => boolean): Promise<{ params: Protocol.Profiler.ConsoleProfileStartedEvent }>;
/**
* Reports coverage delta since the last poll (either from an event like this, or from
* `takePreciseCoverage` for the current isolate. May only be sent if precise code
* coverage has been started. This event can be trigged by the embedder to, for example,
* trigger collection of coverage data immediately at a certain point in time.
*/
onPreciseCoverageDeltaUpdate(listener: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => void): void;
offPreciseCoverageDeltaUpdate(listener: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => void): void;
oncePreciseCoverageDeltaUpdate(eventMatcher?: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => boolean): Promise<{ params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }>;
}
export interface RuntimeApi {
/**
* Add handler to promise with given promise object id.
*/
awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<{id: number, result: Protocol.Runtime.AwaitPromiseResponse, sessionId: string}>;
/**
* Calls function with given declaration on the given object. Object group of the result is
* inherited from the target object.
*/
callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<{id: number, result: Protocol.Runtime.CallFunctionOnResponse, sessionId: string}>;
/**
* Compiles expression.
*/
compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<{id: number, result: Protocol.Runtime.CompileScriptResponse, sessionId: string}>;
/**
* Disables reporting of execution contexts creation.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Discards collected exceptions and console API calls.
*/
discardConsoleEntries(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: void, sessionId: string}>;
/**
* Evaluates expression on global object.
*/
evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<{id: number, result: Protocol.Runtime.EvaluateResponse, sessionId: string}>;
/**
* Returns the isolate id.
*/
getIsolateId(): Promise<{id: number, result: Protocol.Runtime.GetIsolateIdResponse, sessionId: string}>;
/**
* Returns the JavaScript heap usage.
* It is the total usage of the corresponding isolate not scoped to a particular Runtime.
*/
getHeapUsage(): Promise<{id: number, result: Protocol.Runtime.GetHeapUsageResponse, sessionId: string}>;
/**
* Returns properties of a given object. Object group of the result is inherited from the target
* object.
*/
getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<{id: number, result: Protocol.Runtime.GetPropertiesResponse, sessionId: string}>;
/**
* Returns all let, const and class variables from global scope.
*/
globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<{id: number, result: Protocol.Runtime.GlobalLexicalScopeNamesResponse, sessionId: string}>;
queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<{id: number, result: Protocol.Runtime.QueryObjectsResponse, sessionId: string}>;
/**
* Releases remote object with given id.
*/
releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Releases all remote objects that belong to a given group.
*/
releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Tells inspected instance to run if it was waiting for debugger to attach.
*/
runIfWaitingForDebugger(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Runs script with given id in a given context.
*/
runScript(params: Protocol.Runtime.RunScriptRequest): Promise<{id: number, result: Protocol.Runtime.RunScriptResponse, sessionId: string}>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<{id: number, result: void, sessionId: string}>;
setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<{id: number, result: void, sessionId: string}>;
setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Terminate current or next JavaScript execution.
* Will cancel the termination when the outer-most script execution ends.
*/
terminateExecution(): Promise<{id: number, result: void, sessionId: string}>;
/**
* If executionContextId is empty, adds binding with the given name on the
* global objects of all inspected contexts, including those created later,
* bindings survive reloads.
* Binding function takes exactly one argument, this argument should be string,
* in case of any other input, function throws an exception.
* Each binding function call produces Runtime.bindingCalled notification.
*/
addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* This method does not remove binding function from global object but
* unsubscribes current runtime agent from Runtime.bindingCalled notifications.
*/
removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* This method tries to lookup and populate exception details for a
* JavaScript Error object.
* Note that the stackTrace portion of the resulting exceptionDetails will
* only be populated if the Runtime domain was enabled at the time when the
* Error was thrown.
*/
getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest): Promise<{id: number, result: Protocol.Runtime.GetExceptionDetailsResponse, sessionId: string}>;
/**
* Notification is issued every time when binding is called.
*/
onBindingCalled(listener: (event: { params: Protocol.Runtime.BindingCalledEvent }) => void): void;
offBindingCalled(listener: (event: { params: Protocol.Runtime.BindingCalledEvent }) => void): void;
onceBindingCalled(eventMatcher?: (event: { params: Protocol.Runtime.BindingCalledEvent }) => boolean): Promise<{ params: Protocol.Runtime.BindingCalledEvent }>;
/**
* Issued when console API was called.
*/
onConsoleAPICalled(listener: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => void): void;
offConsoleAPICalled(listener: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => void): void;
onceConsoleAPICalled(eventMatcher?: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => boolean): Promise<{ params: Protocol.Runtime.ConsoleAPICalledEvent }>;
/**
* Issued when unhandled exception was revoked.
*/
onExceptionRevoked(listener: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => void): void;
offExceptionRevoked(listener: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => void): void;
onceExceptionRevoked(eventMatcher?: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExceptionRevokedEvent }>;
/**
* Issued when exception was thrown and unhandled.
*/
onExceptionThrown(listener: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => void): void;
offExceptionThrown(listener: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => void): void;
onceExceptionThrown(eventMatcher?: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExceptionThrownEvent }>;
/**
* Issued when new execution context is created.
*/
onExecutionContextCreated(listener: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => void): void;
offExecutionContextCreated(listener: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => void): void;
onceExecutionContextCreated(eventMatcher?: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExecutionContextCreatedEvent }>;
/**
* Issued when execution context is destroyed.
*/
onExecutionContextDestroyed(listener: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => void): void;
offExecutionContextDestroyed(listener: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => void): void;
onceExecutionContextDestroyed(eventMatcher?: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExecutionContextDestroyedEvent }>;
/**
* Issued when all executionContexts were cleared in browser
*/
onExecutionContextsCleared(listener: (event: ) => void): void;
offExecutionContextsCleared(listener: (event: ) => void): void;
onceExecutionContextsCleared(eventMatcher?: (event: ) => boolean): Promise<>;
/**
* Issued when object should be inspected (for example, as a result of inspect() command line API
* call).
*/
onInspectRequested(listener: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => void): void;
offInspectRequested(listener: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => void): void;
onceInspectRequested(eventMatcher?: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => boolean): Promise<{ params: Protocol.Runtime.InspectRequestedEvent }>;
}
export interface SchemaApi {
/**
* Returns supported domains.
*/
getDomains(): Promise<{id: number, result: Protocol.Schema.GetDomainsResponse, sessionId: string}>;
}
export interface AccessibilityApi {
/**
* Disables the accessibility domain.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
* This turns on accessibility for the page, which can impact performance until accessibility is disabled.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
*/
getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.GetPartialAXTreeResponse, sessionId: string}>;
/**
* Fetches the entire accessibility tree for the root Document
*/
getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.GetFullAXTreeResponse, sessionId: string}>;
/**
* Fetches the root node.
* Requires `enable()` to have been called previously.
*/
getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise<{id: number, result: Protocol.Accessibility.GetRootAXNodeResponse, sessionId: string}>;
/**
* Fetches a node and all ancestors up to and including the root.
* Requires `enable()` to have been called previously.
*/
getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise<{id: number, result: Protocol.Accessibility.GetAXNodeAndAncestorsResponse, sessionId: string}>;
/**
* Fetches a particular accessibility node by AXNodeId.
* Requires `enable()` to have been called previously.
*/
getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise<{id: number, result: Protocol.Accessibility.GetChildAXNodesResponse, sessionId: string}>;
/**
* Query a DOM node's accessibility subtree for accessible name and role.
* This command computes the name and role for all nodes in the subtree, including those that are
* ignored for accessibility, and returns those that match the specified name and role. If no DOM
* node is specified, or the DOM node does not exist, the command returns an error. If neither
* `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
*/
queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.QueryAXTreeResponse, sessionId: string}>;
/**
* The loadComplete event mirrors the load complete event sent by the browser to assistive
* technology when the web page has finished loading.
*/
onLoadComplete(listener: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => void): void;
offLoadComplete(listener: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => void): void;
onceLoadComplete(eventMatcher?: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => boolean): Promise<{ params: Protocol.Accessibility.LoadCompleteEvent }>;
/**
* The nodesUpdated event is sent every time a previously requested node has changed the in tree.
*/
onNodesUpdated(listener: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => void): void;
offNodesUpdated(listener: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => void): void;
onceNodesUpdated(eventMatcher?: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => boolean): Promise<{ params: Protocol.Accessibility.NodesUpdatedEvent }>;
}
export interface AnimationApi {
/**
* Disables animation domain notifications.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables animation domain notifications.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Returns the current time of the an animation.
*/
getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<{id: number, result: Protocol.Animation.GetCurrentTimeResponse, sessionId: string}>;
/**
* Gets the playback rate of the document timeline.
*/
getPlaybackRate(): Promise<{id: number, result: Protocol.Animation.GetPlaybackRateResponse, sessionId: string}>;
/**
* Releases a set of animations to no longer be manipulated.
*/
releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Gets the remote object of the Animation.
*/
resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<{id: number, result: Protocol.Animation.ResolveAnimationResponse, sessionId: string}>;
/**
* Seek a set of animations to a particular time within each animation.
*/
seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the paused state of a set of animations.
*/
setPaused(params: Protocol.Animation.SetPausedRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the playback rate of the document timeline.
*/
setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the timing of an animation node.
*/
setTiming(params: Protocol.Animation.SetTimingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Event for when an animation has been cancelled.
*/
onAnimationCanceled(listener: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => void): void;
offAnimationCanceled(listener: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => void): void;
onceAnimationCanceled(eventMatcher?: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationCanceledEvent }>;
/**
* Event for each animation that has been created.
*/
onAnimationCreated(listener: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => void): void;
offAnimationCreated(listener: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => void): void;
onceAnimationCreated(eventMatcher?: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationCreatedEvent }>;
/**
* Event for animation that has been started.
*/
onAnimationStarted(listener: (event: { params: Protocol.Animation.AnimationStartedEvent }) => void): void;
offAnimationStarted(listener: (event: { params: Protocol.Animation.AnimationStartedEvent }) => void): void;
onceAnimationStarted(eventMatcher?: (event: { params: Protocol.Animation.AnimationStartedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationStartedEvent }>;
/**
* Event for animation that has been updated.
*/
onAnimationUpdated(listener: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => void): void;
offAnimationUpdated(listener: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => void): void;
onceAnimationUpdated(eventMatcher?: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationUpdatedEvent }>;
}
export interface AuditsApi {
/**
* Returns the response body and size if it were re-encoded with the specified settings. Only
* applies to images.
*/
getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<{id: number, result: Protocol.Audits.GetEncodedResponseResponse, sessionId: string}>;
/**
* Disables issues domain, prevents further issues from being reported to the client.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables issues domain, sends the issues collected so far to the client by means of the
* `issueAdded` event.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Runs the contrast check for the target page. Found issues are reported
* using Audits.issueAdded event.
*/
checkContrast(params: Protocol.Audits.CheckContrastRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Runs the form issues check for the target page. Found issues are reported
* using Audits.issueAdded event.
*/
checkFormsIssues(): Promise<{id: number, result: Protocol.Audits.CheckFormsIssuesResponse, sessionId: string}>;
onIssueAdded(listener: (event: { params: Protocol.Audits.IssueAddedEvent }) => void): void;
offIssueAdded(listener: (event: { params: Protocol.Audits.IssueAddedEvent }) => void): void;
onceIssueAdded(eventMatcher?: (event: { params: Protocol.Audits.IssueAddedEvent }) => boolean): Promise<{ params: Protocol.Audits.IssueAddedEvent }>;
}
export interface ExtensionsApi {
/**
* Installs an unpacked extension from the filesystem similar to
* --load-extension CLI flags. Returns extension ID once the extension
* has been installed. Available if the client is connected using the
* --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
* flag is set.
*/
loadUnpacked(params: Protocol.Extensions.LoadUnpackedRequest): Promise<{id: number, result: Protocol.Extensions.LoadUnpackedResponse, sessionId: string}>;
/**
* Uninstalls an unpacked extension (others not supported) from the profile.
* Available if the client is connected using the --remote-debugging-pipe flag
* and the --enable-unsafe-extension-debugging.
*/
uninstall(params: Protocol.Extensions.UninstallRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Gets data from extension storage in the given `storageArea`. If `keys` is
* specified, these are used to filter the result.
*/
getStorageItems(params: Protocol.Extensions.GetStorageItemsRequest): Promise<{id: number, result: Protocol.Extensions.GetStorageItemsResponse, sessionId: string}>;
/**
* Removes `keys` from extension storage in the given `storageArea`.
*/
removeStorageItems(params: Protocol.Extensions.RemoveStorageItemsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Clears extension storage in the given `storageArea`.
*/
clearStorageItems(params: Protocol.Extensions.ClearStorageItemsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets `values` in extension storage in the given `storageArea`. The provided `values`
* will be merged with existing values in the storage area.
*/
setStorageItems(params: Protocol.Extensions.SetStorageItemsRequest): Promise<{id: number, result: void, sessionId: string}>;
}
export interface AutofillApi {
/**
* Trigger autofill on a form identified by the fieldId.
* If the field and related form cannot be autofilled, returns an error.
*/
trigger(params: Protocol.Autofill.TriggerRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Set addresses so that developers can verify their forms implementation.
*/
setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables autofill domain notifications.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables autofill domain notifications.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Emitted when an address form is filled.
*/
onAddressFormFilled(listener: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => void): void;
offAddressFormFilled(listener: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => void): void;
onceAddressFormFilled(eventMatcher?: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => boolean): Promise<{ params: Protocol.Autofill.AddressFormFilledEvent }>;
}
export interface BackgroundServiceApi {
/**
* Enables event updates for the service.
*/
startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables event updates for the service.
*/
stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Set the recording state for the service.
*/
setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Clears all stored data for the service.
*/
clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Called when the recording state for the service has been updated.
*/
onRecordingStateChanged(listener: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => void): void;
offRecordingStateChanged(listener: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => void): void;
onceRecordingStateChanged(eventMatcher?: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => boolean): Promise<{ params: Protocol.BackgroundService.RecordingStateChangedEvent }>;
/**
* Called with all existing backgroundServiceEvents when enabled, and all new
* events afterwards if enabled and recording.
*/
onBackgroundServiceEventReceived(listener: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => void): void;
offBackgroundServiceEventReceived(listener: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => void): void;
onceBackgroundServiceEventReceived(eventMatcher?: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => boolean): Promise<{ params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }>;
}
export interface BrowserApi {
/**
* Set permission settings for given origin.
*/
setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Grant specific permissions to the given origin and reject all others.
*/
grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Reset all permission management for all origins.