devtools-protocol 0.0.1247362 → 0.0.1248698
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/json/browser_protocol.json +7 -19
- package/json/js_protocol.json +1 -3
- package/package.json +1 -1
- package/pdl/browser_protocol.pdl +22 -22
- package/pdl/js_protocol.pdl +4 -4
- package/types/protocol-tests-proxy-api.d.ts +4508 -0
@@ -0,0 +1,4508 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
* Auto-generated by protocol-dts-generator.ts, do not edit manually. *
|
3
|
+
**********************************************************************/
|
4
|
+
|
5
|
+
import Protocol from './protocol'
|
6
|
+
|
7
|
+
/**
|
8
|
+
* API generated from Protocol commands and events.
|
9
|
+
*/
|
10
|
+
export namespace ProtocolTestsProxyApi {
|
11
|
+
|
12
|
+
export interface ProtocolApi {
|
13
|
+
Console: ConsoleApi;
|
14
|
+
|
15
|
+
Debugger: DebuggerApi;
|
16
|
+
|
17
|
+
HeapProfiler: HeapProfilerApi;
|
18
|
+
|
19
|
+
Profiler: ProfilerApi;
|
20
|
+
|
21
|
+
Runtime: RuntimeApi;
|
22
|
+
|
23
|
+
Schema: SchemaApi;
|
24
|
+
|
25
|
+
Accessibility: AccessibilityApi;
|
26
|
+
|
27
|
+
Animation: AnimationApi;
|
28
|
+
|
29
|
+
Audits: AuditsApi;
|
30
|
+
|
31
|
+
Autofill: AutofillApi;
|
32
|
+
|
33
|
+
BackgroundService: BackgroundServiceApi;
|
34
|
+
|
35
|
+
Browser: BrowserApi;
|
36
|
+
|
37
|
+
CSS: CSSApi;
|
38
|
+
|
39
|
+
CacheStorage: CacheStorageApi;
|
40
|
+
|
41
|
+
Cast: CastApi;
|
42
|
+
|
43
|
+
DOM: DOMApi;
|
44
|
+
|
45
|
+
DOMDebugger: DOMDebuggerApi;
|
46
|
+
|
47
|
+
EventBreakpoints: EventBreakpointsApi;
|
48
|
+
|
49
|
+
DOMSnapshot: DOMSnapshotApi;
|
50
|
+
|
51
|
+
DOMStorage: DOMStorageApi;
|
52
|
+
|
53
|
+
Database: DatabaseApi;
|
54
|
+
|
55
|
+
DeviceOrientation: DeviceOrientationApi;
|
56
|
+
|
57
|
+
Emulation: EmulationApi;
|
58
|
+
|
59
|
+
HeadlessExperimental: HeadlessExperimentalApi;
|
60
|
+
|
61
|
+
IO: IOApi;
|
62
|
+
|
63
|
+
IndexedDB: IndexedDBApi;
|
64
|
+
|
65
|
+
Input: InputApi;
|
66
|
+
|
67
|
+
Inspector: InspectorApi;
|
68
|
+
|
69
|
+
LayerTree: LayerTreeApi;
|
70
|
+
|
71
|
+
Log: LogApi;
|
72
|
+
|
73
|
+
Memory: MemoryApi;
|
74
|
+
|
75
|
+
Network: NetworkApi;
|
76
|
+
|
77
|
+
Overlay: OverlayApi;
|
78
|
+
|
79
|
+
Page: PageApi;
|
80
|
+
|
81
|
+
Performance: PerformanceApi;
|
82
|
+
|
83
|
+
PerformanceTimeline: PerformanceTimelineApi;
|
84
|
+
|
85
|
+
Security: SecurityApi;
|
86
|
+
|
87
|
+
ServiceWorker: ServiceWorkerApi;
|
88
|
+
|
89
|
+
Storage: StorageApi;
|
90
|
+
|
91
|
+
SystemInfo: SystemInfoApi;
|
92
|
+
|
93
|
+
Target: TargetApi;
|
94
|
+
|
95
|
+
Tethering: TetheringApi;
|
96
|
+
|
97
|
+
Tracing: TracingApi;
|
98
|
+
|
99
|
+
Fetch: FetchApi;
|
100
|
+
|
101
|
+
WebAudio: WebAudioApi;
|
102
|
+
|
103
|
+
WebAuthn: WebAuthnApi;
|
104
|
+
|
105
|
+
Media: MediaApi;
|
106
|
+
|
107
|
+
DeviceAccess: DeviceAccessApi;
|
108
|
+
|
109
|
+
Preload: PreloadApi;
|
110
|
+
|
111
|
+
FedCm: FedCmApi;
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
export interface ConsoleApi {
|
117
|
+
/**
|
118
|
+
* Does nothing.
|
119
|
+
*/
|
120
|
+
clearMessages(): Promise<void>;
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Disables console domain, prevents further console messages from being reported to the client.
|
124
|
+
*/
|
125
|
+
disable(): Promise<void>;
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Enables console domain, sends the messages collected so far to the client by means of the
|
129
|
+
* `messageAdded` notification.
|
130
|
+
*/
|
131
|
+
enable(): Promise<void>;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Issued when new console message is added.
|
135
|
+
*/
|
136
|
+
onMessageAdded(listener: (params: Protocol.Console.MessageAddedEvent) => void): void;
|
137
|
+
offMessageAdded(listener: (params: Protocol.Console.MessageAddedEvent) => void): void;
|
138
|
+
onceMessageAdded(eventMatcher?: (params: Protocol.Console.MessageAddedEvent) => boolean): void;
|
139
|
+
|
140
|
+
}
|
141
|
+
|
142
|
+
export interface DebuggerApi {
|
143
|
+
/**
|
144
|
+
* Continues execution until specific location is reached.
|
145
|
+
*/
|
146
|
+
continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<void>;
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Disables debugger for given page.
|
150
|
+
*/
|
151
|
+
disable(): Promise<void>;
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Enables debugger for the given page. Clients should not assume that the debugging has been
|
155
|
+
* enabled until the result for this command is received.
|
156
|
+
*/
|
157
|
+
enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Evaluates expression on a given call frame.
|
161
|
+
*/
|
162
|
+
evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Returns possible locations for breakpoint. scriptId in start and end range locations should be
|
166
|
+
* the same.
|
167
|
+
*/
|
168
|
+
getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Returns source for the script with given id.
|
172
|
+
*/
|
173
|
+
getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<Protocol.Debugger.GetScriptSourceResponse>;
|
174
|
+
|
175
|
+
disassembleWasmModule(params: Protocol.Debugger.DisassembleWasmModuleRequest): Promise<Protocol.Debugger.DisassembleWasmModuleResponse>;
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Disassemble the next chunk of lines for the module corresponding to the
|
179
|
+
* stream. If disassembly is complete, this API will invalidate the streamId
|
180
|
+
* and return an empty chunk. Any subsequent calls for the now invalid stream
|
181
|
+
* will return errors.
|
182
|
+
*/
|
183
|
+
nextWasmDisassemblyChunk(params: Protocol.Debugger.NextWasmDisassemblyChunkRequest): Promise<Protocol.Debugger.NextWasmDisassemblyChunkResponse>;
|
184
|
+
|
185
|
+
/**
|
186
|
+
* This command is deprecated. Use getScriptSource instead.
|
187
|
+
*/
|
188
|
+
getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Returns stack trace with given `stackTraceId`.
|
192
|
+
*/
|
193
|
+
getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<Protocol.Debugger.GetStackTraceResponse>;
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Stops on the next JavaScript statement.
|
197
|
+
*/
|
198
|
+
pause(): Promise<void>;
|
199
|
+
|
200
|
+
pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<void>;
|
201
|
+
|
202
|
+
/**
|
203
|
+
* Removes JavaScript breakpoint.
|
204
|
+
*/
|
205
|
+
removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<void>;
|
206
|
+
|
207
|
+
/**
|
208
|
+
* Restarts particular call frame from the beginning. The old, deprecated
|
209
|
+
* behavior of `restartFrame` is to stay paused and allow further CDP commands
|
210
|
+
* after a restart was scheduled. This can cause problems with restarting, so
|
211
|
+
* we now continue execution immediatly after it has been scheduled until we
|
212
|
+
* reach the beginning of the restarted frame.
|
213
|
+
*
|
214
|
+
* To stay back-wards compatible, `restartFrame` now expects a `mode`
|
215
|
+
* parameter to be present. If the `mode` parameter is missing, `restartFrame`
|
216
|
+
* errors out.
|
217
|
+
*
|
218
|
+
* The various return values are deprecated and `callFrames` is always empty.
|
219
|
+
* Use the call frames from the `Debugger#paused` events instead, that fires
|
220
|
+
* once V8 pauses at the beginning of the restarted function.
|
221
|
+
*/
|
222
|
+
restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
|
223
|
+
|
224
|
+
/**
|
225
|
+
* Resumes JavaScript execution.
|
226
|
+
*/
|
227
|
+
resume(params: Protocol.Debugger.ResumeRequest): Promise<void>;
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Searches for given string in script content.
|
231
|
+
*/
|
232
|
+
searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<Protocol.Debugger.SearchInContentResponse>;
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Enables or disables async call stacks tracking.
|
236
|
+
*/
|
237
|
+
setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<void>;
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
|
241
|
+
* scripts with url matching one of the patterns. VM will try to leave blackboxed script by
|
242
|
+
* performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
|
243
|
+
*/
|
244
|
+
setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<void>;
|
245
|
+
|
246
|
+
/**
|
247
|
+
* Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
|
248
|
+
* scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
|
249
|
+
* Positions array contains positions where blackbox state is changed. First interval isn't
|
250
|
+
* blackboxed. Array should be sorted.
|
251
|
+
*/
|
252
|
+
setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<void>;
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Sets JavaScript breakpoint at a given location.
|
256
|
+
*/
|
257
|
+
setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<Protocol.Debugger.SetBreakpointResponse>;
|
258
|
+
|
259
|
+
/**
|
260
|
+
* Sets instrumentation breakpoint.
|
261
|
+
*/
|
262
|
+
setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
|
266
|
+
* command is issued, all existing parsed scripts will have breakpoints resolved and returned in
|
267
|
+
* `locations` property. Further matching script parsing will result in subsequent
|
268
|
+
* `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
|
269
|
+
*/
|
270
|
+
setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Sets JavaScript breakpoint before each call to the given function.
|
274
|
+
* If another function was created from the same source as a given one,
|
275
|
+
* calling it will also trigger the breakpoint.
|
276
|
+
*/
|
277
|
+
setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
|
278
|
+
|
279
|
+
/**
|
280
|
+
* Activates / deactivates all breakpoints on the page.
|
281
|
+
*/
|
282
|
+
setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<void>;
|
283
|
+
|
284
|
+
/**
|
285
|
+
* Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
|
286
|
+
* or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
|
287
|
+
*/
|
288
|
+
setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<void>;
|
289
|
+
|
290
|
+
/**
|
291
|
+
* Changes return value in top frame. Available only at return break position.
|
292
|
+
*/
|
293
|
+
setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<void>;
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Edits JavaScript source live.
|
297
|
+
*
|
298
|
+
* In general, functions that are currently on the stack can not be edited with
|
299
|
+
* a single exception: If the edited function is the top-most stack frame and
|
300
|
+
* that is the only activation of that function on the stack. In this case
|
301
|
+
* the live edit will be successful and a `Debugger.restartFrame` for the
|
302
|
+
* top-most function is automatically triggered.
|
303
|
+
*/
|
304
|
+
setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<Protocol.Debugger.SetScriptSourceResponse>;
|
305
|
+
|
306
|
+
/**
|
307
|
+
* Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
|
308
|
+
*/
|
309
|
+
setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<void>;
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Changes value of variable in a callframe. Object-based scopes are not supported and must be
|
313
|
+
* mutated manually.
|
314
|
+
*/
|
315
|
+
setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<void>;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Steps into the function call.
|
319
|
+
*/
|
320
|
+
stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<void>;
|
321
|
+
|
322
|
+
/**
|
323
|
+
* Steps out of the function call.
|
324
|
+
*/
|
325
|
+
stepOut(): Promise<void>;
|
326
|
+
|
327
|
+
/**
|
328
|
+
* Steps over the statement.
|
329
|
+
*/
|
330
|
+
stepOver(params: Protocol.Debugger.StepOverRequest): Promise<void>;
|
331
|
+
|
332
|
+
/**
|
333
|
+
* Fired when breakpoint is resolved to an actual script and location.
|
334
|
+
*/
|
335
|
+
onBreakpointResolved(listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void;
|
336
|
+
offBreakpointResolved(listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void;
|
337
|
+
onceBreakpointResolved(eventMatcher?: (params: Protocol.Debugger.BreakpointResolvedEvent) => boolean): void;
|
338
|
+
|
339
|
+
/**
|
340
|
+
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
|
341
|
+
*/
|
342
|
+
onPaused(listener: (params: Protocol.Debugger.PausedEvent) => void): void;
|
343
|
+
offPaused(listener: (params: Protocol.Debugger.PausedEvent) => void): void;
|
344
|
+
oncePaused(eventMatcher?: (params: Protocol.Debugger.PausedEvent) => boolean): void;
|
345
|
+
|
346
|
+
/**
|
347
|
+
* Fired when the virtual machine resumed execution.
|
348
|
+
*/
|
349
|
+
onResumed(listener: () => void): void;
|
350
|
+
offResumed(listener: () => void): void;
|
351
|
+
onceResumed(eventMatcher?: () => boolean): void;
|
352
|
+
|
353
|
+
/**
|
354
|
+
* Fired when virtual machine fails to parse the script.
|
355
|
+
*/
|
356
|
+
onScriptFailedToParse(listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void;
|
357
|
+
offScriptFailedToParse(listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void;
|
358
|
+
onceScriptFailedToParse(eventMatcher?: (params: Protocol.Debugger.ScriptFailedToParseEvent) => boolean): void;
|
359
|
+
|
360
|
+
/**
|
361
|
+
* Fired when virtual machine parses script. This event is also fired for all known and uncollected
|
362
|
+
* scripts upon enabling debugger.
|
363
|
+
*/
|
364
|
+
onScriptParsed(listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void;
|
365
|
+
offScriptParsed(listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void;
|
366
|
+
onceScriptParsed(eventMatcher?: (params: Protocol.Debugger.ScriptParsedEvent) => boolean): void;
|
367
|
+
|
368
|
+
}
|
369
|
+
|
370
|
+
export interface HeapProfilerApi {
|
371
|
+
/**
|
372
|
+
* Enables console to refer to the node with given id via $x (see Command Line API for more details
|
373
|
+
* $x functions).
|
374
|
+
*/
|
375
|
+
addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<void>;
|
376
|
+
|
377
|
+
collectGarbage(): Promise<void>;
|
378
|
+
|
379
|
+
disable(): Promise<void>;
|
380
|
+
|
381
|
+
enable(): Promise<void>;
|
382
|
+
|
383
|
+
getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
|
384
|
+
|
385
|
+
getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
|
386
|
+
|
387
|
+
getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
|
388
|
+
|
389
|
+
startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<void>;
|
390
|
+
|
391
|
+
startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<void>;
|
392
|
+
|
393
|
+
stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
|
394
|
+
|
395
|
+
stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<void>;
|
396
|
+
|
397
|
+
takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<void>;
|
398
|
+
|
399
|
+
onAddHeapSnapshotChunk(listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void;
|
400
|
+
offAddHeapSnapshotChunk(listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void;
|
401
|
+
onceAddHeapSnapshotChunk(eventMatcher?: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => boolean): void;
|
402
|
+
|
403
|
+
/**
|
404
|
+
* If heap objects tracking has been started then backend may send update for one or more fragments
|
405
|
+
*/
|
406
|
+
onHeapStatsUpdate(listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void;
|
407
|
+
offHeapStatsUpdate(listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void;
|
408
|
+
onceHeapStatsUpdate(eventMatcher?: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => boolean): void;
|
409
|
+
|
410
|
+
/**
|
411
|
+
* If heap objects tracking has been started then backend regularly sends a current value for last
|
412
|
+
* seen object id and corresponding timestamp. If the were changes in the heap since last event
|
413
|
+
* then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
|
414
|
+
*/
|
415
|
+
onLastSeenObjectId(listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void;
|
416
|
+
offLastSeenObjectId(listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void;
|
417
|
+
onceLastSeenObjectId(eventMatcher?: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => boolean): void;
|
418
|
+
|
419
|
+
onReportHeapSnapshotProgress(listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void;
|
420
|
+
offReportHeapSnapshotProgress(listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void;
|
421
|
+
onceReportHeapSnapshotProgress(eventMatcher?: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => boolean): void;
|
422
|
+
|
423
|
+
onResetProfiles(listener: () => void): void;
|
424
|
+
offResetProfiles(listener: () => void): void;
|
425
|
+
onceResetProfiles(eventMatcher?: () => boolean): void;
|
426
|
+
|
427
|
+
}
|
428
|
+
|
429
|
+
export interface ProfilerApi {
|
430
|
+
disable(): Promise<void>;
|
431
|
+
|
432
|
+
enable(): Promise<void>;
|
433
|
+
|
434
|
+
/**
|
435
|
+
* Collect coverage data for the current isolate. The coverage data may be incomplete due to
|
436
|
+
* garbage collection.
|
437
|
+
*/
|
438
|
+
getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
|
442
|
+
*/
|
443
|
+
setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<void>;
|
444
|
+
|
445
|
+
start(): Promise<void>;
|
446
|
+
|
447
|
+
/**
|
448
|
+
* Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
|
449
|
+
* coverage may be incomplete. Enabling prevents running optimized code and resets execution
|
450
|
+
* counters.
|
451
|
+
*/
|
452
|
+
startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
|
453
|
+
|
454
|
+
stop(): Promise<Protocol.Profiler.StopResponse>;
|
455
|
+
|
456
|
+
/**
|
457
|
+
* Disable precise code coverage. Disabling releases unnecessary execution count records and allows
|
458
|
+
* executing optimized code.
|
459
|
+
*/
|
460
|
+
stopPreciseCoverage(): Promise<void>;
|
461
|
+
|
462
|
+
/**
|
463
|
+
* Collect coverage data for the current isolate, and resets execution counters. Precise code
|
464
|
+
* coverage needs to have started.
|
465
|
+
*/
|
466
|
+
takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
|
467
|
+
|
468
|
+
onConsoleProfileFinished(listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void;
|
469
|
+
offConsoleProfileFinished(listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void;
|
470
|
+
onceConsoleProfileFinished(eventMatcher?: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => boolean): void;
|
471
|
+
|
472
|
+
/**
|
473
|
+
* Sent when new profile recording is started using console.profile() call.
|
474
|
+
*/
|
475
|
+
onConsoleProfileStarted(listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void;
|
476
|
+
offConsoleProfileStarted(listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void;
|
477
|
+
onceConsoleProfileStarted(eventMatcher?: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => boolean): void;
|
478
|
+
|
479
|
+
/**
|
480
|
+
* Reports coverage delta since the last poll (either from an event like this, or from
|
481
|
+
* `takePreciseCoverage` for the current isolate. May only be sent if precise code
|
482
|
+
* coverage has been started. This event can be trigged by the embedder to, for example,
|
483
|
+
* trigger collection of coverage data immediately at a certain point in time.
|
484
|
+
*/
|
485
|
+
onPreciseCoverageDeltaUpdate(listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void;
|
486
|
+
offPreciseCoverageDeltaUpdate(listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void;
|
487
|
+
oncePreciseCoverageDeltaUpdate(eventMatcher?: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => boolean): void;
|
488
|
+
|
489
|
+
}
|
490
|
+
|
491
|
+
export interface RuntimeApi {
|
492
|
+
/**
|
493
|
+
* Add handler to promise with given promise object id.
|
494
|
+
*/
|
495
|
+
awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
|
496
|
+
|
497
|
+
/**
|
498
|
+
* Calls function with given declaration on the given object. Object group of the result is
|
499
|
+
* inherited from the target object.
|
500
|
+
*/
|
501
|
+
callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<Protocol.Runtime.CallFunctionOnResponse>;
|
502
|
+
|
503
|
+
/**
|
504
|
+
* Compiles expression.
|
505
|
+
*/
|
506
|
+
compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<Protocol.Runtime.CompileScriptResponse>;
|
507
|
+
|
508
|
+
/**
|
509
|
+
* Disables reporting of execution contexts creation.
|
510
|
+
*/
|
511
|
+
disable(): Promise<void>;
|
512
|
+
|
513
|
+
/**
|
514
|
+
* Discards collected exceptions and console API calls.
|
515
|
+
*/
|
516
|
+
discardConsoleEntries(): Promise<void>;
|
517
|
+
|
518
|
+
/**
|
519
|
+
* Enables reporting of execution contexts creation by means of `executionContextCreated` event.
|
520
|
+
* When the reporting gets enabled the event will be sent immediately for each existing execution
|
521
|
+
* context.
|
522
|
+
*/
|
523
|
+
enable(): Promise<void>;
|
524
|
+
|
525
|
+
/**
|
526
|
+
* Evaluates expression on global object.
|
527
|
+
*/
|
528
|
+
evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
|
529
|
+
|
530
|
+
/**
|
531
|
+
* Returns the isolate id.
|
532
|
+
*/
|
533
|
+
getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
|
534
|
+
|
535
|
+
/**
|
536
|
+
* Returns the JavaScript heap usage.
|
537
|
+
* It is the total usage of the corresponding isolate not scoped to a particular Runtime.
|
538
|
+
*/
|
539
|
+
getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
|
540
|
+
|
541
|
+
/**
|
542
|
+
* Returns properties of a given object. Object group of the result is inherited from the target
|
543
|
+
* object.
|
544
|
+
*/
|
545
|
+
getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<Protocol.Runtime.GetPropertiesResponse>;
|
546
|
+
|
547
|
+
/**
|
548
|
+
* Returns all let, const and class variables from global scope.
|
549
|
+
*/
|
550
|
+
globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
|
551
|
+
|
552
|
+
queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
|
553
|
+
|
554
|
+
/**
|
555
|
+
* Releases remote object with given id.
|
556
|
+
*/
|
557
|
+
releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<void>;
|
558
|
+
|
559
|
+
/**
|
560
|
+
* Releases all remote objects that belong to a given group.
|
561
|
+
*/
|
562
|
+
releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<void>;
|
563
|
+
|
564
|
+
/**
|
565
|
+
* Tells inspected instance to run if it was waiting for debugger to attach.
|
566
|
+
*/
|
567
|
+
runIfWaitingForDebugger(): Promise<void>;
|
568
|
+
|
569
|
+
/**
|
570
|
+
* Runs script with given id in a given context.
|
571
|
+
*/
|
572
|
+
runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
|
573
|
+
|
574
|
+
/**
|
575
|
+
* Enables or disables async call stacks tracking.
|
576
|
+
*/
|
577
|
+
setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<void>;
|
578
|
+
|
579
|
+
setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<void>;
|
580
|
+
|
581
|
+
setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<void>;
|
582
|
+
|
583
|
+
/**
|
584
|
+
* Terminate current or next JavaScript execution.
|
585
|
+
* Will cancel the termination when the outer-most script execution ends.
|
586
|
+
*/
|
587
|
+
terminateExecution(): Promise<void>;
|
588
|
+
|
589
|
+
/**
|
590
|
+
* If executionContextId is empty, adds binding with the given name on the
|
591
|
+
* global objects of all inspected contexts, including those created later,
|
592
|
+
* bindings survive reloads.
|
593
|
+
* Binding function takes exactly one argument, this argument should be string,
|
594
|
+
* in case of any other input, function throws an exception.
|
595
|
+
* Each binding function call produces Runtime.bindingCalled notification.
|
596
|
+
*/
|
597
|
+
addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<void>;
|
598
|
+
|
599
|
+
/**
|
600
|
+
* This method does not remove binding function from global object but
|
601
|
+
* unsubscribes current runtime agent from Runtime.bindingCalled notifications.
|
602
|
+
*/
|
603
|
+
removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<void>;
|
604
|
+
|
605
|
+
/**
|
606
|
+
* This method tries to lookup and populate exception details for a
|
607
|
+
* JavaScript Error object.
|
608
|
+
* Note that the stackTrace portion of the resulting exceptionDetails will
|
609
|
+
* only be populated if the Runtime domain was enabled at the time when the
|
610
|
+
* Error was thrown.
|
611
|
+
*/
|
612
|
+
getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest): Promise<Protocol.Runtime.GetExceptionDetailsResponse>;
|
613
|
+
|
614
|
+
/**
|
615
|
+
* Notification is issued every time when binding is called.
|
616
|
+
*/
|
617
|
+
onBindingCalled(listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void;
|
618
|
+
offBindingCalled(listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void;
|
619
|
+
onceBindingCalled(eventMatcher?: (params: Protocol.Runtime.BindingCalledEvent) => boolean): void;
|
620
|
+
|
621
|
+
/**
|
622
|
+
* Issued when console API was called.
|
623
|
+
*/
|
624
|
+
onConsoleAPICalled(listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void;
|
625
|
+
offConsoleAPICalled(listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void;
|
626
|
+
onceConsoleAPICalled(eventMatcher?: (params: Protocol.Runtime.ConsoleAPICalledEvent) => boolean): void;
|
627
|
+
|
628
|
+
/**
|
629
|
+
* Issued when unhandled exception was revoked.
|
630
|
+
*/
|
631
|
+
onExceptionRevoked(listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void;
|
632
|
+
offExceptionRevoked(listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void;
|
633
|
+
onceExceptionRevoked(eventMatcher?: (params: Protocol.Runtime.ExceptionRevokedEvent) => boolean): void;
|
634
|
+
|
635
|
+
/**
|
636
|
+
* Issued when exception was thrown and unhandled.
|
637
|
+
*/
|
638
|
+
onExceptionThrown(listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void;
|
639
|
+
offExceptionThrown(listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void;
|
640
|
+
onceExceptionThrown(eventMatcher?: (params: Protocol.Runtime.ExceptionThrownEvent) => boolean): void;
|
641
|
+
|
642
|
+
/**
|
643
|
+
* Issued when new execution context is created.
|
644
|
+
*/
|
645
|
+
onExecutionContextCreated(listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void;
|
646
|
+
offExecutionContextCreated(listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void;
|
647
|
+
onceExecutionContextCreated(eventMatcher?: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => boolean): void;
|
648
|
+
|
649
|
+
/**
|
650
|
+
* Issued when execution context is destroyed.
|
651
|
+
*/
|
652
|
+
onExecutionContextDestroyed(listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void;
|
653
|
+
offExecutionContextDestroyed(listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void;
|
654
|
+
onceExecutionContextDestroyed(eventMatcher?: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => boolean): void;
|
655
|
+
|
656
|
+
/**
|
657
|
+
* Issued when all executionContexts were cleared in browser
|
658
|
+
*/
|
659
|
+
onExecutionContextsCleared(listener: () => void): void;
|
660
|
+
offExecutionContextsCleared(listener: () => void): void;
|
661
|
+
onceExecutionContextsCleared(eventMatcher?: () => boolean): void;
|
662
|
+
|
663
|
+
/**
|
664
|
+
* Issued when object should be inspected (for example, as a result of inspect() command line API
|
665
|
+
* call).
|
666
|
+
*/
|
667
|
+
onInspectRequested(listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void;
|
668
|
+
offInspectRequested(listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void;
|
669
|
+
onceInspectRequested(eventMatcher?: (params: Protocol.Runtime.InspectRequestedEvent) => boolean): void;
|
670
|
+
|
671
|
+
}
|
672
|
+
|
673
|
+
export interface SchemaApi {
|
674
|
+
/**
|
675
|
+
* Returns supported domains.
|
676
|
+
*/
|
677
|
+
getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
|
678
|
+
|
679
|
+
}
|
680
|
+
|
681
|
+
export interface AccessibilityApi {
|
682
|
+
/**
|
683
|
+
* Disables the accessibility domain.
|
684
|
+
*/
|
685
|
+
disable(): Promise<void>;
|
686
|
+
|
687
|
+
/**
|
688
|
+
* Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
|
689
|
+
* This turns on accessibility for the page, which can impact performance until accessibility is disabled.
|
690
|
+
*/
|
691
|
+
enable(): Promise<void>;
|
692
|
+
|
693
|
+
/**
|
694
|
+
* Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
|
695
|
+
*/
|
696
|
+
getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
|
697
|
+
|
698
|
+
/**
|
699
|
+
* Fetches the entire accessibility tree for the root Document
|
700
|
+
*/
|
701
|
+
getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
|
702
|
+
|
703
|
+
/**
|
704
|
+
* Fetches the root node.
|
705
|
+
* Requires `enable()` to have been called previously.
|
706
|
+
*/
|
707
|
+
getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise<Protocol.Accessibility.GetRootAXNodeResponse>;
|
708
|
+
|
709
|
+
/**
|
710
|
+
* Fetches a node and all ancestors up to and including the root.
|
711
|
+
* Requires `enable()` to have been called previously.
|
712
|
+
*/
|
713
|
+
getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise<Protocol.Accessibility.GetAXNodeAndAncestorsResponse>;
|
714
|
+
|
715
|
+
/**
|
716
|
+
* Fetches a particular accessibility node by AXNodeId.
|
717
|
+
* Requires `enable()` to have been called previously.
|
718
|
+
*/
|
719
|
+
getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise<Protocol.Accessibility.GetChildAXNodesResponse>;
|
720
|
+
|
721
|
+
/**
|
722
|
+
* Query a DOM node's accessibility subtree for accessible name and role.
|
723
|
+
* This command computes the name and role for all nodes in the subtree, including those that are
|
724
|
+
* ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
|
725
|
+
* node is specified, or the DOM node does not exist, the command returns an error. If neither
|
726
|
+
* `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
|
727
|
+
*/
|
728
|
+
queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<Protocol.Accessibility.QueryAXTreeResponse>;
|
729
|
+
|
730
|
+
/**
|
731
|
+
* The loadComplete event mirrors the load complete event sent by the browser to assistive
|
732
|
+
* technology when the web page has finished loading.
|
733
|
+
*/
|
734
|
+
onLoadComplete(listener: (params: Protocol.Accessibility.LoadCompleteEvent) => void): void;
|
735
|
+
offLoadComplete(listener: (params: Protocol.Accessibility.LoadCompleteEvent) => void): void;
|
736
|
+
onceLoadComplete(eventMatcher?: (params: Protocol.Accessibility.LoadCompleteEvent) => boolean): void;
|
737
|
+
|
738
|
+
/**
|
739
|
+
* The nodesUpdated event is sent every time a previously requested node has changed the in tree.
|
740
|
+
*/
|
741
|
+
onNodesUpdated(listener: (params: Protocol.Accessibility.NodesUpdatedEvent) => void): void;
|
742
|
+
offNodesUpdated(listener: (params: Protocol.Accessibility.NodesUpdatedEvent) => void): void;
|
743
|
+
onceNodesUpdated(eventMatcher?: (params: Protocol.Accessibility.NodesUpdatedEvent) => boolean): void;
|
744
|
+
|
745
|
+
}
|
746
|
+
|
747
|
+
export interface AnimationApi {
|
748
|
+
/**
|
749
|
+
* Disables animation domain notifications.
|
750
|
+
*/
|
751
|
+
disable(): Promise<void>;
|
752
|
+
|
753
|
+
/**
|
754
|
+
* Enables animation domain notifications.
|
755
|
+
*/
|
756
|
+
enable(): Promise<void>;
|
757
|
+
|
758
|
+
/**
|
759
|
+
* Returns the current time of the an animation.
|
760
|
+
*/
|
761
|
+
getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>;
|
762
|
+
|
763
|
+
/**
|
764
|
+
* Gets the playback rate of the document timeline.
|
765
|
+
*/
|
766
|
+
getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
|
767
|
+
|
768
|
+
/**
|
769
|
+
* Releases a set of animations to no longer be manipulated.
|
770
|
+
*/
|
771
|
+
releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<void>;
|
772
|
+
|
773
|
+
/**
|
774
|
+
* Gets the remote object of the Animation.
|
775
|
+
*/
|
776
|
+
resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>;
|
777
|
+
|
778
|
+
/**
|
779
|
+
* Seek a set of animations to a particular time within each animation.
|
780
|
+
*/
|
781
|
+
seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<void>;
|
782
|
+
|
783
|
+
/**
|
784
|
+
* Sets the paused state of a set of animations.
|
785
|
+
*/
|
786
|
+
setPaused(params: Protocol.Animation.SetPausedRequest): Promise<void>;
|
787
|
+
|
788
|
+
/**
|
789
|
+
* Sets the playback rate of the document timeline.
|
790
|
+
*/
|
791
|
+
setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<void>;
|
792
|
+
|
793
|
+
/**
|
794
|
+
* Sets the timing of an animation node.
|
795
|
+
*/
|
796
|
+
setTiming(params: Protocol.Animation.SetTimingRequest): Promise<void>;
|
797
|
+
|
798
|
+
/**
|
799
|
+
* Event for when an animation has been cancelled.
|
800
|
+
*/
|
801
|
+
onAnimationCanceled(listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void;
|
802
|
+
offAnimationCanceled(listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void;
|
803
|
+
onceAnimationCanceled(eventMatcher?: (params: Protocol.Animation.AnimationCanceledEvent) => boolean): void;
|
804
|
+
|
805
|
+
/**
|
806
|
+
* Event for each animation that has been created.
|
807
|
+
*/
|
808
|
+
onAnimationCreated(listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void;
|
809
|
+
offAnimationCreated(listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void;
|
810
|
+
onceAnimationCreated(eventMatcher?: (params: Protocol.Animation.AnimationCreatedEvent) => boolean): void;
|
811
|
+
|
812
|
+
/**
|
813
|
+
* Event for animation that has been started.
|
814
|
+
*/
|
815
|
+
onAnimationStarted(listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void;
|
816
|
+
offAnimationStarted(listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void;
|
817
|
+
onceAnimationStarted(eventMatcher?: (params: Protocol.Animation.AnimationStartedEvent) => boolean): void;
|
818
|
+
|
819
|
+
}
|
820
|
+
|
821
|
+
export interface AuditsApi {
|
822
|
+
/**
|
823
|
+
* Returns the response body and size if it were re-encoded with the specified settings. Only
|
824
|
+
* applies to images.
|
825
|
+
*/
|
826
|
+
getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<Protocol.Audits.GetEncodedResponseResponse>;
|
827
|
+
|
828
|
+
/**
|
829
|
+
* Disables issues domain, prevents further issues from being reported to the client.
|
830
|
+
*/
|
831
|
+
disable(): Promise<void>;
|
832
|
+
|
833
|
+
/**
|
834
|
+
* Enables issues domain, sends the issues collected so far to the client by means of the
|
835
|
+
* `issueAdded` event.
|
836
|
+
*/
|
837
|
+
enable(): Promise<void>;
|
838
|
+
|
839
|
+
/**
|
840
|
+
* Runs the contrast check for the target page. Found issues are reported
|
841
|
+
* using Audits.issueAdded event.
|
842
|
+
*/
|
843
|
+
checkContrast(params: Protocol.Audits.CheckContrastRequest): Promise<void>;
|
844
|
+
|
845
|
+
/**
|
846
|
+
* Runs the form issues check for the target page. Found issues are reported
|
847
|
+
* using Audits.issueAdded event.
|
848
|
+
*/
|
849
|
+
checkFormsIssues(): Promise<Protocol.Audits.CheckFormsIssuesResponse>;
|
850
|
+
|
851
|
+
onIssueAdded(listener: (params: Protocol.Audits.IssueAddedEvent) => void): void;
|
852
|
+
offIssueAdded(listener: (params: Protocol.Audits.IssueAddedEvent) => void): void;
|
853
|
+
onceIssueAdded(eventMatcher?: (params: Protocol.Audits.IssueAddedEvent) => boolean): void;
|
854
|
+
|
855
|
+
}
|
856
|
+
|
857
|
+
export interface AutofillApi {
|
858
|
+
/**
|
859
|
+
* Trigger autofill on a form identified by the fieldId.
|
860
|
+
* If the field and related form cannot be autofilled, returns an error.
|
861
|
+
*/
|
862
|
+
trigger(params: Protocol.Autofill.TriggerRequest): Promise<void>;
|
863
|
+
|
864
|
+
/**
|
865
|
+
* Set addresses so that developers can verify their forms implementation.
|
866
|
+
*/
|
867
|
+
setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise<void>;
|
868
|
+
|
869
|
+
/**
|
870
|
+
* Disables autofill domain notifications.
|
871
|
+
*/
|
872
|
+
disable(): Promise<void>;
|
873
|
+
|
874
|
+
/**
|
875
|
+
* Enables autofill domain notifications.
|
876
|
+
*/
|
877
|
+
enable(): Promise<void>;
|
878
|
+
|
879
|
+
/**
|
880
|
+
* Emitted when an address form is filled.
|
881
|
+
*/
|
882
|
+
onAddressFormFilled(listener: (params: Protocol.Autofill.AddressFormFilledEvent) => void): void;
|
883
|
+
offAddressFormFilled(listener: (params: Protocol.Autofill.AddressFormFilledEvent) => void): void;
|
884
|
+
onceAddressFormFilled(eventMatcher?: (params: Protocol.Autofill.AddressFormFilledEvent) => boolean): void;
|
885
|
+
|
886
|
+
}
|
887
|
+
|
888
|
+
export interface BackgroundServiceApi {
|
889
|
+
/**
|
890
|
+
* Enables event updates for the service.
|
891
|
+
*/
|
892
|
+
startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<void>;
|
893
|
+
|
894
|
+
/**
|
895
|
+
* Disables event updates for the service.
|
896
|
+
*/
|
897
|
+
stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<void>;
|
898
|
+
|
899
|
+
/**
|
900
|
+
* Set the recording state for the service.
|
901
|
+
*/
|
902
|
+
setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<void>;
|
903
|
+
|
904
|
+
/**
|
905
|
+
* Clears all stored data for the service.
|
906
|
+
*/
|
907
|
+
clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<void>;
|
908
|
+
|
909
|
+
/**
|
910
|
+
* Called when the recording state for the service has been updated.
|
911
|
+
*/
|
912
|
+
onRecordingStateChanged(listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void;
|
913
|
+
offRecordingStateChanged(listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void;
|
914
|
+
onceRecordingStateChanged(eventMatcher?: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => boolean): void;
|
915
|
+
|
916
|
+
/**
|
917
|
+
* Called with all existing backgroundServiceEvents when enabled, and all new
|
918
|
+
* events afterwards if enabled and recording.
|
919
|
+
*/
|
920
|
+
onBackgroundServiceEventReceived(listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void;
|
921
|
+
offBackgroundServiceEventReceived(listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void;
|
922
|
+
onceBackgroundServiceEventReceived(eventMatcher?: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => boolean): void;
|
923
|
+
|
924
|
+
}
|
925
|
+
|
926
|
+
export interface BrowserApi {
|
927
|
+
/**
|
928
|
+
* Set permission settings for given origin.
|
929
|
+
*/
|
930
|
+
setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<void>;
|
931
|
+
|
932
|
+
/**
|
933
|
+
* Grant specific permissions to the given origin and reject all others.
|
934
|
+
*/
|
935
|
+
grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<void>;
|
936
|
+
|
937
|
+
/**
|
938
|
+
* Reset all permission management for all origins.
|
939
|
+
*/
|
940
|
+
resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<void>;
|
941
|
+
|
942
|
+
/**
|
943
|
+
* Set the behavior when downloading a file.
|
944
|
+
*/
|
945
|
+
setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<void>;
|
946
|
+
|
947
|
+
/**
|
948
|
+
* Cancel a download if in progress
|
949
|
+
*/
|
950
|
+
cancelDownload(params: Protocol.Browser.CancelDownloadRequest): Promise<void>;
|
951
|
+
|
952
|
+
/**
|
953
|
+
* Close browser gracefully.
|
954
|
+
*/
|
955
|
+
close(): Promise<void>;
|
956
|
+
|
957
|
+
/**
|
958
|
+
* Crashes browser on the main thread.
|
959
|
+
*/
|
960
|
+
crash(): Promise<void>;
|
961
|
+
|
962
|
+
/**
|
963
|
+
* Crashes GPU process.
|
964
|
+
*/
|
965
|
+
crashGpuProcess(): Promise<void>;
|
966
|
+
|
967
|
+
/**
|
968
|
+
* Returns version information.
|
969
|
+
*/
|
970
|
+
getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
|
971
|
+
|
972
|
+
/**
|
973
|
+
* Returns the command line switches for the browser process if, and only if
|
974
|
+
* --enable-automation is on the commandline.
|
975
|
+
*/
|
976
|
+
getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
|
977
|
+
|
978
|
+
/**
|
979
|
+
* Get Chrome histograms.
|
980
|
+
*/
|
981
|
+
getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>;
|
982
|
+
|
983
|
+
/**
|
984
|
+
* Get a Chrome histogram by name.
|
985
|
+
*/
|
986
|
+
getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
|
987
|
+
|
988
|
+
/**
|
989
|
+
* Get position and size of the browser window.
|
990
|
+
*/
|
991
|
+
getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>;
|
992
|
+
|
993
|
+
/**
|
994
|
+
* Get the browser window that contains the devtools target.
|
995
|
+
*/
|
996
|
+
getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>;
|
997
|
+
|
998
|
+
/**
|
999
|
+
* Set position and/or size of the browser window.
|
1000
|
+
*/
|
1001
|
+
setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<void>;
|
1002
|
+
|
1003
|
+
/**
|
1004
|
+
* Set dock tile details, platform-specific.
|
1005
|
+
*/
|
1006
|
+
setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<void>;
|
1007
|
+
|
1008
|
+
/**
|
1009
|
+
* Invoke custom browser commands used by telemetry.
|
1010
|
+
*/
|
1011
|
+
executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest): Promise<void>;
|
1012
|
+
|
1013
|
+
/**
|
1014
|
+
* Allows a site to use privacy sandbox features that require enrollment
|
1015
|
+
* without the site actually being enrolled. Only supported on page targets.
|
1016
|
+
*/
|
1017
|
+
addPrivacySandboxEnrollmentOverride(params: Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest): Promise<void>;
|
1018
|
+
|
1019
|
+
/**
|
1020
|
+
* Fired when page is about to start a download.
|
1021
|
+
*/
|
1022
|
+
onDownloadWillBegin(listener: (params: Protocol.Browser.DownloadWillBeginEvent) => void): void;
|
1023
|
+
offDownloadWillBegin(listener: (params: Protocol.Browser.DownloadWillBeginEvent) => void): void;
|
1024
|
+
onceDownloadWillBegin(eventMatcher?: (params: Protocol.Browser.DownloadWillBeginEvent) => boolean): void;
|
1025
|
+
|
1026
|
+
/**
|
1027
|
+
* Fired when download makes progress. Last call has |done| == true.
|
1028
|
+
*/
|
1029
|
+
onDownloadProgress(listener: (params: Protocol.Browser.DownloadProgressEvent) => void): void;
|
1030
|
+
offDownloadProgress(listener: (params: Protocol.Browser.DownloadProgressEvent) => void): void;
|
1031
|
+
onceDownloadProgress(eventMatcher?: (params: Protocol.Browser.DownloadProgressEvent) => boolean): void;
|
1032
|
+
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
export interface CSSApi {
|
1036
|
+
/**
|
1037
|
+
* Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
|
1038
|
+
* position specified by `location`.
|
1039
|
+
*/
|
1040
|
+
addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
|
1041
|
+
|
1042
|
+
/**
|
1043
|
+
* Returns all class names from specified stylesheet.
|
1044
|
+
*/
|
1045
|
+
collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>;
|
1046
|
+
|
1047
|
+
/**
|
1048
|
+
* Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
|
1049
|
+
*/
|
1050
|
+
createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>;
|
1051
|
+
|
1052
|
+
/**
|
1053
|
+
* Disables the CSS agent for the given page.
|
1054
|
+
*/
|
1055
|
+
disable(): Promise<void>;
|
1056
|
+
|
1057
|
+
/**
|
1058
|
+
* Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
|
1059
|
+
* enabled until the result of this command is received.
|
1060
|
+
*/
|
1061
|
+
enable(): Promise<void>;
|
1062
|
+
|
1063
|
+
/**
|
1064
|
+
* Ensures that the given node will have specified pseudo-classes whenever its style is computed by
|
1065
|
+
* the browser.
|
1066
|
+
*/
|
1067
|
+
forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<void>;
|
1068
|
+
|
1069
|
+
getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>;
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* Returns the computed style for a DOM node identified by `nodeId`.
|
1073
|
+
*/
|
1074
|
+
getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
|
1075
|
+
|
1076
|
+
/**
|
1077
|
+
* Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
|
1078
|
+
* attributes) for a DOM node identified by `nodeId`.
|
1079
|
+
*/
|
1080
|
+
getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
|
1081
|
+
|
1082
|
+
/**
|
1083
|
+
* Returns requested styles for a DOM node identified by `nodeId`.
|
1084
|
+
*/
|
1085
|
+
getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
|
1086
|
+
|
1087
|
+
/**
|
1088
|
+
* Returns all media queries parsed by the rendering engine.
|
1089
|
+
*/
|
1090
|
+
getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
|
1091
|
+
|
1092
|
+
/**
|
1093
|
+
* Requests information about platform fonts which we used to render child TextNodes in the given
|
1094
|
+
* node.
|
1095
|
+
*/
|
1096
|
+
getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
|
1097
|
+
|
1098
|
+
/**
|
1099
|
+
* Returns the current textual content for a stylesheet.
|
1100
|
+
*/
|
1101
|
+
getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>;
|
1102
|
+
|
1103
|
+
/**
|
1104
|
+
* Returns all layers parsed by the rendering engine for the tree scope of a node.
|
1105
|
+
* Given a DOM element identified by nodeId, getLayersForNode returns the root
|
1106
|
+
* layer for the nearest ancestor document or shadow root. The layer root contains
|
1107
|
+
* the full layer tree for the tree scope and their ordering.
|
1108
|
+
*/
|
1109
|
+
getLayersForNode(params: Protocol.CSS.GetLayersForNodeRequest): Promise<Protocol.CSS.GetLayersForNodeResponse>;
|
1110
|
+
|
1111
|
+
/**
|
1112
|
+
* Starts tracking the given computed styles for updates. The specified array of properties
|
1113
|
+
* replaces the one previously specified. Pass empty array to disable tracking.
|
1114
|
+
* Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
|
1115
|
+
* The changes to computed style properties are only tracked for nodes pushed to the front-end
|
1116
|
+
* by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
|
1117
|
+
* to the front-end, no updates will be issued for the node.
|
1118
|
+
*/
|
1119
|
+
trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest): Promise<void>;
|
1120
|
+
|
1121
|
+
/**
|
1122
|
+
* Polls the next batch of computed style updates.
|
1123
|
+
*/
|
1124
|
+
takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
|
1125
|
+
|
1126
|
+
/**
|
1127
|
+
* Find a rule with the given active property for the given node and set the new value for this
|
1128
|
+
* property
|
1129
|
+
*/
|
1130
|
+
setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest): Promise<void>;
|
1131
|
+
|
1132
|
+
/**
|
1133
|
+
* Modifies the property rule property name.
|
1134
|
+
*/
|
1135
|
+
setPropertyRulePropertyName(params: Protocol.CSS.SetPropertyRulePropertyNameRequest): Promise<Protocol.CSS.SetPropertyRulePropertyNameResponse>;
|
1136
|
+
|
1137
|
+
/**
|
1138
|
+
* Modifies the keyframe rule key text.
|
1139
|
+
*/
|
1140
|
+
setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
|
1141
|
+
|
1142
|
+
/**
|
1143
|
+
* Modifies the rule selector.
|
1144
|
+
*/
|
1145
|
+
setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
|
1146
|
+
|
1147
|
+
/**
|
1148
|
+
* Modifies the expression of a container query.
|
1149
|
+
*/
|
1150
|
+
setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest): Promise<Protocol.CSS.SetContainerQueryTextResponse>;
|
1151
|
+
|
1152
|
+
/**
|
1153
|
+
* Modifies the expression of a supports at-rule.
|
1154
|
+
*/
|
1155
|
+
setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise<Protocol.CSS.SetSupportsTextResponse>;
|
1156
|
+
|
1157
|
+
/**
|
1158
|
+
* Modifies the expression of a scope at-rule.
|
1159
|
+
*/
|
1160
|
+
setScopeText(params: Protocol.CSS.SetScopeTextRequest): Promise<Protocol.CSS.SetScopeTextResponse>;
|
1161
|
+
|
1162
|
+
/**
|
1163
|
+
* Modifies the rule selector.
|
1164
|
+
*/
|
1165
|
+
setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
|
1166
|
+
|
1167
|
+
/**
|
1168
|
+
* Sets the new stylesheet text.
|
1169
|
+
*/
|
1170
|
+
setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise<Protocol.CSS.SetStyleSheetTextResponse>;
|
1171
|
+
|
1172
|
+
/**
|
1173
|
+
* Applies specified style edits one after another in the given order.
|
1174
|
+
*/
|
1175
|
+
setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
|
1176
|
+
|
1177
|
+
/**
|
1178
|
+
* Enables the selector recording.
|
1179
|
+
*/
|
1180
|
+
startRuleUsageTracking(): Promise<void>;
|
1181
|
+
|
1182
|
+
/**
|
1183
|
+
* Stop tracking rule usage and return the list of rules that were used since last call to
|
1184
|
+
* `takeCoverageDelta` (or since start of coverage instrumentation).
|
1185
|
+
*/
|
1186
|
+
stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
|
1187
|
+
|
1188
|
+
/**
|
1189
|
+
* Obtain list of rules that became used since last call to this method (or since start of coverage
|
1190
|
+
* instrumentation).
|
1191
|
+
*/
|
1192
|
+
takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
|
1193
|
+
|
1194
|
+
/**
|
1195
|
+
* Enables/disables rendering of local CSS fonts (enabled by default).
|
1196
|
+
*/
|
1197
|
+
setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise<void>;
|
1198
|
+
|
1199
|
+
/**
|
1200
|
+
* Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
|
1201
|
+
* web font.
|
1202
|
+
*/
|
1203
|
+
onFontsUpdated(listener: (params: Protocol.CSS.FontsUpdatedEvent) => void): void;
|
1204
|
+
offFontsUpdated(listener: (params: Protocol.CSS.FontsUpdatedEvent) => void): void;
|
1205
|
+
onceFontsUpdated(eventMatcher?: (params: Protocol.CSS.FontsUpdatedEvent) => boolean): void;
|
1206
|
+
|
1207
|
+
/**
|
1208
|
+
* Fires whenever a MediaQuery result changes (for example, after a browser window has been
|
1209
|
+
* resized.) The current implementation considers only viewport-dependent media features.
|
1210
|
+
*/
|
1211
|
+
onMediaQueryResultChanged(listener: () => void): void;
|
1212
|
+
offMediaQueryResultChanged(listener: () => void): void;
|
1213
|
+
onceMediaQueryResultChanged(eventMatcher?: () => boolean): void;
|
1214
|
+
|
1215
|
+
/**
|
1216
|
+
* Fired whenever an active document stylesheet is added.
|
1217
|
+
*/
|
1218
|
+
onStyleSheetAdded(listener: (params: Protocol.CSS.StyleSheetAddedEvent) => void): void;
|
1219
|
+
offStyleSheetAdded(listener: (params: Protocol.CSS.StyleSheetAddedEvent) => void): void;
|
1220
|
+
onceStyleSheetAdded(eventMatcher?: (params: Protocol.CSS.StyleSheetAddedEvent) => boolean): void;
|
1221
|
+
|
1222
|
+
/**
|
1223
|
+
* Fired whenever a stylesheet is changed as a result of the client operation.
|
1224
|
+
*/
|
1225
|
+
onStyleSheetChanged(listener: (params: Protocol.CSS.StyleSheetChangedEvent) => void): void;
|
1226
|
+
offStyleSheetChanged(listener: (params: Protocol.CSS.StyleSheetChangedEvent) => void): void;
|
1227
|
+
onceStyleSheetChanged(eventMatcher?: (params: Protocol.CSS.StyleSheetChangedEvent) => boolean): void;
|
1228
|
+
|
1229
|
+
/**
|
1230
|
+
* Fired whenever an active document stylesheet is removed.
|
1231
|
+
*/
|
1232
|
+
onStyleSheetRemoved(listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;
|
1233
|
+
offStyleSheetRemoved(listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;
|
1234
|
+
onceStyleSheetRemoved(eventMatcher?: (params: Protocol.CSS.StyleSheetRemovedEvent) => boolean): void;
|
1235
|
+
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
export interface CacheStorageApi {
|
1239
|
+
/**
|
1240
|
+
* Deletes a cache.
|
1241
|
+
*/
|
1242
|
+
deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<void>;
|
1243
|
+
|
1244
|
+
/**
|
1245
|
+
* Deletes a cache entry.
|
1246
|
+
*/
|
1247
|
+
deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<void>;
|
1248
|
+
|
1249
|
+
/**
|
1250
|
+
* Requests cache names.
|
1251
|
+
*/
|
1252
|
+
requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
|
1253
|
+
|
1254
|
+
/**
|
1255
|
+
* Fetches cache entry.
|
1256
|
+
*/
|
1257
|
+
requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
|
1258
|
+
|
1259
|
+
/**
|
1260
|
+
* Requests data from cache.
|
1261
|
+
*/
|
1262
|
+
requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise<Protocol.CacheStorage.RequestEntriesResponse>;
|
1263
|
+
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
export interface CastApi {
|
1267
|
+
/**
|
1268
|
+
* Starts observing for sinks that can be used for tab mirroring, and if set,
|
1269
|
+
* sinks compatible with |presentationUrl| as well. When sinks are found, a
|
1270
|
+
* |sinksUpdated| event is fired.
|
1271
|
+
* Also starts observing for issue messages. When an issue is added or removed,
|
1272
|
+
* an |issueUpdated| event is fired.
|
1273
|
+
*/
|
1274
|
+
enable(params: Protocol.Cast.EnableRequest): Promise<void>;
|
1275
|
+
|
1276
|
+
/**
|
1277
|
+
* Stops observing for sinks and issues.
|
1278
|
+
*/
|
1279
|
+
disable(): Promise<void>;
|
1280
|
+
|
1281
|
+
/**
|
1282
|
+
* Sets a sink to be used when the web page requests the browser to choose a
|
1283
|
+
* sink via Presentation API, Remote Playback API, or Cast SDK.
|
1284
|
+
*/
|
1285
|
+
setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<void>;
|
1286
|
+
|
1287
|
+
/**
|
1288
|
+
* Starts mirroring the desktop to the sink.
|
1289
|
+
*/
|
1290
|
+
startDesktopMirroring(params: Protocol.Cast.StartDesktopMirroringRequest): Promise<void>;
|
1291
|
+
|
1292
|
+
/**
|
1293
|
+
* Starts mirroring the tab to the sink.
|
1294
|
+
*/
|
1295
|
+
startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise<void>;
|
1296
|
+
|
1297
|
+
/**
|
1298
|
+
* Stops the active Cast session on the sink.
|
1299
|
+
*/
|
1300
|
+
stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<void>;
|
1301
|
+
|
1302
|
+
/**
|
1303
|
+
* This is fired whenever the list of available sinks changes. A sink is a
|
1304
|
+
* device or a software surface that you can cast to.
|
1305
|
+
*/
|
1306
|
+
onSinksUpdated(listener: (params: Protocol.Cast.SinksUpdatedEvent) => void): void;
|
1307
|
+
offSinksUpdated(listener: (params: Protocol.Cast.SinksUpdatedEvent) => void): void;
|
1308
|
+
onceSinksUpdated(eventMatcher?: (params: Protocol.Cast.SinksUpdatedEvent) => boolean): void;
|
1309
|
+
|
1310
|
+
/**
|
1311
|
+
* This is fired whenever the outstanding issue/error message changes.
|
1312
|
+
* |issueMessage| is empty if there is no issue.
|
1313
|
+
*/
|
1314
|
+
onIssueUpdated(listener: (params: Protocol.Cast.IssueUpdatedEvent) => void): void;
|
1315
|
+
offIssueUpdated(listener: (params: Protocol.Cast.IssueUpdatedEvent) => void): void;
|
1316
|
+
onceIssueUpdated(eventMatcher?: (params: Protocol.Cast.IssueUpdatedEvent) => boolean): void;
|
1317
|
+
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
export interface DOMApi {
|
1321
|
+
/**
|
1322
|
+
* Collects class names for the node with given id and all of it's child nodes.
|
1323
|
+
*/
|
1324
|
+
collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest): Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
|
1325
|
+
|
1326
|
+
/**
|
1327
|
+
* Creates a deep copy of the specified node and places it into the target container before the
|
1328
|
+
* given anchor.
|
1329
|
+
*/
|
1330
|
+
copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
|
1331
|
+
|
1332
|
+
/**
|
1333
|
+
* Describes node given its id, does not require domain to be enabled. Does not start tracking any
|
1334
|
+
* objects, can be used for automation.
|
1335
|
+
*/
|
1336
|
+
describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
|
1337
|
+
|
1338
|
+
/**
|
1339
|
+
* Scrolls the specified rect of the given node into view if not already visible.
|
1340
|
+
* Note: exactly one between nodeId, backendNodeId and objectId should be passed
|
1341
|
+
* to identify the node.
|
1342
|
+
*/
|
1343
|
+
scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest): Promise<void>;
|
1344
|
+
|
1345
|
+
/**
|
1346
|
+
* Disables DOM agent for the given page.
|
1347
|
+
*/
|
1348
|
+
disable(): Promise<void>;
|
1349
|
+
|
1350
|
+
/**
|
1351
|
+
* Discards search results from the session with the given id. `getSearchResults` should no longer
|
1352
|
+
* be called for that search.
|
1353
|
+
*/
|
1354
|
+
discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest): Promise<void>;
|
1355
|
+
|
1356
|
+
/**
|
1357
|
+
* Enables DOM agent for the given page.
|
1358
|
+
*/
|
1359
|
+
enable(params: Protocol.DOM.EnableRequest): Promise<void>;
|
1360
|
+
|
1361
|
+
/**
|
1362
|
+
* Focuses the given element.
|
1363
|
+
*/
|
1364
|
+
focus(params: Protocol.DOM.FocusRequest): Promise<void>;
|
1365
|
+
|
1366
|
+
/**
|
1367
|
+
* Returns attributes for the specified node.
|
1368
|
+
*/
|
1369
|
+
getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
|
1370
|
+
|
1371
|
+
/**
|
1372
|
+
* Returns boxes for the given node.
|
1373
|
+
*/
|
1374
|
+
getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
|
1375
|
+
|
1376
|
+
/**
|
1377
|
+
* Returns quads that describe node position on the page. This method
|
1378
|
+
* might return multiple quads for inline nodes.
|
1379
|
+
*/
|
1380
|
+
getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
|
1381
|
+
|
1382
|
+
/**
|
1383
|
+
* Returns the root DOM node (and optionally the subtree) to the caller.
|
1384
|
+
* Implicitly enables the DOM domain events for the current target.
|
1385
|
+
*/
|
1386
|
+
getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
|
1387
|
+
|
1388
|
+
/**
|
1389
|
+
* Returns the root DOM node (and optionally the subtree) to the caller.
|
1390
|
+
* Deprecated, as it is not designed to work well with the rest of the DOM agent.
|
1391
|
+
* Use DOMSnapshot.captureSnapshot instead.
|
1392
|
+
*/
|
1393
|
+
getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
|
1394
|
+
|
1395
|
+
/**
|
1396
|
+
* Finds nodes with a given computed style in a subtree.
|
1397
|
+
*/
|
1398
|
+
getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
|
1399
|
+
|
1400
|
+
/**
|
1401
|
+
* Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
|
1402
|
+
* either returned or not.
|
1403
|
+
*/
|
1404
|
+
getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest): Promise<Protocol.DOM.GetNodeForLocationResponse>;
|
1405
|
+
|
1406
|
+
/**
|
1407
|
+
* Returns node's HTML markup.
|
1408
|
+
*/
|
1409
|
+
getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
|
1410
|
+
|
1411
|
+
/**
|
1412
|
+
* Returns the id of the nearest ancestor that is a relayout boundary.
|
1413
|
+
*/
|
1414
|
+
getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
|
1415
|
+
|
1416
|
+
/**
|
1417
|
+
* Returns search results from given `fromIndex` to given `toIndex` from the search with the given
|
1418
|
+
* identifier.
|
1419
|
+
*/
|
1420
|
+
getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise<Protocol.DOM.GetSearchResultsResponse>;
|
1421
|
+
|
1422
|
+
/**
|
1423
|
+
* Hides any highlight.
|
1424
|
+
*/
|
1425
|
+
hideHighlight(): Promise<void>;
|
1426
|
+
|
1427
|
+
/**
|
1428
|
+
* Highlights DOM node.
|
1429
|
+
*/
|
1430
|
+
highlightNode(): Promise<void>;
|
1431
|
+
|
1432
|
+
/**
|
1433
|
+
* Highlights given rectangle.
|
1434
|
+
*/
|
1435
|
+
highlightRect(): Promise<void>;
|
1436
|
+
|
1437
|
+
/**
|
1438
|
+
* Marks last undoable state.
|
1439
|
+
*/
|
1440
|
+
markUndoableState(): Promise<void>;
|
1441
|
+
|
1442
|
+
/**
|
1443
|
+
* Moves node into the new container, places it before the given anchor.
|
1444
|
+
*/
|
1445
|
+
moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
|
1446
|
+
|
1447
|
+
/**
|
1448
|
+
* Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
|
1449
|
+
* `cancelSearch` to end this search session.
|
1450
|
+
*/
|
1451
|
+
performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
|
1452
|
+
|
1453
|
+
/**
|
1454
|
+
* Requests that the node is sent to the caller given its path. // FIXME, use XPath
|
1455
|
+
*/
|
1456
|
+
pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
|
1457
|
+
|
1458
|
+
/**
|
1459
|
+
* Requests that a batch of nodes is sent to the caller given their backend node ids.
|
1460
|
+
*/
|
1461
|
+
pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
|
1462
|
+
|
1463
|
+
/**
|
1464
|
+
* Executes `querySelector` on a given node.
|
1465
|
+
*/
|
1466
|
+
querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
|
1467
|
+
|
1468
|
+
/**
|
1469
|
+
* Executes `querySelectorAll` on a given node.
|
1470
|
+
*/
|
1471
|
+
querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise<Protocol.DOM.QuerySelectorAllResponse>;
|
1472
|
+
|
1473
|
+
/**
|
1474
|
+
* Returns NodeIds of current top layer elements.
|
1475
|
+
* Top layer is rendered closest to the user within a viewport, therefore its elements always
|
1476
|
+
* appear on top of all other content.
|
1477
|
+
*/
|
1478
|
+
getTopLayerElements(): Promise<Protocol.DOM.GetTopLayerElementsResponse>;
|
1479
|
+
|
1480
|
+
/**
|
1481
|
+
* Re-does the last undone action.
|
1482
|
+
*/
|
1483
|
+
redo(): Promise<void>;
|
1484
|
+
|
1485
|
+
/**
|
1486
|
+
* Removes attribute with given name from an element with given id.
|
1487
|
+
*/
|
1488
|
+
removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<void>;
|
1489
|
+
|
1490
|
+
/**
|
1491
|
+
* Removes node with given id.
|
1492
|
+
*/
|
1493
|
+
removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<void>;
|
1494
|
+
|
1495
|
+
/**
|
1496
|
+
* Requests that children of the node with given id are returned to the caller in form of
|
1497
|
+
* `setChildNodes` events where not only immediate children are retrieved, but all children down to
|
1498
|
+
* the specified depth.
|
1499
|
+
*/
|
1500
|
+
requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest): Promise<void>;
|
1501
|
+
|
1502
|
+
/**
|
1503
|
+
* Requests that the node is sent to the caller given the JavaScript node object reference. All
|
1504
|
+
* nodes that form the path from the node to the root are also sent to the client as a series of
|
1505
|
+
* `setChildNodes` notifications.
|
1506
|
+
*/
|
1507
|
+
requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
|
1508
|
+
|
1509
|
+
/**
|
1510
|
+
* Resolves the JavaScript node object for a given NodeId or BackendNodeId.
|
1511
|
+
*/
|
1512
|
+
resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
|
1513
|
+
|
1514
|
+
/**
|
1515
|
+
* Sets attribute for an element with given id.
|
1516
|
+
*/
|
1517
|
+
setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise<void>;
|
1518
|
+
|
1519
|
+
/**
|
1520
|
+
* Sets attributes on element with given id. This method is useful when user edits some existing
|
1521
|
+
* attribute value and types in several attribute name/value pairs.
|
1522
|
+
*/
|
1523
|
+
setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest): Promise<void>;
|
1524
|
+
|
1525
|
+
/**
|
1526
|
+
* Sets files for the given file input element.
|
1527
|
+
*/
|
1528
|
+
setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise<void>;
|
1529
|
+
|
1530
|
+
/**
|
1531
|
+
* Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
|
1532
|
+
*/
|
1533
|
+
setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise<void>;
|
1534
|
+
|
1535
|
+
/**
|
1536
|
+
* Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
|
1537
|
+
*/
|
1538
|
+
getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest): Promise<Protocol.DOM.GetNodeStackTracesResponse>;
|
1539
|
+
|
1540
|
+
/**
|
1541
|
+
* Returns file information for the given
|
1542
|
+
* File wrapper.
|
1543
|
+
*/
|
1544
|
+
getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>;
|
1545
|
+
|
1546
|
+
/**
|
1547
|
+
* Enables console to refer to the node with given id via $x (see Command Line API for more details
|
1548
|
+
* $x functions).
|
1549
|
+
*/
|
1550
|
+
setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise<void>;
|
1551
|
+
|
1552
|
+
/**
|
1553
|
+
* Sets node name for a node with given id.
|
1554
|
+
*/
|
1555
|
+
setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>;
|
1556
|
+
|
1557
|
+
/**
|
1558
|
+
* Sets node value for a node with given id.
|
1559
|
+
*/
|
1560
|
+
setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<void>;
|
1561
|
+
|
1562
|
+
/**
|
1563
|
+
* Sets node HTML markup, returns new node id.
|
1564
|
+
*/
|
1565
|
+
setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<void>;
|
1566
|
+
|
1567
|
+
/**
|
1568
|
+
* Undoes the last performed action.
|
1569
|
+
*/
|
1570
|
+
undo(): Promise<void>;
|
1571
|
+
|
1572
|
+
/**
|
1573
|
+
* Returns iframe node that owns iframe with the given domain.
|
1574
|
+
*/
|
1575
|
+
getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>;
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* Returns the query container of the given node based on container query
|
1579
|
+
* conditions: containerName, physical, and logical axes. If no axes are
|
1580
|
+
* provided, the style container is returned, which is the direct parent or the
|
1581
|
+
* closest element with a matching container-name.
|
1582
|
+
*/
|
1583
|
+
getContainerForNode(params: Protocol.DOM.GetContainerForNodeRequest): Promise<Protocol.DOM.GetContainerForNodeResponse>;
|
1584
|
+
|
1585
|
+
/**
|
1586
|
+
* Returns the descendants of a container query container that have
|
1587
|
+
* container queries against this container.
|
1588
|
+
*/
|
1589
|
+
getQueryingDescendantsForContainer(params: Protocol.DOM.GetQueryingDescendantsForContainerRequest): Promise<Protocol.DOM.GetQueryingDescendantsForContainerResponse>;
|
1590
|
+
|
1591
|
+
/**
|
1592
|
+
* Fired when `Element`'s attribute is modified.
|
1593
|
+
*/
|
1594
|
+
onAttributeModified(listener: (params: Protocol.DOM.AttributeModifiedEvent) => void): void;
|
1595
|
+
offAttributeModified(listener: (params: Protocol.DOM.AttributeModifiedEvent) => void): void;
|
1596
|
+
onceAttributeModified(eventMatcher?: (params: Protocol.DOM.AttributeModifiedEvent) => boolean): void;
|
1597
|
+
|
1598
|
+
/**
|
1599
|
+
* Fired when `Element`'s attribute is removed.
|
1600
|
+
*/
|
1601
|
+
onAttributeRemoved(listener: (params: Protocol.DOM.AttributeRemovedEvent) => void): void;
|
1602
|
+
offAttributeRemoved(listener: (params: Protocol.DOM.AttributeRemovedEvent) => void): void;
|
1603
|
+
onceAttributeRemoved(eventMatcher?: (params: Protocol.DOM.AttributeRemovedEvent) => boolean): void;
|
1604
|
+
|
1605
|
+
/**
|
1606
|
+
* Mirrors `DOMCharacterDataModified` event.
|
1607
|
+
*/
|
1608
|
+
onCharacterDataModified(listener: (params: Protocol.DOM.CharacterDataModifiedEvent) => void): void;
|
1609
|
+
offCharacterDataModified(listener: (params: Protocol.DOM.CharacterDataModifiedEvent) => void): void;
|
1610
|
+
onceCharacterDataModified(eventMatcher?: (params: Protocol.DOM.CharacterDataModifiedEvent) => boolean): void;
|
1611
|
+
|
1612
|
+
/**
|
1613
|
+
* Fired when `Container`'s child node count has changed.
|
1614
|
+
*/
|
1615
|
+
onChildNodeCountUpdated(listener: (params: Protocol.DOM.ChildNodeCountUpdatedEvent) => void): void;
|
1616
|
+
offChildNodeCountUpdated(listener: (params: Protocol.DOM.ChildNodeCountUpdatedEvent) => void): void;
|
1617
|
+
onceChildNodeCountUpdated(eventMatcher?: (params: Protocol.DOM.ChildNodeCountUpdatedEvent) => boolean): void;
|
1618
|
+
|
1619
|
+
/**
|
1620
|
+
* Mirrors `DOMNodeInserted` event.
|
1621
|
+
*/
|
1622
|
+
onChildNodeInserted(listener: (params: Protocol.DOM.ChildNodeInsertedEvent) => void): void;
|
1623
|
+
offChildNodeInserted(listener: (params: Protocol.DOM.ChildNodeInsertedEvent) => void): void;
|
1624
|
+
onceChildNodeInserted(eventMatcher?: (params: Protocol.DOM.ChildNodeInsertedEvent) => boolean): void;
|
1625
|
+
|
1626
|
+
/**
|
1627
|
+
* Mirrors `DOMNodeRemoved` event.
|
1628
|
+
*/
|
1629
|
+
onChildNodeRemoved(listener: (params: Protocol.DOM.ChildNodeRemovedEvent) => void): void;
|
1630
|
+
offChildNodeRemoved(listener: (params: Protocol.DOM.ChildNodeRemovedEvent) => void): void;
|
1631
|
+
onceChildNodeRemoved(eventMatcher?: (params: Protocol.DOM.ChildNodeRemovedEvent) => boolean): void;
|
1632
|
+
|
1633
|
+
/**
|
1634
|
+
* Called when distribution is changed.
|
1635
|
+
*/
|
1636
|
+
onDistributedNodesUpdated(listener: (params: Protocol.DOM.DistributedNodesUpdatedEvent) => void): void;
|
1637
|
+
offDistributedNodesUpdated(listener: (params: Protocol.DOM.DistributedNodesUpdatedEvent) => void): void;
|
1638
|
+
onceDistributedNodesUpdated(eventMatcher?: (params: Protocol.DOM.DistributedNodesUpdatedEvent) => boolean): void;
|
1639
|
+
|
1640
|
+
/**
|
1641
|
+
* Fired when `Document` has been totally updated. Node ids are no longer valid.
|
1642
|
+
*/
|
1643
|
+
onDocumentUpdated(listener: () => void): void;
|
1644
|
+
offDocumentUpdated(listener: () => void): void;
|
1645
|
+
onceDocumentUpdated(eventMatcher?: () => boolean): void;
|
1646
|
+
|
1647
|
+
/**
|
1648
|
+
* Fired when `Element`'s inline style is modified via a CSS property modification.
|
1649
|
+
*/
|
1650
|
+
onInlineStyleInvalidated(listener: (params: Protocol.DOM.InlineStyleInvalidatedEvent) => void): void;
|
1651
|
+
offInlineStyleInvalidated(listener: (params: Protocol.DOM.InlineStyleInvalidatedEvent) => void): void;
|
1652
|
+
onceInlineStyleInvalidated(eventMatcher?: (params: Protocol.DOM.InlineStyleInvalidatedEvent) => boolean): void;
|
1653
|
+
|
1654
|
+
/**
|
1655
|
+
* Called when a pseudo element is added to an element.
|
1656
|
+
*/
|
1657
|
+
onPseudoElementAdded(listener: (params: Protocol.DOM.PseudoElementAddedEvent) => void): void;
|
1658
|
+
offPseudoElementAdded(listener: (params: Protocol.DOM.PseudoElementAddedEvent) => void): void;
|
1659
|
+
oncePseudoElementAdded(eventMatcher?: (params: Protocol.DOM.PseudoElementAddedEvent) => boolean): void;
|
1660
|
+
|
1661
|
+
/**
|
1662
|
+
* Called when top layer elements are changed.
|
1663
|
+
*/
|
1664
|
+
onTopLayerElementsUpdated(listener: () => void): void;
|
1665
|
+
offTopLayerElementsUpdated(listener: () => void): void;
|
1666
|
+
onceTopLayerElementsUpdated(eventMatcher?: () => boolean): void;
|
1667
|
+
|
1668
|
+
/**
|
1669
|
+
* Called when a pseudo element is removed from an element.
|
1670
|
+
*/
|
1671
|
+
onPseudoElementRemoved(listener: (params: Protocol.DOM.PseudoElementRemovedEvent) => void): void;
|
1672
|
+
offPseudoElementRemoved(listener: (params: Protocol.DOM.PseudoElementRemovedEvent) => void): void;
|
1673
|
+
oncePseudoElementRemoved(eventMatcher?: (params: Protocol.DOM.PseudoElementRemovedEvent) => boolean): void;
|
1674
|
+
|
1675
|
+
/**
|
1676
|
+
* Fired when backend wants to provide client with the missing DOM structure. This happens upon
|
1677
|
+
* most of the calls requesting node ids.
|
1678
|
+
*/
|
1679
|
+
onSetChildNodes(listener: (params: Protocol.DOM.SetChildNodesEvent) => void): void;
|
1680
|
+
offSetChildNodes(listener: (params: Protocol.DOM.SetChildNodesEvent) => void): void;
|
1681
|
+
onceSetChildNodes(eventMatcher?: (params: Protocol.DOM.SetChildNodesEvent) => boolean): void;
|
1682
|
+
|
1683
|
+
/**
|
1684
|
+
* Called when shadow root is popped from the element.
|
1685
|
+
*/
|
1686
|
+
onShadowRootPopped(listener: (params: Protocol.DOM.ShadowRootPoppedEvent) => void): void;
|
1687
|
+
offShadowRootPopped(listener: (params: Protocol.DOM.ShadowRootPoppedEvent) => void): void;
|
1688
|
+
onceShadowRootPopped(eventMatcher?: (params: Protocol.DOM.ShadowRootPoppedEvent) => boolean): void;
|
1689
|
+
|
1690
|
+
/**
|
1691
|
+
* Called when shadow root is pushed into the element.
|
1692
|
+
*/
|
1693
|
+
onShadowRootPushed(listener: (params: Protocol.DOM.ShadowRootPushedEvent) => void): void;
|
1694
|
+
offShadowRootPushed(listener: (params: Protocol.DOM.ShadowRootPushedEvent) => void): void;
|
1695
|
+
onceShadowRootPushed(eventMatcher?: (params: Protocol.DOM.ShadowRootPushedEvent) => boolean): void;
|
1696
|
+
|
1697
|
+
}
|
1698
|
+
|
1699
|
+
export interface DOMDebuggerApi {
|
1700
|
+
/**
|
1701
|
+
* Returns event listeners of the given object.
|
1702
|
+
*/
|
1703
|
+
getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest): Promise<Protocol.DOMDebugger.GetEventListenersResponse>;
|
1704
|
+
|
1705
|
+
/**
|
1706
|
+
* Removes DOM breakpoint that was set using `setDOMBreakpoint`.
|
1707
|
+
*/
|
1708
|
+
removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest): Promise<void>;
|
1709
|
+
|
1710
|
+
/**
|
1711
|
+
* Removes breakpoint on particular DOM event.
|
1712
|
+
*/
|
1713
|
+
removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest): Promise<void>;
|
1714
|
+
|
1715
|
+
/**
|
1716
|
+
* Removes breakpoint on particular native event.
|
1717
|
+
*/
|
1718
|
+
removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest): Promise<void>;
|
1719
|
+
|
1720
|
+
/**
|
1721
|
+
* Removes breakpoint from XMLHttpRequest.
|
1722
|
+
*/
|
1723
|
+
removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest): Promise<void>;
|
1724
|
+
|
1725
|
+
/**
|
1726
|
+
* Sets breakpoint on particular CSP violations.
|
1727
|
+
*/
|
1728
|
+
setBreakOnCSPViolation(params: Protocol.DOMDebugger.SetBreakOnCSPViolationRequest): Promise<void>;
|
1729
|
+
|
1730
|
+
/**
|
1731
|
+
* Sets breakpoint on particular operation with DOM.
|
1732
|
+
*/
|
1733
|
+
setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest): Promise<void>;
|
1734
|
+
|
1735
|
+
/**
|
1736
|
+
* Sets breakpoint on particular DOM event.
|
1737
|
+
*/
|
1738
|
+
setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest): Promise<void>;
|
1739
|
+
|
1740
|
+
/**
|
1741
|
+
* Sets breakpoint on particular native event.
|
1742
|
+
*/
|
1743
|
+
setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest): Promise<void>;
|
1744
|
+
|
1745
|
+
/**
|
1746
|
+
* Sets breakpoint on XMLHttpRequest.
|
1747
|
+
*/
|
1748
|
+
setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest): Promise<void>;
|
1749
|
+
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
export interface EventBreakpointsApi {
|
1753
|
+
/**
|
1754
|
+
* Sets breakpoint on particular native event.
|
1755
|
+
*/
|
1756
|
+
setInstrumentationBreakpoint(params: Protocol.EventBreakpoints.SetInstrumentationBreakpointRequest): Promise<void>;
|
1757
|
+
|
1758
|
+
/**
|
1759
|
+
* Removes breakpoint on particular native event.
|
1760
|
+
*/
|
1761
|
+
removeInstrumentationBreakpoint(params: Protocol.EventBreakpoints.RemoveInstrumentationBreakpointRequest): Promise<void>;
|
1762
|
+
|
1763
|
+
/**
|
1764
|
+
* Removes all breakpoints
|
1765
|
+
*/
|
1766
|
+
disable(): Promise<void>;
|
1767
|
+
|
1768
|
+
}
|
1769
|
+
|
1770
|
+
export interface DOMSnapshotApi {
|
1771
|
+
/**
|
1772
|
+
* Disables DOM snapshot agent for the given page.
|
1773
|
+
*/
|
1774
|
+
disable(): Promise<void>;
|
1775
|
+
|
1776
|
+
/**
|
1777
|
+
* Enables DOM snapshot agent for the given page.
|
1778
|
+
*/
|
1779
|
+
enable(): Promise<void>;
|
1780
|
+
|
1781
|
+
/**
|
1782
|
+
* Returns a document snapshot, including the full DOM tree of the root node (including iframes,
|
1783
|
+
* template contents, and imported documents) in a flattened array, as well as layout and
|
1784
|
+
* white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
|
1785
|
+
* flattened.
|
1786
|
+
*/
|
1787
|
+
getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest): Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
|
1788
|
+
|
1789
|
+
/**
|
1790
|
+
* Returns a document snapshot, including the full DOM tree of the root node (including iframes,
|
1791
|
+
* template contents, and imported documents) in a flattened array, as well as layout and
|
1792
|
+
* white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
|
1793
|
+
* flattened.
|
1794
|
+
*/
|
1795
|
+
captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest): Promise<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
|
1796
|
+
|
1797
|
+
}
|
1798
|
+
|
1799
|
+
export interface DOMStorageApi {
|
1800
|
+
clear(params: Protocol.DOMStorage.ClearRequest): Promise<void>;
|
1801
|
+
|
1802
|
+
/**
|
1803
|
+
* Disables storage tracking, prevents storage events from being sent to the client.
|
1804
|
+
*/
|
1805
|
+
disable(): Promise<void>;
|
1806
|
+
|
1807
|
+
/**
|
1808
|
+
* Enables storage tracking, storage events will now be delivered to the client.
|
1809
|
+
*/
|
1810
|
+
enable(): Promise<void>;
|
1811
|
+
|
1812
|
+
getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest): Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
|
1813
|
+
|
1814
|
+
removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest): Promise<void>;
|
1815
|
+
|
1816
|
+
setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest): Promise<void>;
|
1817
|
+
|
1818
|
+
onDomStorageItemAdded(listener: (params: Protocol.DOMStorage.DomStorageItemAddedEvent) => void): void;
|
1819
|
+
offDomStorageItemAdded(listener: (params: Protocol.DOMStorage.DomStorageItemAddedEvent) => void): void;
|
1820
|
+
onceDomStorageItemAdded(eventMatcher?: (params: Protocol.DOMStorage.DomStorageItemAddedEvent) => boolean): void;
|
1821
|
+
|
1822
|
+
onDomStorageItemRemoved(listener: (params: Protocol.DOMStorage.DomStorageItemRemovedEvent) => void): void;
|
1823
|
+
offDomStorageItemRemoved(listener: (params: Protocol.DOMStorage.DomStorageItemRemovedEvent) => void): void;
|
1824
|
+
onceDomStorageItemRemoved(eventMatcher?: (params: Protocol.DOMStorage.DomStorageItemRemovedEvent) => boolean): void;
|
1825
|
+
|
1826
|
+
onDomStorageItemUpdated(listener: (params: Protocol.DOMStorage.DomStorageItemUpdatedEvent) => void): void;
|
1827
|
+
offDomStorageItemUpdated(listener: (params: Protocol.DOMStorage.DomStorageItemUpdatedEvent) => void): void;
|
1828
|
+
onceDomStorageItemUpdated(eventMatcher?: (params: Protocol.DOMStorage.DomStorageItemUpdatedEvent) => boolean): void;
|
1829
|
+
|
1830
|
+
onDomStorageItemsCleared(listener: (params: Protocol.DOMStorage.DomStorageItemsClearedEvent) => void): void;
|
1831
|
+
offDomStorageItemsCleared(listener: (params: Protocol.DOMStorage.DomStorageItemsClearedEvent) => void): void;
|
1832
|
+
onceDomStorageItemsCleared(eventMatcher?: (params: Protocol.DOMStorage.DomStorageItemsClearedEvent) => boolean): void;
|
1833
|
+
|
1834
|
+
}
|
1835
|
+
|
1836
|
+
export interface DatabaseApi {
|
1837
|
+
/**
|
1838
|
+
* Disables database tracking, prevents database events from being sent to the client.
|
1839
|
+
*/
|
1840
|
+
disable(): Promise<void>;
|
1841
|
+
|
1842
|
+
/**
|
1843
|
+
* Enables database tracking, database events will now be delivered to the client.
|
1844
|
+
*/
|
1845
|
+
enable(): Promise<void>;
|
1846
|
+
|
1847
|
+
executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
|
1848
|
+
|
1849
|
+
getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest): Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
|
1850
|
+
|
1851
|
+
onAddDatabase(listener: (params: Protocol.Database.AddDatabaseEvent) => void): void;
|
1852
|
+
offAddDatabase(listener: (params: Protocol.Database.AddDatabaseEvent) => void): void;
|
1853
|
+
onceAddDatabase(eventMatcher?: (params: Protocol.Database.AddDatabaseEvent) => boolean): void;
|
1854
|
+
|
1855
|
+
}
|
1856
|
+
|
1857
|
+
export interface DeviceOrientationApi {
|
1858
|
+
/**
|
1859
|
+
* Clears the overridden Device Orientation.
|
1860
|
+
*/
|
1861
|
+
clearDeviceOrientationOverride(): Promise<void>;
|
1862
|
+
|
1863
|
+
/**
|
1864
|
+
* Overrides the Device Orientation.
|
1865
|
+
*/
|
1866
|
+
setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest): Promise<void>;
|
1867
|
+
|
1868
|
+
}
|
1869
|
+
|
1870
|
+
export interface EmulationApi {
|
1871
|
+
/**
|
1872
|
+
* Tells whether emulation is supported.
|
1873
|
+
*/
|
1874
|
+
canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
|
1875
|
+
|
1876
|
+
/**
|
1877
|
+
* Clears the overridden device metrics.
|
1878
|
+
*/
|
1879
|
+
clearDeviceMetricsOverride(): Promise<void>;
|
1880
|
+
|
1881
|
+
/**
|
1882
|
+
* Clears the overridden Geolocation Position and Error.
|
1883
|
+
*/
|
1884
|
+
clearGeolocationOverride(): Promise<void>;
|
1885
|
+
|
1886
|
+
/**
|
1887
|
+
* Requests that page scale factor is reset to initial values.
|
1888
|
+
*/
|
1889
|
+
resetPageScaleFactor(): Promise<void>;
|
1890
|
+
|
1891
|
+
/**
|
1892
|
+
* Enables or disables simulating a focused and active page.
|
1893
|
+
*/
|
1894
|
+
setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest): Promise<void>;
|
1895
|
+
|
1896
|
+
/**
|
1897
|
+
* Automatically render all web contents using a dark theme.
|
1898
|
+
*/
|
1899
|
+
setAutoDarkModeOverride(params: Protocol.Emulation.SetAutoDarkModeOverrideRequest): Promise<void>;
|
1900
|
+
|
1901
|
+
/**
|
1902
|
+
* Enables CPU throttling to emulate slow CPUs.
|
1903
|
+
*/
|
1904
|
+
setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest): Promise<void>;
|
1905
|
+
|
1906
|
+
/**
|
1907
|
+
* Sets or clears an override of the default background color of the frame. This override is used
|
1908
|
+
* if the content does not specify one.
|
1909
|
+
*/
|
1910
|
+
setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest): Promise<void>;
|
1911
|
+
|
1912
|
+
/**
|
1913
|
+
* Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
|
1914
|
+
* window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
|
1915
|
+
* query results).
|
1916
|
+
*/
|
1917
|
+
setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest): Promise<void>;
|
1918
|
+
|
1919
|
+
setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest): Promise<void>;
|
1920
|
+
|
1921
|
+
setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest): Promise<void>;
|
1922
|
+
|
1923
|
+
setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest): Promise<void>;
|
1924
|
+
|
1925
|
+
/**
|
1926
|
+
* Emulates the given media type or media feature for CSS media queries.
|
1927
|
+
*/
|
1928
|
+
setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest): Promise<void>;
|
1929
|
+
|
1930
|
+
/**
|
1931
|
+
* Emulates the given vision deficiency.
|
1932
|
+
*/
|
1933
|
+
setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest): Promise<void>;
|
1934
|
+
|
1935
|
+
/**
|
1936
|
+
* Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
|
1937
|
+
* unavailable.
|
1938
|
+
*/
|
1939
|
+
setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest): Promise<void>;
|
1940
|
+
|
1941
|
+
getOverriddenSensorInformation(params: Protocol.Emulation.GetOverriddenSensorInformationRequest): Promise<Protocol.Emulation.GetOverriddenSensorInformationResponse>;
|
1942
|
+
|
1943
|
+
/**
|
1944
|
+
* Overrides a platform sensor of a given type. If |enabled| is true, calls to
|
1945
|
+
* Sensor.start() will use a virtual sensor as backend rather than fetching
|
1946
|
+
* data from a real hardware sensor. Otherwise, existing virtual
|
1947
|
+
* sensor-backend Sensor objects will fire an error event and new calls to
|
1948
|
+
* Sensor.start() will attempt to use a real sensor instead.
|
1949
|
+
*/
|
1950
|
+
setSensorOverrideEnabled(params: Protocol.Emulation.SetSensorOverrideEnabledRequest): Promise<void>;
|
1951
|
+
|
1952
|
+
/**
|
1953
|
+
* Updates the sensor readings reported by a sensor type previously overriden
|
1954
|
+
* by setSensorOverrideEnabled.
|
1955
|
+
*/
|
1956
|
+
setSensorOverrideReadings(params: Protocol.Emulation.SetSensorOverrideReadingsRequest): Promise<void>;
|
1957
|
+
|
1958
|
+
/**
|
1959
|
+
* Overrides the Idle state.
|
1960
|
+
*/
|
1961
|
+
setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest): Promise<void>;
|
1962
|
+
|
1963
|
+
/**
|
1964
|
+
* Clears Idle state overrides.
|
1965
|
+
*/
|
1966
|
+
clearIdleOverride(): Promise<void>;
|
1967
|
+
|
1968
|
+
/**
|
1969
|
+
* Overrides value returned by the javascript navigator object.
|
1970
|
+
*/
|
1971
|
+
setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest): Promise<void>;
|
1972
|
+
|
1973
|
+
/**
|
1974
|
+
* Sets a specified page scale factor.
|
1975
|
+
*/
|
1976
|
+
setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest): Promise<void>;
|
1977
|
+
|
1978
|
+
/**
|
1979
|
+
* Switches script execution in the page.
|
1980
|
+
*/
|
1981
|
+
setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest): Promise<void>;
|
1982
|
+
|
1983
|
+
/**
|
1984
|
+
* Enables touch on platforms which do not support them.
|
1985
|
+
*/
|
1986
|
+
setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest): Promise<void>;
|
1987
|
+
|
1988
|
+
/**
|
1989
|
+
* Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
|
1990
|
+
* the current virtual time policy. Note this supersedes any previous time budget.
|
1991
|
+
*/
|
1992
|
+
setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest): Promise<Protocol.Emulation.SetVirtualTimePolicyResponse>;
|
1993
|
+
|
1994
|
+
/**
|
1995
|
+
* Overrides default host system locale with the specified one.
|
1996
|
+
*/
|
1997
|
+
setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest): Promise<void>;
|
1998
|
+
|
1999
|
+
/**
|
2000
|
+
* Overrides default host system timezone with the specified one.
|
2001
|
+
*/
|
2002
|
+
setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest): Promise<void>;
|
2003
|
+
|
2004
|
+
/**
|
2005
|
+
* Resizes the frame/viewport of the page. Note that this does not affect the frame's container
|
2006
|
+
* (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
|
2007
|
+
* on Android.
|
2008
|
+
*/
|
2009
|
+
setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest): Promise<void>;
|
2010
|
+
|
2011
|
+
setDisabledImageTypes(params: Protocol.Emulation.SetDisabledImageTypesRequest): Promise<void>;
|
2012
|
+
|
2013
|
+
setHardwareConcurrencyOverride(params: Protocol.Emulation.SetHardwareConcurrencyOverrideRequest): Promise<void>;
|
2014
|
+
|
2015
|
+
/**
|
2016
|
+
* Allows overriding user agent with the given string.
|
2017
|
+
*/
|
2018
|
+
setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest): Promise<void>;
|
2019
|
+
|
2020
|
+
/**
|
2021
|
+
* Allows overriding the automation flag.
|
2022
|
+
*/
|
2023
|
+
setAutomationOverride(params: Protocol.Emulation.SetAutomationOverrideRequest): Promise<void>;
|
2024
|
+
|
2025
|
+
/**
|
2026
|
+
* Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
|
2027
|
+
*/
|
2028
|
+
onVirtualTimeBudgetExpired(listener: () => void): void;
|
2029
|
+
offVirtualTimeBudgetExpired(listener: () => void): void;
|
2030
|
+
onceVirtualTimeBudgetExpired(eventMatcher?: () => boolean): void;
|
2031
|
+
|
2032
|
+
}
|
2033
|
+
|
2034
|
+
export interface HeadlessExperimentalApi {
|
2035
|
+
/**
|
2036
|
+
* Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
|
2037
|
+
* screenshot from the resulting frame. Requires that the target was created with enabled
|
2038
|
+
* BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
|
2039
|
+
* https://goo.gle/chrome-headless-rendering for more background.
|
2040
|
+
*/
|
2041
|
+
beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
|
2042
|
+
|
2043
|
+
/**
|
2044
|
+
* Disables headless events for the target.
|
2045
|
+
*/
|
2046
|
+
disable(): Promise<void>;
|
2047
|
+
|
2048
|
+
/**
|
2049
|
+
* Enables headless events for the target.
|
2050
|
+
*/
|
2051
|
+
enable(): Promise<void>;
|
2052
|
+
|
2053
|
+
}
|
2054
|
+
|
2055
|
+
export interface IOApi {
|
2056
|
+
/**
|
2057
|
+
* Close the stream, discard any temporary backing storage.
|
2058
|
+
*/
|
2059
|
+
close(params: Protocol.IO.CloseRequest): Promise<void>;
|
2060
|
+
|
2061
|
+
/**
|
2062
|
+
* Read a chunk of the stream
|
2063
|
+
*/
|
2064
|
+
read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
|
2065
|
+
|
2066
|
+
/**
|
2067
|
+
* Return UUID of Blob object specified by a remote object id.
|
2068
|
+
*/
|
2069
|
+
resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
|
2070
|
+
|
2071
|
+
}
|
2072
|
+
|
2073
|
+
export interface IndexedDBApi {
|
2074
|
+
/**
|
2075
|
+
* Clears all entries from an object store.
|
2076
|
+
*/
|
2077
|
+
clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest): Promise<void>;
|
2078
|
+
|
2079
|
+
/**
|
2080
|
+
* Deletes a database.
|
2081
|
+
*/
|
2082
|
+
deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest): Promise<void>;
|
2083
|
+
|
2084
|
+
/**
|
2085
|
+
* Delete a range of entries from an object store
|
2086
|
+
*/
|
2087
|
+
deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest): Promise<void>;
|
2088
|
+
|
2089
|
+
/**
|
2090
|
+
* Disables events from backend.
|
2091
|
+
*/
|
2092
|
+
disable(): Promise<void>;
|
2093
|
+
|
2094
|
+
/**
|
2095
|
+
* Enables events from backend.
|
2096
|
+
*/
|
2097
|
+
enable(): Promise<void>;
|
2098
|
+
|
2099
|
+
/**
|
2100
|
+
* Requests data from object store or index.
|
2101
|
+
*/
|
2102
|
+
requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
|
2103
|
+
|
2104
|
+
/**
|
2105
|
+
* Gets metadata of an object store.
|
2106
|
+
*/
|
2107
|
+
getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
|
2108
|
+
|
2109
|
+
/**
|
2110
|
+
* Requests database with given name in given frame.
|
2111
|
+
*/
|
2112
|
+
requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest): Promise<Protocol.IndexedDB.RequestDatabaseResponse>;
|
2113
|
+
|
2114
|
+
/**
|
2115
|
+
* Requests database names for given security origin.
|
2116
|
+
*/
|
2117
|
+
requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest): Promise<Protocol.IndexedDB.RequestDatabaseNamesResponse>;
|
2118
|
+
|
2119
|
+
}
|
2120
|
+
|
2121
|
+
export interface InputApi {
|
2122
|
+
/**
|
2123
|
+
* Dispatches a drag event into the page.
|
2124
|
+
*/
|
2125
|
+
dispatchDragEvent(params: Protocol.Input.DispatchDragEventRequest): Promise<void>;
|
2126
|
+
|
2127
|
+
/**
|
2128
|
+
* Dispatches a key event to the page.
|
2129
|
+
*/
|
2130
|
+
dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest): Promise<void>;
|
2131
|
+
|
2132
|
+
/**
|
2133
|
+
* This method emulates inserting text that doesn't come from a key press,
|
2134
|
+
* for example an emoji keyboard or an IME.
|
2135
|
+
*/
|
2136
|
+
insertText(params: Protocol.Input.InsertTextRequest): Promise<void>;
|
2137
|
+
|
2138
|
+
/**
|
2139
|
+
* This method sets the current candidate text for ime.
|
2140
|
+
* Use imeCommitComposition to commit the final text.
|
2141
|
+
* Use imeSetComposition with empty string as text to cancel composition.
|
2142
|
+
*/
|
2143
|
+
imeSetComposition(params: Protocol.Input.ImeSetCompositionRequest): Promise<void>;
|
2144
|
+
|
2145
|
+
/**
|
2146
|
+
* Dispatches a mouse event to the page.
|
2147
|
+
*/
|
2148
|
+
dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest): Promise<void>;
|
2149
|
+
|
2150
|
+
/**
|
2151
|
+
* Dispatches a touch event to the page.
|
2152
|
+
*/
|
2153
|
+
dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest): Promise<void>;
|
2154
|
+
|
2155
|
+
/**
|
2156
|
+
* Cancels any active dragging in the page.
|
2157
|
+
*/
|
2158
|
+
cancelDragging(): Promise<void>;
|
2159
|
+
|
2160
|
+
/**
|
2161
|
+
* Emulates touch event from the mouse event parameters.
|
2162
|
+
*/
|
2163
|
+
emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest): Promise<void>;
|
2164
|
+
|
2165
|
+
/**
|
2166
|
+
* Ignores input events (useful while auditing page).
|
2167
|
+
*/
|
2168
|
+
setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest): Promise<void>;
|
2169
|
+
|
2170
|
+
/**
|
2171
|
+
* Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
|
2172
|
+
* Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
|
2173
|
+
*/
|
2174
|
+
setInterceptDrags(params: Protocol.Input.SetInterceptDragsRequest): Promise<void>;
|
2175
|
+
|
2176
|
+
/**
|
2177
|
+
* Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
|
2178
|
+
*/
|
2179
|
+
synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest): Promise<void>;
|
2180
|
+
|
2181
|
+
/**
|
2182
|
+
* Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
|
2183
|
+
*/
|
2184
|
+
synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest): Promise<void>;
|
2185
|
+
|
2186
|
+
/**
|
2187
|
+
* Synthesizes a tap gesture over a time period by issuing appropriate touch events.
|
2188
|
+
*/
|
2189
|
+
synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest): Promise<void>;
|
2190
|
+
|
2191
|
+
/**
|
2192
|
+
* Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
|
2193
|
+
* restore normal drag and drop behavior.
|
2194
|
+
*/
|
2195
|
+
onDragIntercepted(listener: (params: Protocol.Input.DragInterceptedEvent) => void): void;
|
2196
|
+
offDragIntercepted(listener: (params: Protocol.Input.DragInterceptedEvent) => void): void;
|
2197
|
+
onceDragIntercepted(eventMatcher?: (params: Protocol.Input.DragInterceptedEvent) => boolean): void;
|
2198
|
+
|
2199
|
+
}
|
2200
|
+
|
2201
|
+
export interface InspectorApi {
|
2202
|
+
/**
|
2203
|
+
* Disables inspector domain notifications.
|
2204
|
+
*/
|
2205
|
+
disable(): Promise<void>;
|
2206
|
+
|
2207
|
+
/**
|
2208
|
+
* Enables inspector domain notifications.
|
2209
|
+
*/
|
2210
|
+
enable(): Promise<void>;
|
2211
|
+
|
2212
|
+
/**
|
2213
|
+
* Fired when remote debugging connection is about to be terminated. Contains detach reason.
|
2214
|
+
*/
|
2215
|
+
onDetached(listener: (params: Protocol.Inspector.DetachedEvent) => void): void;
|
2216
|
+
offDetached(listener: (params: Protocol.Inspector.DetachedEvent) => void): void;
|
2217
|
+
onceDetached(eventMatcher?: (params: Protocol.Inspector.DetachedEvent) => boolean): void;
|
2218
|
+
|
2219
|
+
/**
|
2220
|
+
* Fired when debugging target has crashed
|
2221
|
+
*/
|
2222
|
+
onTargetCrashed(listener: () => void): void;
|
2223
|
+
offTargetCrashed(listener: () => void): void;
|
2224
|
+
onceTargetCrashed(eventMatcher?: () => boolean): void;
|
2225
|
+
|
2226
|
+
/**
|
2227
|
+
* Fired when debugging target has reloaded after crash
|
2228
|
+
*/
|
2229
|
+
onTargetReloadedAfterCrash(listener: () => void): void;
|
2230
|
+
offTargetReloadedAfterCrash(listener: () => void): void;
|
2231
|
+
onceTargetReloadedAfterCrash(eventMatcher?: () => boolean): void;
|
2232
|
+
|
2233
|
+
}
|
2234
|
+
|
2235
|
+
export interface LayerTreeApi {
|
2236
|
+
/**
|
2237
|
+
* Provides the reasons why the given layer was composited.
|
2238
|
+
*/
|
2239
|
+
compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest): Promise<Protocol.LayerTree.CompositingReasonsResponse>;
|
2240
|
+
|
2241
|
+
/**
|
2242
|
+
* Disables compositing tree inspection.
|
2243
|
+
*/
|
2244
|
+
disable(): Promise<void>;
|
2245
|
+
|
2246
|
+
/**
|
2247
|
+
* Enables compositing tree inspection.
|
2248
|
+
*/
|
2249
|
+
enable(): Promise<void>;
|
2250
|
+
|
2251
|
+
/**
|
2252
|
+
* Returns the snapshot identifier.
|
2253
|
+
*/
|
2254
|
+
loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest): Promise<Protocol.LayerTree.LoadSnapshotResponse>;
|
2255
|
+
|
2256
|
+
/**
|
2257
|
+
* Returns the layer snapshot identifier.
|
2258
|
+
*/
|
2259
|
+
makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest): Promise<Protocol.LayerTree.MakeSnapshotResponse>;
|
2260
|
+
|
2261
|
+
profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest): Promise<Protocol.LayerTree.ProfileSnapshotResponse>;
|
2262
|
+
|
2263
|
+
/**
|
2264
|
+
* Releases layer snapshot captured by the back-end.
|
2265
|
+
*/
|
2266
|
+
releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest): Promise<void>;
|
2267
|
+
|
2268
|
+
/**
|
2269
|
+
* Replays the layer snapshot and returns the resulting bitmap.
|
2270
|
+
*/
|
2271
|
+
replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest): Promise<Protocol.LayerTree.ReplaySnapshotResponse>;
|
2272
|
+
|
2273
|
+
/**
|
2274
|
+
* Replays the layer snapshot and returns canvas log.
|
2275
|
+
*/
|
2276
|
+
snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest): Promise<Protocol.LayerTree.SnapshotCommandLogResponse>;
|
2277
|
+
|
2278
|
+
onLayerPainted(listener: (params: Protocol.LayerTree.LayerPaintedEvent) => void): void;
|
2279
|
+
offLayerPainted(listener: (params: Protocol.LayerTree.LayerPaintedEvent) => void): void;
|
2280
|
+
onceLayerPainted(eventMatcher?: (params: Protocol.LayerTree.LayerPaintedEvent) => boolean): void;
|
2281
|
+
|
2282
|
+
onLayerTreeDidChange(listener: (params: Protocol.LayerTree.LayerTreeDidChangeEvent) => void): void;
|
2283
|
+
offLayerTreeDidChange(listener: (params: Protocol.LayerTree.LayerTreeDidChangeEvent) => void): void;
|
2284
|
+
onceLayerTreeDidChange(eventMatcher?: (params: Protocol.LayerTree.LayerTreeDidChangeEvent) => boolean): void;
|
2285
|
+
|
2286
|
+
}
|
2287
|
+
|
2288
|
+
export interface LogApi {
|
2289
|
+
/**
|
2290
|
+
* Clears the log.
|
2291
|
+
*/
|
2292
|
+
clear(): Promise<void>;
|
2293
|
+
|
2294
|
+
/**
|
2295
|
+
* Disables log domain, prevents further log entries from being reported to the client.
|
2296
|
+
*/
|
2297
|
+
disable(): Promise<void>;
|
2298
|
+
|
2299
|
+
/**
|
2300
|
+
* Enables log domain, sends the entries collected so far to the client by means of the
|
2301
|
+
* `entryAdded` notification.
|
2302
|
+
*/
|
2303
|
+
enable(): Promise<void>;
|
2304
|
+
|
2305
|
+
/**
|
2306
|
+
* start violation reporting.
|
2307
|
+
*/
|
2308
|
+
startViolationsReport(params: Protocol.Log.StartViolationsReportRequest): Promise<void>;
|
2309
|
+
|
2310
|
+
/**
|
2311
|
+
* Stop violation reporting.
|
2312
|
+
*/
|
2313
|
+
stopViolationsReport(): Promise<void>;
|
2314
|
+
|
2315
|
+
/**
|
2316
|
+
* Issued when new message was logged.
|
2317
|
+
*/
|
2318
|
+
onEntryAdded(listener: (params: Protocol.Log.EntryAddedEvent) => void): void;
|
2319
|
+
offEntryAdded(listener: (params: Protocol.Log.EntryAddedEvent) => void): void;
|
2320
|
+
onceEntryAdded(eventMatcher?: (params: Protocol.Log.EntryAddedEvent) => boolean): void;
|
2321
|
+
|
2322
|
+
}
|
2323
|
+
|
2324
|
+
export interface MemoryApi {
|
2325
|
+
getDOMCounters(): Promise<Protocol.Memory.GetDOMCountersResponse>;
|
2326
|
+
|
2327
|
+
prepareForLeakDetection(): Promise<void>;
|
2328
|
+
|
2329
|
+
/**
|
2330
|
+
* Simulate OomIntervention by purging V8 memory.
|
2331
|
+
*/
|
2332
|
+
forciblyPurgeJavaScriptMemory(): Promise<void>;
|
2333
|
+
|
2334
|
+
/**
|
2335
|
+
* Enable/disable suppressing memory pressure notifications in all processes.
|
2336
|
+
*/
|
2337
|
+
setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest): Promise<void>;
|
2338
|
+
|
2339
|
+
/**
|
2340
|
+
* Simulate a memory pressure notification in all processes.
|
2341
|
+
*/
|
2342
|
+
simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest): Promise<void>;
|
2343
|
+
|
2344
|
+
/**
|
2345
|
+
* Start collecting native memory profile.
|
2346
|
+
*/
|
2347
|
+
startSampling(params: Protocol.Memory.StartSamplingRequest): Promise<void>;
|
2348
|
+
|
2349
|
+
/**
|
2350
|
+
* Stop collecting native memory profile.
|
2351
|
+
*/
|
2352
|
+
stopSampling(): Promise<void>;
|
2353
|
+
|
2354
|
+
/**
|
2355
|
+
* Retrieve native memory allocations profile
|
2356
|
+
* collected since renderer process startup.
|
2357
|
+
*/
|
2358
|
+
getAllTimeSamplingProfile(): Promise<Protocol.Memory.GetAllTimeSamplingProfileResponse>;
|
2359
|
+
|
2360
|
+
/**
|
2361
|
+
* Retrieve native memory allocations profile
|
2362
|
+
* collected since browser process startup.
|
2363
|
+
*/
|
2364
|
+
getBrowserSamplingProfile(): Promise<Protocol.Memory.GetBrowserSamplingProfileResponse>;
|
2365
|
+
|
2366
|
+
/**
|
2367
|
+
* Retrieve native memory allocations profile collected since last
|
2368
|
+
* `startSampling` call.
|
2369
|
+
*/
|
2370
|
+
getSamplingProfile(): Promise<Protocol.Memory.GetSamplingProfileResponse>;
|
2371
|
+
|
2372
|
+
}
|
2373
|
+
|
2374
|
+
export interface NetworkApi {
|
2375
|
+
/**
|
2376
|
+
* Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
|
2377
|
+
*/
|
2378
|
+
setAcceptedEncodings(params: Protocol.Network.SetAcceptedEncodingsRequest): Promise<void>;
|
2379
|
+
|
2380
|
+
/**
|
2381
|
+
* Clears accepted encodings set by setAcceptedEncodings
|
2382
|
+
*/
|
2383
|
+
clearAcceptedEncodingsOverride(): Promise<void>;
|
2384
|
+
|
2385
|
+
/**
|
2386
|
+
* Tells whether clearing browser cache is supported.
|
2387
|
+
*/
|
2388
|
+
canClearBrowserCache(): Promise<Protocol.Network.CanClearBrowserCacheResponse>;
|
2389
|
+
|
2390
|
+
/**
|
2391
|
+
* Tells whether clearing browser cookies is supported.
|
2392
|
+
*/
|
2393
|
+
canClearBrowserCookies(): Promise<Protocol.Network.CanClearBrowserCookiesResponse>;
|
2394
|
+
|
2395
|
+
/**
|
2396
|
+
* Tells whether emulation of network conditions is supported.
|
2397
|
+
*/
|
2398
|
+
canEmulateNetworkConditions(): Promise<Protocol.Network.CanEmulateNetworkConditionsResponse>;
|
2399
|
+
|
2400
|
+
/**
|
2401
|
+
* Clears browser cache.
|
2402
|
+
*/
|
2403
|
+
clearBrowserCache(): Promise<void>;
|
2404
|
+
|
2405
|
+
/**
|
2406
|
+
* Clears browser cookies.
|
2407
|
+
*/
|
2408
|
+
clearBrowserCookies(): Promise<void>;
|
2409
|
+
|
2410
|
+
/**
|
2411
|
+
* Response to Network.requestIntercepted which either modifies the request to continue with any
|
2412
|
+
* modifications, or blocks it, or completes it with the provided response bytes. If a network
|
2413
|
+
* fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
|
2414
|
+
* event will be sent with the same InterceptionId.
|
2415
|
+
* Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
|
2416
|
+
*/
|
2417
|
+
continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest): Promise<void>;
|
2418
|
+
|
2419
|
+
/**
|
2420
|
+
* Deletes browser cookies with matching name and url or domain/path pair.
|
2421
|
+
*/
|
2422
|
+
deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise<void>;
|
2423
|
+
|
2424
|
+
/**
|
2425
|
+
* Disables network tracking, prevents network events from being sent to the client.
|
2426
|
+
*/
|
2427
|
+
disable(): Promise<void>;
|
2428
|
+
|
2429
|
+
/**
|
2430
|
+
* Activates emulation of network conditions.
|
2431
|
+
*/
|
2432
|
+
emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise<void>;
|
2433
|
+
|
2434
|
+
/**
|
2435
|
+
* Enables network tracking, network events will now be delivered to the client.
|
2436
|
+
*/
|
2437
|
+
enable(params: Protocol.Network.EnableRequest): Promise<void>;
|
2438
|
+
|
2439
|
+
/**
|
2440
|
+
* Returns all browser cookies. Depending on the backend support, will return detailed cookie
|
2441
|
+
* information in the `cookies` field.
|
2442
|
+
* Deprecated. Use Storage.getCookies instead.
|
2443
|
+
*/
|
2444
|
+
getAllCookies(): Promise<Protocol.Network.GetAllCookiesResponse>;
|
2445
|
+
|
2446
|
+
/**
|
2447
|
+
* Returns the DER-encoded certificate.
|
2448
|
+
*/
|
2449
|
+
getCertificate(params: Protocol.Network.GetCertificateRequest): Promise<Protocol.Network.GetCertificateResponse>;
|
2450
|
+
|
2451
|
+
/**
|
2452
|
+
* Returns all browser cookies for the current URL. Depending on the backend support, will return
|
2453
|
+
* detailed cookie information in the `cookies` field.
|
2454
|
+
*/
|
2455
|
+
getCookies(params: Protocol.Network.GetCookiesRequest): Promise<Protocol.Network.GetCookiesResponse>;
|
2456
|
+
|
2457
|
+
/**
|
2458
|
+
* Returns content served for the given request.
|
2459
|
+
*/
|
2460
|
+
getResponseBody(params: Protocol.Network.GetResponseBodyRequest): Promise<Protocol.Network.GetResponseBodyResponse>;
|
2461
|
+
|
2462
|
+
/**
|
2463
|
+
* Returns post data sent with the request. Returns an error when no data was sent with the request.
|
2464
|
+
*/
|
2465
|
+
getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest): Promise<Protocol.Network.GetRequestPostDataResponse>;
|
2466
|
+
|
2467
|
+
/**
|
2468
|
+
* Returns content served for the given currently intercepted request.
|
2469
|
+
*/
|
2470
|
+
getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest): Promise<Protocol.Network.GetResponseBodyForInterceptionResponse>;
|
2471
|
+
|
2472
|
+
/**
|
2473
|
+
* Returns a handle to the stream representing the response body. Note that after this command,
|
2474
|
+
* the intercepted request can't be continued as is -- you either need to cancel it or to provide
|
2475
|
+
* the response body. The stream only supports sequential read, IO.read will fail if the position
|
2476
|
+
* is specified.
|
2477
|
+
*/
|
2478
|
+
takeResponseBodyForInterceptionAsStream(params: Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest): Promise<Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse>;
|
2479
|
+
|
2480
|
+
/**
|
2481
|
+
* This method sends a new XMLHttpRequest which is identical to the original one. The following
|
2482
|
+
* parameters should be identical: method, url, async, request body, extra headers, withCredentials
|
2483
|
+
* attribute, user, password.
|
2484
|
+
*/
|
2485
|
+
replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise<void>;
|
2486
|
+
|
2487
|
+
/**
|
2488
|
+
* Searches for given string in response content.
|
2489
|
+
*/
|
2490
|
+
searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest): Promise<Protocol.Network.SearchInResponseBodyResponse>;
|
2491
|
+
|
2492
|
+
/**
|
2493
|
+
* Blocks URLs from loading.
|
2494
|
+
*/
|
2495
|
+
setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise<void>;
|
2496
|
+
|
2497
|
+
/**
|
2498
|
+
* Toggles ignoring of service worker for each request.
|
2499
|
+
*/
|
2500
|
+
setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest): Promise<void>;
|
2501
|
+
|
2502
|
+
/**
|
2503
|
+
* Toggles ignoring cache for each request. If `true`, cache will not be used.
|
2504
|
+
*/
|
2505
|
+
setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest): Promise<void>;
|
2506
|
+
|
2507
|
+
/**
|
2508
|
+
* Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
|
2509
|
+
*/
|
2510
|
+
setCookie(params: Protocol.Network.SetCookieRequest): Promise<Protocol.Network.SetCookieResponse>;
|
2511
|
+
|
2512
|
+
/**
|
2513
|
+
* Sets given cookies.
|
2514
|
+
*/
|
2515
|
+
setCookies(params: Protocol.Network.SetCookiesRequest): Promise<void>;
|
2516
|
+
|
2517
|
+
/**
|
2518
|
+
* Specifies whether to always send extra HTTP headers with the requests from this page.
|
2519
|
+
*/
|
2520
|
+
setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest): Promise<void>;
|
2521
|
+
|
2522
|
+
/**
|
2523
|
+
* Specifies whether to attach a page script stack id in requests
|
2524
|
+
*/
|
2525
|
+
setAttachDebugStack(params: Protocol.Network.SetAttachDebugStackRequest): Promise<void>;
|
2526
|
+
|
2527
|
+
/**
|
2528
|
+
* Sets the requests to intercept that match the provided patterns and optionally resource types.
|
2529
|
+
* Deprecated, please use Fetch.enable instead.
|
2530
|
+
*/
|
2531
|
+
setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest): Promise<void>;
|
2532
|
+
|
2533
|
+
/**
|
2534
|
+
* Allows overriding user agent with the given string.
|
2535
|
+
*/
|
2536
|
+
setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest): Promise<void>;
|
2537
|
+
|
2538
|
+
/**
|
2539
|
+
* Enables streaming of the response for the given requestId.
|
2540
|
+
* If enabled, the dataReceived event contains the data that was received during streaming.
|
2541
|
+
*/
|
2542
|
+
streamResourceContent(params: Protocol.Network.StreamResourceContentRequest): Promise<Protocol.Network.StreamResourceContentResponse>;
|
2543
|
+
|
2544
|
+
/**
|
2545
|
+
* Returns information about the COEP/COOP isolation status.
|
2546
|
+
*/
|
2547
|
+
getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest): Promise<Protocol.Network.GetSecurityIsolationStatusResponse>;
|
2548
|
+
|
2549
|
+
/**
|
2550
|
+
* Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
|
2551
|
+
* Enabling triggers 'reportingApiReportAdded' for all existing reports.
|
2552
|
+
*/
|
2553
|
+
enableReportingApi(params: Protocol.Network.EnableReportingApiRequest): Promise<void>;
|
2554
|
+
|
2555
|
+
/**
|
2556
|
+
* Fetches the resource and returns the content.
|
2557
|
+
*/
|
2558
|
+
loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest): Promise<Protocol.Network.LoadNetworkResourceResponse>;
|
2559
|
+
|
2560
|
+
/**
|
2561
|
+
* Fired when data chunk was received over the network.
|
2562
|
+
*/
|
2563
|
+
onDataReceived(listener: (params: Protocol.Network.DataReceivedEvent) => void): void;
|
2564
|
+
offDataReceived(listener: (params: Protocol.Network.DataReceivedEvent) => void): void;
|
2565
|
+
onceDataReceived(eventMatcher?: (params: Protocol.Network.DataReceivedEvent) => boolean): void;
|
2566
|
+
|
2567
|
+
/**
|
2568
|
+
* Fired when EventSource message is received.
|
2569
|
+
*/
|
2570
|
+
onEventSourceMessageReceived(listener: (params: Protocol.Network.EventSourceMessageReceivedEvent) => void): void;
|
2571
|
+
offEventSourceMessageReceived(listener: (params: Protocol.Network.EventSourceMessageReceivedEvent) => void): void;
|
2572
|
+
onceEventSourceMessageReceived(eventMatcher?: (params: Protocol.Network.EventSourceMessageReceivedEvent) => boolean): void;
|
2573
|
+
|
2574
|
+
/**
|
2575
|
+
* Fired when HTTP request has failed to load.
|
2576
|
+
*/
|
2577
|
+
onLoadingFailed(listener: (params: Protocol.Network.LoadingFailedEvent) => void): void;
|
2578
|
+
offLoadingFailed(listener: (params: Protocol.Network.LoadingFailedEvent) => void): void;
|
2579
|
+
onceLoadingFailed(eventMatcher?: (params: Protocol.Network.LoadingFailedEvent) => boolean): void;
|
2580
|
+
|
2581
|
+
/**
|
2582
|
+
* Fired when HTTP request has finished loading.
|
2583
|
+
*/
|
2584
|
+
onLoadingFinished(listener: (params: Protocol.Network.LoadingFinishedEvent) => void): void;
|
2585
|
+
offLoadingFinished(listener: (params: Protocol.Network.LoadingFinishedEvent) => void): void;
|
2586
|
+
onceLoadingFinished(eventMatcher?: (params: Protocol.Network.LoadingFinishedEvent) => boolean): void;
|
2587
|
+
|
2588
|
+
/**
|
2589
|
+
* Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
|
2590
|
+
* mocked.
|
2591
|
+
* Deprecated, use Fetch.requestPaused instead.
|
2592
|
+
*/
|
2593
|
+
onRequestIntercepted(listener: (params: Protocol.Network.RequestInterceptedEvent) => void): void;
|
2594
|
+
offRequestIntercepted(listener: (params: Protocol.Network.RequestInterceptedEvent) => void): void;
|
2595
|
+
onceRequestIntercepted(eventMatcher?: (params: Protocol.Network.RequestInterceptedEvent) => boolean): void;
|
2596
|
+
|
2597
|
+
/**
|
2598
|
+
* Fired if request ended up loading from cache.
|
2599
|
+
*/
|
2600
|
+
onRequestServedFromCache(listener: (params: Protocol.Network.RequestServedFromCacheEvent) => void): void;
|
2601
|
+
offRequestServedFromCache(listener: (params: Protocol.Network.RequestServedFromCacheEvent) => void): void;
|
2602
|
+
onceRequestServedFromCache(eventMatcher?: (params: Protocol.Network.RequestServedFromCacheEvent) => boolean): void;
|
2603
|
+
|
2604
|
+
/**
|
2605
|
+
* Fired when page is about to send HTTP request.
|
2606
|
+
*/
|
2607
|
+
onRequestWillBeSent(listener: (params: Protocol.Network.RequestWillBeSentEvent) => void): void;
|
2608
|
+
offRequestWillBeSent(listener: (params: Protocol.Network.RequestWillBeSentEvent) => void): void;
|
2609
|
+
onceRequestWillBeSent(eventMatcher?: (params: Protocol.Network.RequestWillBeSentEvent) => boolean): void;
|
2610
|
+
|
2611
|
+
/**
|
2612
|
+
* Fired when resource loading priority is changed
|
2613
|
+
*/
|
2614
|
+
onResourceChangedPriority(listener: (params: Protocol.Network.ResourceChangedPriorityEvent) => void): void;
|
2615
|
+
offResourceChangedPriority(listener: (params: Protocol.Network.ResourceChangedPriorityEvent) => void): void;
|
2616
|
+
onceResourceChangedPriority(eventMatcher?: (params: Protocol.Network.ResourceChangedPriorityEvent) => boolean): void;
|
2617
|
+
|
2618
|
+
/**
|
2619
|
+
* Fired when a signed exchange was received over the network
|
2620
|
+
*/
|
2621
|
+
onSignedExchangeReceived(listener: (params: Protocol.Network.SignedExchangeReceivedEvent) => void): void;
|
2622
|
+
offSignedExchangeReceived(listener: (params: Protocol.Network.SignedExchangeReceivedEvent) => void): void;
|
2623
|
+
onceSignedExchangeReceived(eventMatcher?: (params: Protocol.Network.SignedExchangeReceivedEvent) => boolean): void;
|
2624
|
+
|
2625
|
+
/**
|
2626
|
+
* Fired when HTTP response is available.
|
2627
|
+
*/
|
2628
|
+
onResponseReceived(listener: (params: Protocol.Network.ResponseReceivedEvent) => void): void;
|
2629
|
+
offResponseReceived(listener: (params: Protocol.Network.ResponseReceivedEvent) => void): void;
|
2630
|
+
onceResponseReceived(eventMatcher?: (params: Protocol.Network.ResponseReceivedEvent) => boolean): void;
|
2631
|
+
|
2632
|
+
/**
|
2633
|
+
* Fired when WebSocket is closed.
|
2634
|
+
*/
|
2635
|
+
onWebSocketClosed(listener: (params: Protocol.Network.WebSocketClosedEvent) => void): void;
|
2636
|
+
offWebSocketClosed(listener: (params: Protocol.Network.WebSocketClosedEvent) => void): void;
|
2637
|
+
onceWebSocketClosed(eventMatcher?: (params: Protocol.Network.WebSocketClosedEvent) => boolean): void;
|
2638
|
+
|
2639
|
+
/**
|
2640
|
+
* Fired upon WebSocket creation.
|
2641
|
+
*/
|
2642
|
+
onWebSocketCreated(listener: (params: Protocol.Network.WebSocketCreatedEvent) => void): void;
|
2643
|
+
offWebSocketCreated(listener: (params: Protocol.Network.WebSocketCreatedEvent) => void): void;
|
2644
|
+
onceWebSocketCreated(eventMatcher?: (params: Protocol.Network.WebSocketCreatedEvent) => boolean): void;
|
2645
|
+
|
2646
|
+
/**
|
2647
|
+
* Fired when WebSocket message error occurs.
|
2648
|
+
*/
|
2649
|
+
onWebSocketFrameError(listener: (params: Protocol.Network.WebSocketFrameErrorEvent) => void): void;
|
2650
|
+
offWebSocketFrameError(listener: (params: Protocol.Network.WebSocketFrameErrorEvent) => void): void;
|
2651
|
+
onceWebSocketFrameError(eventMatcher?: (params: Protocol.Network.WebSocketFrameErrorEvent) => boolean): void;
|
2652
|
+
|
2653
|
+
/**
|
2654
|
+
* Fired when WebSocket message is received.
|
2655
|
+
*/
|
2656
|
+
onWebSocketFrameReceived(listener: (params: Protocol.Network.WebSocketFrameReceivedEvent) => void): void;
|
2657
|
+
offWebSocketFrameReceived(listener: (params: Protocol.Network.WebSocketFrameReceivedEvent) => void): void;
|
2658
|
+
onceWebSocketFrameReceived(eventMatcher?: (params: Protocol.Network.WebSocketFrameReceivedEvent) => boolean): void;
|
2659
|
+
|
2660
|
+
/**
|
2661
|
+
* Fired when WebSocket message is sent.
|
2662
|
+
*/
|
2663
|
+
onWebSocketFrameSent(listener: (params: Protocol.Network.WebSocketFrameSentEvent) => void): void;
|
2664
|
+
offWebSocketFrameSent(listener: (params: Protocol.Network.WebSocketFrameSentEvent) => void): void;
|
2665
|
+
onceWebSocketFrameSent(eventMatcher?: (params: Protocol.Network.WebSocketFrameSentEvent) => boolean): void;
|
2666
|
+
|
2667
|
+
/**
|
2668
|
+
* Fired when WebSocket handshake response becomes available.
|
2669
|
+
*/
|
2670
|
+
onWebSocketHandshakeResponseReceived(listener: (params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent) => void): void;
|
2671
|
+
offWebSocketHandshakeResponseReceived(listener: (params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent) => void): void;
|
2672
|
+
onceWebSocketHandshakeResponseReceived(eventMatcher?: (params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent) => boolean): void;
|
2673
|
+
|
2674
|
+
/**
|
2675
|
+
* Fired when WebSocket is about to initiate handshake.
|
2676
|
+
*/
|
2677
|
+
onWebSocketWillSendHandshakeRequest(listener: (params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent) => void): void;
|
2678
|
+
offWebSocketWillSendHandshakeRequest(listener: (params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent) => void): void;
|
2679
|
+
onceWebSocketWillSendHandshakeRequest(eventMatcher?: (params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent) => boolean): void;
|
2680
|
+
|
2681
|
+
/**
|
2682
|
+
* Fired upon WebTransport creation.
|
2683
|
+
*/
|
2684
|
+
onWebTransportCreated(listener: (params: Protocol.Network.WebTransportCreatedEvent) => void): void;
|
2685
|
+
offWebTransportCreated(listener: (params: Protocol.Network.WebTransportCreatedEvent) => void): void;
|
2686
|
+
onceWebTransportCreated(eventMatcher?: (params: Protocol.Network.WebTransportCreatedEvent) => boolean): void;
|
2687
|
+
|
2688
|
+
/**
|
2689
|
+
* Fired when WebTransport handshake is finished.
|
2690
|
+
*/
|
2691
|
+
onWebTransportConnectionEstablished(listener: (params: Protocol.Network.WebTransportConnectionEstablishedEvent) => void): void;
|
2692
|
+
offWebTransportConnectionEstablished(listener: (params: Protocol.Network.WebTransportConnectionEstablishedEvent) => void): void;
|
2693
|
+
onceWebTransportConnectionEstablished(eventMatcher?: (params: Protocol.Network.WebTransportConnectionEstablishedEvent) => boolean): void;
|
2694
|
+
|
2695
|
+
/**
|
2696
|
+
* Fired when WebTransport is disposed.
|
2697
|
+
*/
|
2698
|
+
onWebTransportClosed(listener: (params: Protocol.Network.WebTransportClosedEvent) => void): void;
|
2699
|
+
offWebTransportClosed(listener: (params: Protocol.Network.WebTransportClosedEvent) => void): void;
|
2700
|
+
onceWebTransportClosed(eventMatcher?: (params: Protocol.Network.WebTransportClosedEvent) => boolean): void;
|
2701
|
+
|
2702
|
+
/**
|
2703
|
+
* Fired when additional information about a requestWillBeSent event is available from the
|
2704
|
+
* network stack. Not every requestWillBeSent event will have an additional
|
2705
|
+
* requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
|
2706
|
+
* or requestWillBeSentExtraInfo will be fired first for the same request.
|
2707
|
+
*/
|
2708
|
+
onRequestWillBeSentExtraInfo(listener: (params: Protocol.Network.RequestWillBeSentExtraInfoEvent) => void): void;
|
2709
|
+
offRequestWillBeSentExtraInfo(listener: (params: Protocol.Network.RequestWillBeSentExtraInfoEvent) => void): void;
|
2710
|
+
onceRequestWillBeSentExtraInfo(eventMatcher?: (params: Protocol.Network.RequestWillBeSentExtraInfoEvent) => boolean): void;
|
2711
|
+
|
2712
|
+
/**
|
2713
|
+
* Fired when additional information about a responseReceived event is available from the network
|
2714
|
+
* stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
|
2715
|
+
* it, and responseReceivedExtraInfo may be fired before or after responseReceived.
|
2716
|
+
*/
|
2717
|
+
onResponseReceivedExtraInfo(listener: (params: Protocol.Network.ResponseReceivedExtraInfoEvent) => void): void;
|
2718
|
+
offResponseReceivedExtraInfo(listener: (params: Protocol.Network.ResponseReceivedExtraInfoEvent) => void): void;
|
2719
|
+
onceResponseReceivedExtraInfo(eventMatcher?: (params: Protocol.Network.ResponseReceivedExtraInfoEvent) => boolean): void;
|
2720
|
+
|
2721
|
+
/**
|
2722
|
+
* Fired exactly once for each Trust Token operation. Depending on
|
2723
|
+
* the type of the operation and whether the operation succeeded or
|
2724
|
+
* failed, the event is fired before the corresponding request was sent
|
2725
|
+
* or after the response was received.
|
2726
|
+
*/
|
2727
|
+
onTrustTokenOperationDone(listener: (params: Protocol.Network.TrustTokenOperationDoneEvent) => void): void;
|
2728
|
+
offTrustTokenOperationDone(listener: (params: Protocol.Network.TrustTokenOperationDoneEvent) => void): void;
|
2729
|
+
onceTrustTokenOperationDone(eventMatcher?: (params: Protocol.Network.TrustTokenOperationDoneEvent) => boolean): void;
|
2730
|
+
|
2731
|
+
/**
|
2732
|
+
* Fired once when parsing the .wbn file has succeeded.
|
2733
|
+
* The event contains the information about the web bundle contents.
|
2734
|
+
*/
|
2735
|
+
onSubresourceWebBundleMetadataReceived(listener: (params: Protocol.Network.SubresourceWebBundleMetadataReceivedEvent) => void): void;
|
2736
|
+
offSubresourceWebBundleMetadataReceived(listener: (params: Protocol.Network.SubresourceWebBundleMetadataReceivedEvent) => void): void;
|
2737
|
+
onceSubresourceWebBundleMetadataReceived(eventMatcher?: (params: Protocol.Network.SubresourceWebBundleMetadataReceivedEvent) => boolean): void;
|
2738
|
+
|
2739
|
+
/**
|
2740
|
+
* Fired once when parsing the .wbn file has failed.
|
2741
|
+
*/
|
2742
|
+
onSubresourceWebBundleMetadataError(listener: (params: Protocol.Network.SubresourceWebBundleMetadataErrorEvent) => void): void;
|
2743
|
+
offSubresourceWebBundleMetadataError(listener: (params: Protocol.Network.SubresourceWebBundleMetadataErrorEvent) => void): void;
|
2744
|
+
onceSubresourceWebBundleMetadataError(eventMatcher?: (params: Protocol.Network.SubresourceWebBundleMetadataErrorEvent) => boolean): void;
|
2745
|
+
|
2746
|
+
/**
|
2747
|
+
* Fired when handling requests for resources within a .wbn file.
|
2748
|
+
* Note: this will only be fired for resources that are requested by the webpage.
|
2749
|
+
*/
|
2750
|
+
onSubresourceWebBundleInnerResponseParsed(listener: (params: Protocol.Network.SubresourceWebBundleInnerResponseParsedEvent) => void): void;
|
2751
|
+
offSubresourceWebBundleInnerResponseParsed(listener: (params: Protocol.Network.SubresourceWebBundleInnerResponseParsedEvent) => void): void;
|
2752
|
+
onceSubresourceWebBundleInnerResponseParsed(eventMatcher?: (params: Protocol.Network.SubresourceWebBundleInnerResponseParsedEvent) => boolean): void;
|
2753
|
+
|
2754
|
+
/**
|
2755
|
+
* Fired when request for resources within a .wbn file failed.
|
2756
|
+
*/
|
2757
|
+
onSubresourceWebBundleInnerResponseError(listener: (params: Protocol.Network.SubresourceWebBundleInnerResponseErrorEvent) => void): void;
|
2758
|
+
offSubresourceWebBundleInnerResponseError(listener: (params: Protocol.Network.SubresourceWebBundleInnerResponseErrorEvent) => void): void;
|
2759
|
+
onceSubresourceWebBundleInnerResponseError(eventMatcher?: (params: Protocol.Network.SubresourceWebBundleInnerResponseErrorEvent) => boolean): void;
|
2760
|
+
|
2761
|
+
/**
|
2762
|
+
* Is sent whenever a new report is added.
|
2763
|
+
* And after 'enableReportingApi' for all existing reports.
|
2764
|
+
*/
|
2765
|
+
onReportingApiReportAdded(listener: (params: Protocol.Network.ReportingApiReportAddedEvent) => void): void;
|
2766
|
+
offReportingApiReportAdded(listener: (params: Protocol.Network.ReportingApiReportAddedEvent) => void): void;
|
2767
|
+
onceReportingApiReportAdded(eventMatcher?: (params: Protocol.Network.ReportingApiReportAddedEvent) => boolean): void;
|
2768
|
+
|
2769
|
+
onReportingApiReportUpdated(listener: (params: Protocol.Network.ReportingApiReportUpdatedEvent) => void): void;
|
2770
|
+
offReportingApiReportUpdated(listener: (params: Protocol.Network.ReportingApiReportUpdatedEvent) => void): void;
|
2771
|
+
onceReportingApiReportUpdated(eventMatcher?: (params: Protocol.Network.ReportingApiReportUpdatedEvent) => boolean): void;
|
2772
|
+
|
2773
|
+
onReportingApiEndpointsChangedForOrigin(listener: (params: Protocol.Network.ReportingApiEndpointsChangedForOriginEvent) => void): void;
|
2774
|
+
offReportingApiEndpointsChangedForOrigin(listener: (params: Protocol.Network.ReportingApiEndpointsChangedForOriginEvent) => void): void;
|
2775
|
+
onceReportingApiEndpointsChangedForOrigin(eventMatcher?: (params: Protocol.Network.ReportingApiEndpointsChangedForOriginEvent) => boolean): void;
|
2776
|
+
|
2777
|
+
}
|
2778
|
+
|
2779
|
+
export interface OverlayApi {
|
2780
|
+
/**
|
2781
|
+
* Disables domain notifications.
|
2782
|
+
*/
|
2783
|
+
disable(): Promise<void>;
|
2784
|
+
|
2785
|
+
/**
|
2786
|
+
* Enables domain notifications.
|
2787
|
+
*/
|
2788
|
+
enable(): Promise<void>;
|
2789
|
+
|
2790
|
+
/**
|
2791
|
+
* For testing.
|
2792
|
+
*/
|
2793
|
+
getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetHighlightObjectForTestResponse>;
|
2794
|
+
|
2795
|
+
/**
|
2796
|
+
* For Persistent Grid testing.
|
2797
|
+
*/
|
2798
|
+
getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest): Promise<Protocol.Overlay.GetGridHighlightObjectsForTestResponse>;
|
2799
|
+
|
2800
|
+
/**
|
2801
|
+
* For Source Order Viewer testing.
|
2802
|
+
*/
|
2803
|
+
getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest): Promise<Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse>;
|
2804
|
+
|
2805
|
+
/**
|
2806
|
+
* Hides any highlight.
|
2807
|
+
*/
|
2808
|
+
hideHighlight(): Promise<void>;
|
2809
|
+
|
2810
|
+
/**
|
2811
|
+
* Highlights owner element of the frame with given id.
|
2812
|
+
* Deprecated: Doesn't work reliablity and cannot be fixed due to process
|
2813
|
+
* separatation (the owner node might be in a different process). Determine
|
2814
|
+
* the owner node in the client and use highlightNode.
|
2815
|
+
*/
|
2816
|
+
highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise<void>;
|
2817
|
+
|
2818
|
+
/**
|
2819
|
+
* Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
|
2820
|
+
* objectId must be specified.
|
2821
|
+
*/
|
2822
|
+
highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise<void>;
|
2823
|
+
|
2824
|
+
/**
|
2825
|
+
* Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
|
2826
|
+
*/
|
2827
|
+
highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise<void>;
|
2828
|
+
|
2829
|
+
/**
|
2830
|
+
* Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
|
2831
|
+
*/
|
2832
|
+
highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<void>;
|
2833
|
+
|
2834
|
+
/**
|
2835
|
+
* Highlights the source order of the children of the DOM node with given id or with the given
|
2836
|
+
* JavaScript object wrapper. Either nodeId or objectId must be specified.
|
2837
|
+
*/
|
2838
|
+
highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest): Promise<void>;
|
2839
|
+
|
2840
|
+
/**
|
2841
|
+
* Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
|
2842
|
+
* Backend then generates 'inspectNodeRequested' event upon element selection.
|
2843
|
+
*/
|
2844
|
+
setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise<void>;
|
2845
|
+
|
2846
|
+
/**
|
2847
|
+
* Highlights owner element of all frames detected to be ads.
|
2848
|
+
*/
|
2849
|
+
setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest): Promise<void>;
|
2850
|
+
|
2851
|
+
setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest): Promise<void>;
|
2852
|
+
|
2853
|
+
/**
|
2854
|
+
* Requests that backend shows debug borders on layers
|
2855
|
+
*/
|
2856
|
+
setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest): Promise<void>;
|
2857
|
+
|
2858
|
+
/**
|
2859
|
+
* Requests that backend shows the FPS counter
|
2860
|
+
*/
|
2861
|
+
setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest): Promise<void>;
|
2862
|
+
|
2863
|
+
/**
|
2864
|
+
* Highlight multiple elements with the CSS Grid overlay.
|
2865
|
+
*/
|
2866
|
+
setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest): Promise<void>;
|
2867
|
+
|
2868
|
+
setShowFlexOverlays(params: Protocol.Overlay.SetShowFlexOverlaysRequest): Promise<void>;
|
2869
|
+
|
2870
|
+
setShowScrollSnapOverlays(params: Protocol.Overlay.SetShowScrollSnapOverlaysRequest): Promise<void>;
|
2871
|
+
|
2872
|
+
setShowContainerQueryOverlays(params: Protocol.Overlay.SetShowContainerQueryOverlaysRequest): Promise<void>;
|
2873
|
+
|
2874
|
+
/**
|
2875
|
+
* Requests that backend shows paint rectangles
|
2876
|
+
*/
|
2877
|
+
setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest): Promise<void>;
|
2878
|
+
|
2879
|
+
/**
|
2880
|
+
* Requests that backend shows layout shift regions
|
2881
|
+
*/
|
2882
|
+
setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest): Promise<void>;
|
2883
|
+
|
2884
|
+
/**
|
2885
|
+
* Requests that backend shows scroll bottleneck rects
|
2886
|
+
*/
|
2887
|
+
setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest): Promise<void>;
|
2888
|
+
|
2889
|
+
/**
|
2890
|
+
* Deprecated, no longer has any effect.
|
2891
|
+
*/
|
2892
|
+
setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest): Promise<void>;
|
2893
|
+
|
2894
|
+
/**
|
2895
|
+
* Request that backend shows an overlay with web vital metrics.
|
2896
|
+
*/
|
2897
|
+
setShowWebVitals(params: Protocol.Overlay.SetShowWebVitalsRequest): Promise<void>;
|
2898
|
+
|
2899
|
+
/**
|
2900
|
+
* Paints viewport size upon main frame resize.
|
2901
|
+
*/
|
2902
|
+
setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest): Promise<void>;
|
2903
|
+
|
2904
|
+
/**
|
2905
|
+
* Add a dual screen device hinge
|
2906
|
+
*/
|
2907
|
+
setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise<void>;
|
2908
|
+
|
2909
|
+
/**
|
2910
|
+
* Show elements in isolation mode with overlays.
|
2911
|
+
*/
|
2912
|
+
setShowIsolatedElements(params: Protocol.Overlay.SetShowIsolatedElementsRequest): Promise<void>;
|
2913
|
+
|
2914
|
+
/**
|
2915
|
+
* Show Window Controls Overlay for PWA
|
2916
|
+
*/
|
2917
|
+
setShowWindowControlsOverlay(params: Protocol.Overlay.SetShowWindowControlsOverlayRequest): Promise<void>;
|
2918
|
+
|
2919
|
+
/**
|
2920
|
+
* Fired when the node should be inspected. This happens after call to `setInspectMode` or when
|
2921
|
+
* user manually inspects an element.
|
2922
|
+
*/
|
2923
|
+
onInspectNodeRequested(listener: (params: Protocol.Overlay.InspectNodeRequestedEvent) => void): void;
|
2924
|
+
offInspectNodeRequested(listener: (params: Protocol.Overlay.InspectNodeRequestedEvent) => void): void;
|
2925
|
+
onceInspectNodeRequested(eventMatcher?: (params: Protocol.Overlay.InspectNodeRequestedEvent) => boolean): void;
|
2926
|
+
|
2927
|
+
/**
|
2928
|
+
* Fired when the node should be highlighted. This happens after call to `setInspectMode`.
|
2929
|
+
*/
|
2930
|
+
onNodeHighlightRequested(listener: (params: Protocol.Overlay.NodeHighlightRequestedEvent) => void): void;
|
2931
|
+
offNodeHighlightRequested(listener: (params: Protocol.Overlay.NodeHighlightRequestedEvent) => void): void;
|
2932
|
+
onceNodeHighlightRequested(eventMatcher?: (params: Protocol.Overlay.NodeHighlightRequestedEvent) => boolean): void;
|
2933
|
+
|
2934
|
+
/**
|
2935
|
+
* Fired when user asks to capture screenshot of some area on the page.
|
2936
|
+
*/
|
2937
|
+
onScreenshotRequested(listener: (params: Protocol.Overlay.ScreenshotRequestedEvent) => void): void;
|
2938
|
+
offScreenshotRequested(listener: (params: Protocol.Overlay.ScreenshotRequestedEvent) => void): void;
|
2939
|
+
onceScreenshotRequested(eventMatcher?: (params: Protocol.Overlay.ScreenshotRequestedEvent) => boolean): void;
|
2940
|
+
|
2941
|
+
/**
|
2942
|
+
* Fired when user cancels the inspect mode.
|
2943
|
+
*/
|
2944
|
+
onInspectModeCanceled(listener: () => void): void;
|
2945
|
+
offInspectModeCanceled(listener: () => void): void;
|
2946
|
+
onceInspectModeCanceled(eventMatcher?: () => boolean): void;
|
2947
|
+
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
export interface PageApi {
|
2951
|
+
/**
|
2952
|
+
* Deprecated, please use addScriptToEvaluateOnNewDocument instead.
|
2953
|
+
*/
|
2954
|
+
addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest): Promise<Protocol.Page.AddScriptToEvaluateOnLoadResponse>;
|
2955
|
+
|
2956
|
+
/**
|
2957
|
+
* Evaluates given script in every frame upon creation (before loading frame's scripts).
|
2958
|
+
*/
|
2959
|
+
addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest): Promise<Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse>;
|
2960
|
+
|
2961
|
+
/**
|
2962
|
+
* Brings page to front (activates tab).
|
2963
|
+
*/
|
2964
|
+
bringToFront(): Promise<void>;
|
2965
|
+
|
2966
|
+
/**
|
2967
|
+
* Capture page screenshot.
|
2968
|
+
*/
|
2969
|
+
captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest): Promise<Protocol.Page.CaptureScreenshotResponse>;
|
2970
|
+
|
2971
|
+
/**
|
2972
|
+
* Returns a snapshot of the page as a string. For MHTML format, the serialization includes
|
2973
|
+
* iframes, shadow DOM, external resources, and element-inline styles.
|
2974
|
+
*/
|
2975
|
+
captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest): Promise<Protocol.Page.CaptureSnapshotResponse>;
|
2976
|
+
|
2977
|
+
/**
|
2978
|
+
* Clears the overridden device metrics.
|
2979
|
+
*/
|
2980
|
+
clearDeviceMetricsOverride(): Promise<void>;
|
2981
|
+
|
2982
|
+
/**
|
2983
|
+
* Clears the overridden Device Orientation.
|
2984
|
+
*/
|
2985
|
+
clearDeviceOrientationOverride(): Promise<void>;
|
2986
|
+
|
2987
|
+
/**
|
2988
|
+
* Clears the overridden Geolocation Position and Error.
|
2989
|
+
*/
|
2990
|
+
clearGeolocationOverride(): Promise<void>;
|
2991
|
+
|
2992
|
+
/**
|
2993
|
+
* Creates an isolated world for the given frame.
|
2994
|
+
*/
|
2995
|
+
createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest): Promise<Protocol.Page.CreateIsolatedWorldResponse>;
|
2996
|
+
|
2997
|
+
/**
|
2998
|
+
* Deletes browser cookie with given name, domain and path.
|
2999
|
+
*/
|
3000
|
+
deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise<void>;
|
3001
|
+
|
3002
|
+
/**
|
3003
|
+
* Disables page domain notifications.
|
3004
|
+
*/
|
3005
|
+
disable(): Promise<void>;
|
3006
|
+
|
3007
|
+
/**
|
3008
|
+
* Enables page domain notifications.
|
3009
|
+
*/
|
3010
|
+
enable(): Promise<void>;
|
3011
|
+
|
3012
|
+
getAppManifest(): Promise<Protocol.Page.GetAppManifestResponse>;
|
3013
|
+
|
3014
|
+
getInstallabilityErrors(): Promise<Protocol.Page.GetInstallabilityErrorsResponse>;
|
3015
|
+
|
3016
|
+
/**
|
3017
|
+
* Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
|
3018
|
+
*/
|
3019
|
+
getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
|
3020
|
+
|
3021
|
+
/**
|
3022
|
+
* Returns the unique (PWA) app id.
|
3023
|
+
* Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
|
3024
|
+
*/
|
3025
|
+
getAppId(): Promise<Protocol.Page.GetAppIdResponse>;
|
3026
|
+
|
3027
|
+
getAdScriptId(params: Protocol.Page.GetAdScriptIdRequest): Promise<Protocol.Page.GetAdScriptIdResponse>;
|
3028
|
+
|
3029
|
+
/**
|
3030
|
+
* Returns present frame tree structure.
|
3031
|
+
*/
|
3032
|
+
getFrameTree(): Promise<Protocol.Page.GetFrameTreeResponse>;
|
3033
|
+
|
3034
|
+
/**
|
3035
|
+
* Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
|
3036
|
+
*/
|
3037
|
+
getLayoutMetrics(): Promise<Protocol.Page.GetLayoutMetricsResponse>;
|
3038
|
+
|
3039
|
+
/**
|
3040
|
+
* Returns navigation history for the current page.
|
3041
|
+
*/
|
3042
|
+
getNavigationHistory(): Promise<Protocol.Page.GetNavigationHistoryResponse>;
|
3043
|
+
|
3044
|
+
/**
|
3045
|
+
* Resets navigation history for the current page.
|
3046
|
+
*/
|
3047
|
+
resetNavigationHistory(): Promise<void>;
|
3048
|
+
|
3049
|
+
/**
|
3050
|
+
* Returns content of the given resource.
|
3051
|
+
*/
|
3052
|
+
getResourceContent(params: Protocol.Page.GetResourceContentRequest): Promise<Protocol.Page.GetResourceContentResponse>;
|
3053
|
+
|
3054
|
+
/**
|
3055
|
+
* Returns present frame / resource tree structure.
|
3056
|
+
*/
|
3057
|
+
getResourceTree(): Promise<Protocol.Page.GetResourceTreeResponse>;
|
3058
|
+
|
3059
|
+
/**
|
3060
|
+
* Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
|
3061
|
+
*/
|
3062
|
+
handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest): Promise<void>;
|
3063
|
+
|
3064
|
+
/**
|
3065
|
+
* Navigates current page to the given URL.
|
3066
|
+
*/
|
3067
|
+
navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;
|
3068
|
+
|
3069
|
+
/**
|
3070
|
+
* Navigates current page to the given history entry.
|
3071
|
+
*/
|
3072
|
+
navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest): Promise<void>;
|
3073
|
+
|
3074
|
+
/**
|
3075
|
+
* Print page as PDF.
|
3076
|
+
*/
|
3077
|
+
printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise<Protocol.Page.PrintToPDFResponse>;
|
3078
|
+
|
3079
|
+
/**
|
3080
|
+
* Reloads given page optionally ignoring the cache.
|
3081
|
+
*/
|
3082
|
+
reload(params: Protocol.Page.ReloadRequest): Promise<void>;
|
3083
|
+
|
3084
|
+
/**
|
3085
|
+
* Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
|
3086
|
+
*/
|
3087
|
+
removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest): Promise<void>;
|
3088
|
+
|
3089
|
+
/**
|
3090
|
+
* Removes given script from the list.
|
3091
|
+
*/
|
3092
|
+
removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest): Promise<void>;
|
3093
|
+
|
3094
|
+
/**
|
3095
|
+
* Acknowledges that a screencast frame has been received by the frontend.
|
3096
|
+
*/
|
3097
|
+
screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest): Promise<void>;
|
3098
|
+
|
3099
|
+
/**
|
3100
|
+
* Searches for given string in resource content.
|
3101
|
+
*/
|
3102
|
+
searchInResource(params: Protocol.Page.SearchInResourceRequest): Promise<Protocol.Page.SearchInResourceResponse>;
|
3103
|
+
|
3104
|
+
/**
|
3105
|
+
* Enable Chrome's experimental ad filter on all sites.
|
3106
|
+
*/
|
3107
|
+
setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest): Promise<void>;
|
3108
|
+
|
3109
|
+
/**
|
3110
|
+
* Enable page Content Security Policy by-passing.
|
3111
|
+
*/
|
3112
|
+
setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise<void>;
|
3113
|
+
|
3114
|
+
/**
|
3115
|
+
* Get Permissions Policy state on given frame.
|
3116
|
+
*/
|
3117
|
+
getPermissionsPolicyState(params: Protocol.Page.GetPermissionsPolicyStateRequest): Promise<Protocol.Page.GetPermissionsPolicyStateResponse>;
|
3118
|
+
|
3119
|
+
/**
|
3120
|
+
* Get Origin Trials on given frame.
|
3121
|
+
*/
|
3122
|
+
getOriginTrials(params: Protocol.Page.GetOriginTrialsRequest): Promise<Protocol.Page.GetOriginTrialsResponse>;
|
3123
|
+
|
3124
|
+
/**
|
3125
|
+
* Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
|
3126
|
+
* window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
|
3127
|
+
* query results).
|
3128
|
+
*/
|
3129
|
+
setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest): Promise<void>;
|
3130
|
+
|
3131
|
+
/**
|
3132
|
+
* Overrides the Device Orientation.
|
3133
|
+
*/
|
3134
|
+
setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest): Promise<void>;
|
3135
|
+
|
3136
|
+
/**
|
3137
|
+
* Set generic font families.
|
3138
|
+
*/
|
3139
|
+
setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise<void>;
|
3140
|
+
|
3141
|
+
/**
|
3142
|
+
* Set default font sizes.
|
3143
|
+
*/
|
3144
|
+
setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise<void>;
|
3145
|
+
|
3146
|
+
/**
|
3147
|
+
* Sets given markup as the document's HTML.
|
3148
|
+
*/
|
3149
|
+
setDocumentContent(params: Protocol.Page.SetDocumentContentRequest): Promise<void>;
|
3150
|
+
|
3151
|
+
/**
|
3152
|
+
* Set the behavior when downloading a file.
|
3153
|
+
*/
|
3154
|
+
setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest): Promise<void>;
|
3155
|
+
|
3156
|
+
/**
|
3157
|
+
* Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
|
3158
|
+
* unavailable.
|
3159
|
+
*/
|
3160
|
+
setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest): Promise<void>;
|
3161
|
+
|
3162
|
+
/**
|
3163
|
+
* Controls whether page will emit lifecycle events.
|
3164
|
+
*/
|
3165
|
+
setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest): Promise<void>;
|
3166
|
+
|
3167
|
+
/**
|
3168
|
+
* Toggles mouse event-based touch event emulation.
|
3169
|
+
*/
|
3170
|
+
setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest): Promise<void>;
|
3171
|
+
|
3172
|
+
/**
|
3173
|
+
* Starts sending each frame using the `screencastFrame` event.
|
3174
|
+
*/
|
3175
|
+
startScreencast(params: Protocol.Page.StartScreencastRequest): Promise<void>;
|
3176
|
+
|
3177
|
+
/**
|
3178
|
+
* Force the page stop all navigations and pending resource fetches.
|
3179
|
+
*/
|
3180
|
+
stopLoading(): Promise<void>;
|
3181
|
+
|
3182
|
+
/**
|
3183
|
+
* Crashes renderer on the IO thread, generates minidumps.
|
3184
|
+
*/
|
3185
|
+
crash(): Promise<void>;
|
3186
|
+
|
3187
|
+
/**
|
3188
|
+
* Tries to close page, running its beforeunload hooks, if any.
|
3189
|
+
*/
|
3190
|
+
close(): Promise<void>;
|
3191
|
+
|
3192
|
+
/**
|
3193
|
+
* Tries to update the web lifecycle state of the page.
|
3194
|
+
* It will transition the page to the given state according to:
|
3195
|
+
* https://github.com/WICG/web-lifecycle/
|
3196
|
+
*/
|
3197
|
+
setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest): Promise<void>;
|
3198
|
+
|
3199
|
+
/**
|
3200
|
+
* Stops sending each frame in the `screencastFrame`.
|
3201
|
+
*/
|
3202
|
+
stopScreencast(): Promise<void>;
|
3203
|
+
|
3204
|
+
/**
|
3205
|
+
* Requests backend to produce compilation cache for the specified scripts.
|
3206
|
+
* `scripts` are appeneded to the list of scripts for which the cache
|
3207
|
+
* would be produced. The list may be reset during page navigation.
|
3208
|
+
* When script with a matching URL is encountered, the cache is optionally
|
3209
|
+
* produced upon backend discretion, based on internal heuristics.
|
3210
|
+
* See also: `Page.compilationCacheProduced`.
|
3211
|
+
*/
|
3212
|
+
produceCompilationCache(params: Protocol.Page.ProduceCompilationCacheRequest): Promise<void>;
|
3213
|
+
|
3214
|
+
/**
|
3215
|
+
* Seeds compilation cache for given url. Compilation cache does not survive
|
3216
|
+
* cross-process navigation.
|
3217
|
+
*/
|
3218
|
+
addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest): Promise<void>;
|
3219
|
+
|
3220
|
+
/**
|
3221
|
+
* Clears seeded compilation cache.
|
3222
|
+
*/
|
3223
|
+
clearCompilationCache(): Promise<void>;
|
3224
|
+
|
3225
|
+
/**
|
3226
|
+
* Sets the Secure Payment Confirmation transaction mode.
|
3227
|
+
* https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
|
3228
|
+
*/
|
3229
|
+
setSPCTransactionMode(params: Protocol.Page.SetSPCTransactionModeRequest): Promise<void>;
|
3230
|
+
|
3231
|
+
/**
|
3232
|
+
* Extensions for Custom Handlers API:
|
3233
|
+
* https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
|
3234
|
+
*/
|
3235
|
+
setRPHRegistrationMode(params: Protocol.Page.SetRPHRegistrationModeRequest): Promise<void>;
|
3236
|
+
|
3237
|
+
/**
|
3238
|
+
* Generates a report for testing.
|
3239
|
+
*/
|
3240
|
+
generateTestReport(params: Protocol.Page.GenerateTestReportRequest): Promise<void>;
|
3241
|
+
|
3242
|
+
/**
|
3243
|
+
* Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
|
3244
|
+
*/
|
3245
|
+
waitForDebugger(): Promise<void>;
|
3246
|
+
|
3247
|
+
/**
|
3248
|
+
* Intercept file chooser requests and transfer control to protocol clients.
|
3249
|
+
* When file chooser interception is enabled, native file chooser dialog is not shown.
|
3250
|
+
* Instead, a protocol event `Page.fileChooserOpened` is emitted.
|
3251
|
+
*/
|
3252
|
+
setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest): Promise<void>;
|
3253
|
+
|
3254
|
+
/**
|
3255
|
+
* Enable/disable prerendering manually.
|
3256
|
+
*
|
3257
|
+
* This command is a short-term solution for https://crbug.com/1440085.
|
3258
|
+
* See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
|
3259
|
+
* for more details.
|
3260
|
+
*
|
3261
|
+
* TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
|
3262
|
+
*/
|
3263
|
+
setPrerenderingAllowed(params: Protocol.Page.SetPrerenderingAllowedRequest): Promise<void>;
|
3264
|
+
|
3265
|
+
onDomContentEventFired(listener: (params: Protocol.Page.DomContentEventFiredEvent) => void): void;
|
3266
|
+
offDomContentEventFired(listener: (params: Protocol.Page.DomContentEventFiredEvent) => void): void;
|
3267
|
+
onceDomContentEventFired(eventMatcher?: (params: Protocol.Page.DomContentEventFiredEvent) => boolean): void;
|
3268
|
+
|
3269
|
+
/**
|
3270
|
+
* Emitted only when `page.interceptFileChooser` is enabled.
|
3271
|
+
*/
|
3272
|
+
onFileChooserOpened(listener: (params: Protocol.Page.FileChooserOpenedEvent) => void): void;
|
3273
|
+
offFileChooserOpened(listener: (params: Protocol.Page.FileChooserOpenedEvent) => void): void;
|
3274
|
+
onceFileChooserOpened(eventMatcher?: (params: Protocol.Page.FileChooserOpenedEvent) => boolean): void;
|
3275
|
+
|
3276
|
+
/**
|
3277
|
+
* Fired when frame has been attached to its parent.
|
3278
|
+
*/
|
3279
|
+
onFrameAttached(listener: (params: Protocol.Page.FrameAttachedEvent) => void): void;
|
3280
|
+
offFrameAttached(listener: (params: Protocol.Page.FrameAttachedEvent) => void): void;
|
3281
|
+
onceFrameAttached(eventMatcher?: (params: Protocol.Page.FrameAttachedEvent) => boolean): void;
|
3282
|
+
|
3283
|
+
/**
|
3284
|
+
* Fired when frame no longer has a scheduled navigation.
|
3285
|
+
*/
|
3286
|
+
onFrameClearedScheduledNavigation(listener: (params: Protocol.Page.FrameClearedScheduledNavigationEvent) => void): void;
|
3287
|
+
offFrameClearedScheduledNavigation(listener: (params: Protocol.Page.FrameClearedScheduledNavigationEvent) => void): void;
|
3288
|
+
onceFrameClearedScheduledNavigation(eventMatcher?: (params: Protocol.Page.FrameClearedScheduledNavigationEvent) => boolean): void;
|
3289
|
+
|
3290
|
+
/**
|
3291
|
+
* Fired when frame has been detached from its parent.
|
3292
|
+
*/
|
3293
|
+
onFrameDetached(listener: (params: Protocol.Page.FrameDetachedEvent) => void): void;
|
3294
|
+
offFrameDetached(listener: (params: Protocol.Page.FrameDetachedEvent) => void): void;
|
3295
|
+
onceFrameDetached(eventMatcher?: (params: Protocol.Page.FrameDetachedEvent) => boolean): void;
|
3296
|
+
|
3297
|
+
/**
|
3298
|
+
* Fired once navigation of the frame has completed. Frame is now associated with the new loader.
|
3299
|
+
*/
|
3300
|
+
onFrameNavigated(listener: (params: Protocol.Page.FrameNavigatedEvent) => void): void;
|
3301
|
+
offFrameNavigated(listener: (params: Protocol.Page.FrameNavigatedEvent) => void): void;
|
3302
|
+
onceFrameNavigated(eventMatcher?: (params: Protocol.Page.FrameNavigatedEvent) => boolean): void;
|
3303
|
+
|
3304
|
+
/**
|
3305
|
+
* Fired when opening document to write to.
|
3306
|
+
*/
|
3307
|
+
onDocumentOpened(listener: (params: Protocol.Page.DocumentOpenedEvent) => void): void;
|
3308
|
+
offDocumentOpened(listener: (params: Protocol.Page.DocumentOpenedEvent) => void): void;
|
3309
|
+
onceDocumentOpened(eventMatcher?: (params: Protocol.Page.DocumentOpenedEvent) => boolean): void;
|
3310
|
+
|
3311
|
+
onFrameResized(listener: () => void): void;
|
3312
|
+
offFrameResized(listener: () => void): void;
|
3313
|
+
onceFrameResized(eventMatcher?: () => boolean): void;
|
3314
|
+
|
3315
|
+
/**
|
3316
|
+
* Fired when a renderer-initiated navigation is requested.
|
3317
|
+
* Navigation may still be cancelled after the event is issued.
|
3318
|
+
*/
|
3319
|
+
onFrameRequestedNavigation(listener: (params: Protocol.Page.FrameRequestedNavigationEvent) => void): void;
|
3320
|
+
offFrameRequestedNavigation(listener: (params: Protocol.Page.FrameRequestedNavigationEvent) => void): void;
|
3321
|
+
onceFrameRequestedNavigation(eventMatcher?: (params: Protocol.Page.FrameRequestedNavigationEvent) => boolean): void;
|
3322
|
+
|
3323
|
+
/**
|
3324
|
+
* Fired when frame schedules a potential navigation.
|
3325
|
+
*/
|
3326
|
+
onFrameScheduledNavigation(listener: (params: Protocol.Page.FrameScheduledNavigationEvent) => void): void;
|
3327
|
+
offFrameScheduledNavigation(listener: (params: Protocol.Page.FrameScheduledNavigationEvent) => void): void;
|
3328
|
+
onceFrameScheduledNavigation(eventMatcher?: (params: Protocol.Page.FrameScheduledNavigationEvent) => boolean): void;
|
3329
|
+
|
3330
|
+
/**
|
3331
|
+
* Fired when frame has started loading.
|
3332
|
+
*/
|
3333
|
+
onFrameStartedLoading(listener: (params: Protocol.Page.FrameStartedLoadingEvent) => void): void;
|
3334
|
+
offFrameStartedLoading(listener: (params: Protocol.Page.FrameStartedLoadingEvent) => void): void;
|
3335
|
+
onceFrameStartedLoading(eventMatcher?: (params: Protocol.Page.FrameStartedLoadingEvent) => boolean): void;
|
3336
|
+
|
3337
|
+
/**
|
3338
|
+
* Fired when frame has stopped loading.
|
3339
|
+
*/
|
3340
|
+
onFrameStoppedLoading(listener: (params: Protocol.Page.FrameStoppedLoadingEvent) => void): void;
|
3341
|
+
offFrameStoppedLoading(listener: (params: Protocol.Page.FrameStoppedLoadingEvent) => void): void;
|
3342
|
+
onceFrameStoppedLoading(eventMatcher?: (params: Protocol.Page.FrameStoppedLoadingEvent) => boolean): void;
|
3343
|
+
|
3344
|
+
/**
|
3345
|
+
* Fired when page is about to start a download.
|
3346
|
+
* Deprecated. Use Browser.downloadWillBegin instead.
|
3347
|
+
*/
|
3348
|
+
onDownloadWillBegin(listener: (params: Protocol.Page.DownloadWillBeginEvent) => void): void;
|
3349
|
+
offDownloadWillBegin(listener: (params: Protocol.Page.DownloadWillBeginEvent) => void): void;
|
3350
|
+
onceDownloadWillBegin(eventMatcher?: (params: Protocol.Page.DownloadWillBeginEvent) => boolean): void;
|
3351
|
+
|
3352
|
+
/**
|
3353
|
+
* Fired when download makes progress. Last call has |done| == true.
|
3354
|
+
* Deprecated. Use Browser.downloadProgress instead.
|
3355
|
+
*/
|
3356
|
+
onDownloadProgress(listener: (params: Protocol.Page.DownloadProgressEvent) => void): void;
|
3357
|
+
offDownloadProgress(listener: (params: Protocol.Page.DownloadProgressEvent) => void): void;
|
3358
|
+
onceDownloadProgress(eventMatcher?: (params: Protocol.Page.DownloadProgressEvent) => boolean): void;
|
3359
|
+
|
3360
|
+
/**
|
3361
|
+
* Fired when interstitial page was hidden
|
3362
|
+
*/
|
3363
|
+
onInterstitialHidden(listener: () => void): void;
|
3364
|
+
offInterstitialHidden(listener: () => void): void;
|
3365
|
+
onceInterstitialHidden(eventMatcher?: () => boolean): void;
|
3366
|
+
|
3367
|
+
/**
|
3368
|
+
* Fired when interstitial page was shown
|
3369
|
+
*/
|
3370
|
+
onInterstitialShown(listener: () => void): void;
|
3371
|
+
offInterstitialShown(listener: () => void): void;
|
3372
|
+
onceInterstitialShown(eventMatcher?: () => boolean): void;
|
3373
|
+
|
3374
|
+
/**
|
3375
|
+
* Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
|
3376
|
+
* closed.
|
3377
|
+
*/
|
3378
|
+
onJavascriptDialogClosed(listener: (params: Protocol.Page.JavascriptDialogClosedEvent) => void): void;
|
3379
|
+
offJavascriptDialogClosed(listener: (params: Protocol.Page.JavascriptDialogClosedEvent) => void): void;
|
3380
|
+
onceJavascriptDialogClosed(eventMatcher?: (params: Protocol.Page.JavascriptDialogClosedEvent) => boolean): void;
|
3381
|
+
|
3382
|
+
/**
|
3383
|
+
* Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
|
3384
|
+
* open.
|
3385
|
+
*/
|
3386
|
+
onJavascriptDialogOpening(listener: (params: Protocol.Page.JavascriptDialogOpeningEvent) => void): void;
|
3387
|
+
offJavascriptDialogOpening(listener: (params: Protocol.Page.JavascriptDialogOpeningEvent) => void): void;
|
3388
|
+
onceJavascriptDialogOpening(eventMatcher?: (params: Protocol.Page.JavascriptDialogOpeningEvent) => boolean): void;
|
3389
|
+
|
3390
|
+
/**
|
3391
|
+
* Fired for top level page lifecycle events such as navigation, load, paint, etc.
|
3392
|
+
*/
|
3393
|
+
onLifecycleEvent(listener: (params: Protocol.Page.LifecycleEventEvent) => void): void;
|
3394
|
+
offLifecycleEvent(listener: (params: Protocol.Page.LifecycleEventEvent) => void): void;
|
3395
|
+
onceLifecycleEvent(eventMatcher?: (params: Protocol.Page.LifecycleEventEvent) => boolean): void;
|
3396
|
+
|
3397
|
+
/**
|
3398
|
+
* Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
|
3399
|
+
* not assume any ordering with the Page.frameNavigated event. This event is fired only for
|
3400
|
+
* main-frame history navigation where the document changes (non-same-document navigations),
|
3401
|
+
* when bfcache navigation fails.
|
3402
|
+
*/
|
3403
|
+
onBackForwardCacheNotUsed(listener: (params: Protocol.Page.BackForwardCacheNotUsedEvent) => void): void;
|
3404
|
+
offBackForwardCacheNotUsed(listener: (params: Protocol.Page.BackForwardCacheNotUsedEvent) => void): void;
|
3405
|
+
onceBackForwardCacheNotUsed(eventMatcher?: (params: Protocol.Page.BackForwardCacheNotUsedEvent) => boolean): void;
|
3406
|
+
|
3407
|
+
onLoadEventFired(listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
|
3408
|
+
offLoadEventFired(listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
|
3409
|
+
onceLoadEventFired(eventMatcher?: (params: Protocol.Page.LoadEventFiredEvent) => boolean): void;
|
3410
|
+
|
3411
|
+
/**
|
3412
|
+
* Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
|
3413
|
+
*/
|
3414
|
+
onNavigatedWithinDocument(listener: (params: Protocol.Page.NavigatedWithinDocumentEvent) => void): void;
|
3415
|
+
offNavigatedWithinDocument(listener: (params: Protocol.Page.NavigatedWithinDocumentEvent) => void): void;
|
3416
|
+
onceNavigatedWithinDocument(eventMatcher?: (params: Protocol.Page.NavigatedWithinDocumentEvent) => boolean): void;
|
3417
|
+
|
3418
|
+
/**
|
3419
|
+
* Compressed image data requested by the `startScreencast`.
|
3420
|
+
*/
|
3421
|
+
onScreencastFrame(listener: (params: Protocol.Page.ScreencastFrameEvent) => void): void;
|
3422
|
+
offScreencastFrame(listener: (params: Protocol.Page.ScreencastFrameEvent) => void): void;
|
3423
|
+
onceScreencastFrame(eventMatcher?: (params: Protocol.Page.ScreencastFrameEvent) => boolean): void;
|
3424
|
+
|
3425
|
+
/**
|
3426
|
+
* Fired when the page with currently enabled screencast was shown or hidden `.
|
3427
|
+
*/
|
3428
|
+
onScreencastVisibilityChanged(listener: (params: Protocol.Page.ScreencastVisibilityChangedEvent) => void): void;
|
3429
|
+
offScreencastVisibilityChanged(listener: (params: Protocol.Page.ScreencastVisibilityChangedEvent) => void): void;
|
3430
|
+
onceScreencastVisibilityChanged(eventMatcher?: (params: Protocol.Page.ScreencastVisibilityChangedEvent) => boolean): void;
|
3431
|
+
|
3432
|
+
/**
|
3433
|
+
* Fired when a new window is going to be opened, via window.open(), link click, form submission,
|
3434
|
+
* etc.
|
3435
|
+
*/
|
3436
|
+
onWindowOpen(listener: (params: Protocol.Page.WindowOpenEvent) => void): void;
|
3437
|
+
offWindowOpen(listener: (params: Protocol.Page.WindowOpenEvent) => void): void;
|
3438
|
+
onceWindowOpen(eventMatcher?: (params: Protocol.Page.WindowOpenEvent) => boolean): void;
|
3439
|
+
|
3440
|
+
/**
|
3441
|
+
* Issued for every compilation cache generated. Is only available
|
3442
|
+
* if Page.setGenerateCompilationCache is enabled.
|
3443
|
+
*/
|
3444
|
+
onCompilationCacheProduced(listener: (params: Protocol.Page.CompilationCacheProducedEvent) => void): void;
|
3445
|
+
offCompilationCacheProduced(listener: (params: Protocol.Page.CompilationCacheProducedEvent) => void): void;
|
3446
|
+
onceCompilationCacheProduced(eventMatcher?: (params: Protocol.Page.CompilationCacheProducedEvent) => boolean): void;
|
3447
|
+
|
3448
|
+
}
|
3449
|
+
|
3450
|
+
export interface PerformanceApi {
|
3451
|
+
/**
|
3452
|
+
* Disable collecting and reporting metrics.
|
3453
|
+
*/
|
3454
|
+
disable(): Promise<void>;
|
3455
|
+
|
3456
|
+
/**
|
3457
|
+
* Enable collecting and reporting metrics.
|
3458
|
+
*/
|
3459
|
+
enable(params: Protocol.Performance.EnableRequest): Promise<void>;
|
3460
|
+
|
3461
|
+
/**
|
3462
|
+
* Sets time domain to use for collecting and reporting duration metrics.
|
3463
|
+
* Note that this must be called before enabling metrics collection. Calling
|
3464
|
+
* this method while metrics collection is enabled returns an error.
|
3465
|
+
*/
|
3466
|
+
setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest): Promise<void>;
|
3467
|
+
|
3468
|
+
/**
|
3469
|
+
* Retrieve current values of run-time metrics.
|
3470
|
+
*/
|
3471
|
+
getMetrics(): Promise<Protocol.Performance.GetMetricsResponse>;
|
3472
|
+
|
3473
|
+
/**
|
3474
|
+
* Current values of the metrics.
|
3475
|
+
*/
|
3476
|
+
onMetrics(listener: (params: Protocol.Performance.MetricsEvent) => void): void;
|
3477
|
+
offMetrics(listener: (params: Protocol.Performance.MetricsEvent) => void): void;
|
3478
|
+
onceMetrics(eventMatcher?: (params: Protocol.Performance.MetricsEvent) => boolean): void;
|
3479
|
+
|
3480
|
+
}
|
3481
|
+
|
3482
|
+
export interface PerformanceTimelineApi {
|
3483
|
+
/**
|
3484
|
+
* Previously buffered events would be reported before method returns.
|
3485
|
+
* See also: timelineEventAdded
|
3486
|
+
*/
|
3487
|
+
enable(params: Protocol.PerformanceTimeline.EnableRequest): Promise<void>;
|
3488
|
+
|
3489
|
+
/**
|
3490
|
+
* Sent when a performance timeline event is added. See reportPerformanceTimeline method.
|
3491
|
+
*/
|
3492
|
+
onTimelineEventAdded(listener: (params: Protocol.PerformanceTimeline.TimelineEventAddedEvent) => void): void;
|
3493
|
+
offTimelineEventAdded(listener: (params: Protocol.PerformanceTimeline.TimelineEventAddedEvent) => void): void;
|
3494
|
+
onceTimelineEventAdded(eventMatcher?: (params: Protocol.PerformanceTimeline.TimelineEventAddedEvent) => boolean): void;
|
3495
|
+
|
3496
|
+
}
|
3497
|
+
|
3498
|
+
export interface SecurityApi {
|
3499
|
+
/**
|
3500
|
+
* Disables tracking security state changes.
|
3501
|
+
*/
|
3502
|
+
disable(): Promise<void>;
|
3503
|
+
|
3504
|
+
/**
|
3505
|
+
* Enables tracking security state changes.
|
3506
|
+
*/
|
3507
|
+
enable(): Promise<void>;
|
3508
|
+
|
3509
|
+
/**
|
3510
|
+
* Enable/disable whether all certificate errors should be ignored.
|
3511
|
+
*/
|
3512
|
+
setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest): Promise<void>;
|
3513
|
+
|
3514
|
+
/**
|
3515
|
+
* Handles a certificate error that fired a certificateError event.
|
3516
|
+
*/
|
3517
|
+
handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest): Promise<void>;
|
3518
|
+
|
3519
|
+
/**
|
3520
|
+
* Enable/disable overriding certificate errors. If enabled, all certificate error events need to
|
3521
|
+
* be handled by the DevTools client and should be answered with `handleCertificateError` commands.
|
3522
|
+
*/
|
3523
|
+
setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest): Promise<void>;
|
3524
|
+
|
3525
|
+
/**
|
3526
|
+
* There is a certificate error. If overriding certificate errors is enabled, then it should be
|
3527
|
+
* handled with the `handleCertificateError` command. Note: this event does not fire if the
|
3528
|
+
* certificate error has been allowed internally. Only one client per target should override
|
3529
|
+
* certificate errors at the same time.
|
3530
|
+
*/
|
3531
|
+
onCertificateError(listener: (params: Protocol.Security.CertificateErrorEvent) => void): void;
|
3532
|
+
offCertificateError(listener: (params: Protocol.Security.CertificateErrorEvent) => void): void;
|
3533
|
+
onceCertificateError(eventMatcher?: (params: Protocol.Security.CertificateErrorEvent) => boolean): void;
|
3534
|
+
|
3535
|
+
/**
|
3536
|
+
* The security state of the page changed.
|
3537
|
+
*/
|
3538
|
+
onVisibleSecurityStateChanged(listener: (params: Protocol.Security.VisibleSecurityStateChangedEvent) => void): void;
|
3539
|
+
offVisibleSecurityStateChanged(listener: (params: Protocol.Security.VisibleSecurityStateChangedEvent) => void): void;
|
3540
|
+
onceVisibleSecurityStateChanged(eventMatcher?: (params: Protocol.Security.VisibleSecurityStateChangedEvent) => boolean): void;
|
3541
|
+
|
3542
|
+
/**
|
3543
|
+
* The security state of the page changed. No longer being sent.
|
3544
|
+
*/
|
3545
|
+
onSecurityStateChanged(listener: (params: Protocol.Security.SecurityStateChangedEvent) => void): void;
|
3546
|
+
offSecurityStateChanged(listener: (params: Protocol.Security.SecurityStateChangedEvent) => void): void;
|
3547
|
+
onceSecurityStateChanged(eventMatcher?: (params: Protocol.Security.SecurityStateChangedEvent) => boolean): void;
|
3548
|
+
|
3549
|
+
}
|
3550
|
+
|
3551
|
+
export interface ServiceWorkerApi {
|
3552
|
+
deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest): Promise<void>;
|
3553
|
+
|
3554
|
+
disable(): Promise<void>;
|
3555
|
+
|
3556
|
+
dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest): Promise<void>;
|
3557
|
+
|
3558
|
+
dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest): Promise<void>;
|
3559
|
+
|
3560
|
+
enable(): Promise<void>;
|
3561
|
+
|
3562
|
+
inspectWorker(params: Protocol.ServiceWorker.InspectWorkerRequest): Promise<void>;
|
3563
|
+
|
3564
|
+
setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest): Promise<void>;
|
3565
|
+
|
3566
|
+
skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise<void>;
|
3567
|
+
|
3568
|
+
startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise<void>;
|
3569
|
+
|
3570
|
+
stopAllWorkers(): Promise<void>;
|
3571
|
+
|
3572
|
+
stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise<void>;
|
3573
|
+
|
3574
|
+
unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise<void>;
|
3575
|
+
|
3576
|
+
updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest): Promise<void>;
|
3577
|
+
|
3578
|
+
onWorkerErrorReported(listener: (params: Protocol.ServiceWorker.WorkerErrorReportedEvent) => void): void;
|
3579
|
+
offWorkerErrorReported(listener: (params: Protocol.ServiceWorker.WorkerErrorReportedEvent) => void): void;
|
3580
|
+
onceWorkerErrorReported(eventMatcher?: (params: Protocol.ServiceWorker.WorkerErrorReportedEvent) => boolean): void;
|
3581
|
+
|
3582
|
+
onWorkerRegistrationUpdated(listener: (params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent) => void): void;
|
3583
|
+
offWorkerRegistrationUpdated(listener: (params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent) => void): void;
|
3584
|
+
onceWorkerRegistrationUpdated(eventMatcher?: (params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent) => boolean): void;
|
3585
|
+
|
3586
|
+
onWorkerVersionUpdated(listener: (params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent) => void): void;
|
3587
|
+
offWorkerVersionUpdated(listener: (params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent) => void): void;
|
3588
|
+
onceWorkerVersionUpdated(eventMatcher?: (params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent) => boolean): void;
|
3589
|
+
|
3590
|
+
}
|
3591
|
+
|
3592
|
+
export interface StorageApi {
|
3593
|
+
/**
|
3594
|
+
* Returns a storage key given a frame id.
|
3595
|
+
*/
|
3596
|
+
getStorageKeyForFrame(params: Protocol.Storage.GetStorageKeyForFrameRequest): Promise<Protocol.Storage.GetStorageKeyForFrameResponse>;
|
3597
|
+
|
3598
|
+
/**
|
3599
|
+
* Clears storage for origin.
|
3600
|
+
*/
|
3601
|
+
clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest): Promise<void>;
|
3602
|
+
|
3603
|
+
/**
|
3604
|
+
* Clears storage for storage key.
|
3605
|
+
*/
|
3606
|
+
clearDataForStorageKey(params: Protocol.Storage.ClearDataForStorageKeyRequest): Promise<void>;
|
3607
|
+
|
3608
|
+
/**
|
3609
|
+
* Returns all browser cookies.
|
3610
|
+
*/
|
3611
|
+
getCookies(params: Protocol.Storage.GetCookiesRequest): Promise<Protocol.Storage.GetCookiesResponse>;
|
3612
|
+
|
3613
|
+
/**
|
3614
|
+
* Sets given cookies.
|
3615
|
+
*/
|
3616
|
+
setCookies(params: Protocol.Storage.SetCookiesRequest): Promise<void>;
|
3617
|
+
|
3618
|
+
/**
|
3619
|
+
* Clears cookies.
|
3620
|
+
*/
|
3621
|
+
clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise<void>;
|
3622
|
+
|
3623
|
+
/**
|
3624
|
+
* Returns usage and quota in bytes.
|
3625
|
+
*/
|
3626
|
+
getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest): Promise<Protocol.Storage.GetUsageAndQuotaResponse>;
|
3627
|
+
|
3628
|
+
/**
|
3629
|
+
* Override quota for the specified origin
|
3630
|
+
*/
|
3631
|
+
overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest): Promise<void>;
|
3632
|
+
|
3633
|
+
/**
|
3634
|
+
* Registers origin to be notified when an update occurs to its cache storage list.
|
3635
|
+
*/
|
3636
|
+
trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest): Promise<void>;
|
3637
|
+
|
3638
|
+
/**
|
3639
|
+
* Registers storage key to be notified when an update occurs to its cache storage list.
|
3640
|
+
*/
|
3641
|
+
trackCacheStorageForStorageKey(params: Protocol.Storage.TrackCacheStorageForStorageKeyRequest): Promise<void>;
|
3642
|
+
|
3643
|
+
/**
|
3644
|
+
* Registers origin to be notified when an update occurs to its IndexedDB.
|
3645
|
+
*/
|
3646
|
+
trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest): Promise<void>;
|
3647
|
+
|
3648
|
+
/**
|
3649
|
+
* Registers storage key to be notified when an update occurs to its IndexedDB.
|
3650
|
+
*/
|
3651
|
+
trackIndexedDBForStorageKey(params: Protocol.Storage.TrackIndexedDBForStorageKeyRequest): Promise<void>;
|
3652
|
+
|
3653
|
+
/**
|
3654
|
+
* Unregisters origin from receiving notifications for cache storage.
|
3655
|
+
*/
|
3656
|
+
untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest): Promise<void>;
|
3657
|
+
|
3658
|
+
/**
|
3659
|
+
* Unregisters storage key from receiving notifications for cache storage.
|
3660
|
+
*/
|
3661
|
+
untrackCacheStorageForStorageKey(params: Protocol.Storage.UntrackCacheStorageForStorageKeyRequest): Promise<void>;
|
3662
|
+
|
3663
|
+
/**
|
3664
|
+
* Unregisters origin from receiving notifications for IndexedDB.
|
3665
|
+
*/
|
3666
|
+
untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest): Promise<void>;
|
3667
|
+
|
3668
|
+
/**
|
3669
|
+
* Unregisters storage key from receiving notifications for IndexedDB.
|
3670
|
+
*/
|
3671
|
+
untrackIndexedDBForStorageKey(params: Protocol.Storage.UntrackIndexedDBForStorageKeyRequest): Promise<void>;
|
3672
|
+
|
3673
|
+
/**
|
3674
|
+
* Returns the number of stored Trust Tokens per issuer for the
|
3675
|
+
* current browsing context.
|
3676
|
+
*/
|
3677
|
+
getTrustTokens(): Promise<Protocol.Storage.GetTrustTokensResponse>;
|
3678
|
+
|
3679
|
+
/**
|
3680
|
+
* Removes all Trust Tokens issued by the provided issuerOrigin.
|
3681
|
+
* Leaves other stored data, including the issuer's Redemption Records, intact.
|
3682
|
+
*/
|
3683
|
+
clearTrustTokens(params: Protocol.Storage.ClearTrustTokensRequest): Promise<Protocol.Storage.ClearTrustTokensResponse>;
|
3684
|
+
|
3685
|
+
/**
|
3686
|
+
* Gets details for a named interest group.
|
3687
|
+
*/
|
3688
|
+
getInterestGroupDetails(params: Protocol.Storage.GetInterestGroupDetailsRequest): Promise<Protocol.Storage.GetInterestGroupDetailsResponse>;
|
3689
|
+
|
3690
|
+
/**
|
3691
|
+
* Enables/Disables issuing of interestGroupAccessed events.
|
3692
|
+
*/
|
3693
|
+
setInterestGroupTracking(params: Protocol.Storage.SetInterestGroupTrackingRequest): Promise<void>;
|
3694
|
+
|
3695
|
+
/**
|
3696
|
+
* Gets metadata for an origin's shared storage.
|
3697
|
+
*/
|
3698
|
+
getSharedStorageMetadata(params: Protocol.Storage.GetSharedStorageMetadataRequest): Promise<Protocol.Storage.GetSharedStorageMetadataResponse>;
|
3699
|
+
|
3700
|
+
/**
|
3701
|
+
* Gets the entries in an given origin's shared storage.
|
3702
|
+
*/
|
3703
|
+
getSharedStorageEntries(params: Protocol.Storage.GetSharedStorageEntriesRequest): Promise<Protocol.Storage.GetSharedStorageEntriesResponse>;
|
3704
|
+
|
3705
|
+
/**
|
3706
|
+
* Sets entry with `key` and `value` for a given origin's shared storage.
|
3707
|
+
*/
|
3708
|
+
setSharedStorageEntry(params: Protocol.Storage.SetSharedStorageEntryRequest): Promise<void>;
|
3709
|
+
|
3710
|
+
/**
|
3711
|
+
* Deletes entry for `key` (if it exists) for a given origin's shared storage.
|
3712
|
+
*/
|
3713
|
+
deleteSharedStorageEntry(params: Protocol.Storage.DeleteSharedStorageEntryRequest): Promise<void>;
|
3714
|
+
|
3715
|
+
/**
|
3716
|
+
* Clears all entries for a given origin's shared storage.
|
3717
|
+
*/
|
3718
|
+
clearSharedStorageEntries(params: Protocol.Storage.ClearSharedStorageEntriesRequest): Promise<void>;
|
3719
|
+
|
3720
|
+
/**
|
3721
|
+
* Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
|
3722
|
+
*/
|
3723
|
+
resetSharedStorageBudget(params: Protocol.Storage.ResetSharedStorageBudgetRequest): Promise<void>;
|
3724
|
+
|
3725
|
+
/**
|
3726
|
+
* Enables/disables issuing of sharedStorageAccessed events.
|
3727
|
+
*/
|
3728
|
+
setSharedStorageTracking(params: Protocol.Storage.SetSharedStorageTrackingRequest): Promise<void>;
|
3729
|
+
|
3730
|
+
/**
|
3731
|
+
* Set tracking for a storage key's buckets.
|
3732
|
+
*/
|
3733
|
+
setStorageBucketTracking(params: Protocol.Storage.SetStorageBucketTrackingRequest): Promise<void>;
|
3734
|
+
|
3735
|
+
/**
|
3736
|
+
* Deletes the Storage Bucket with the given storage key and bucket name.
|
3737
|
+
*/
|
3738
|
+
deleteStorageBucket(params: Protocol.Storage.DeleteStorageBucketRequest): Promise<void>;
|
3739
|
+
|
3740
|
+
/**
|
3741
|
+
* Deletes state for sites identified as potential bounce trackers, immediately.
|
3742
|
+
*/
|
3743
|
+
runBounceTrackingMitigations(): Promise<Protocol.Storage.RunBounceTrackingMitigationsResponse>;
|
3744
|
+
|
3745
|
+
/**
|
3746
|
+
* https://wicg.github.io/attribution-reporting-api/
|
3747
|
+
*/
|
3748
|
+
setAttributionReportingLocalTestingMode(params: Protocol.Storage.SetAttributionReportingLocalTestingModeRequest): Promise<void>;
|
3749
|
+
|
3750
|
+
/**
|
3751
|
+
* Enables/disables issuing of Attribution Reporting events.
|
3752
|
+
*/
|
3753
|
+
setAttributionReportingTracking(params: Protocol.Storage.SetAttributionReportingTrackingRequest): Promise<void>;
|
3754
|
+
|
3755
|
+
/**
|
3756
|
+
* A cache's contents have been modified.
|
3757
|
+
*/
|
3758
|
+
onCacheStorageContentUpdated(listener: (params: Protocol.Storage.CacheStorageContentUpdatedEvent) => void): void;
|
3759
|
+
offCacheStorageContentUpdated(listener: (params: Protocol.Storage.CacheStorageContentUpdatedEvent) => void): void;
|
3760
|
+
onceCacheStorageContentUpdated(eventMatcher?: (params: Protocol.Storage.CacheStorageContentUpdatedEvent) => boolean): void;
|
3761
|
+
|
3762
|
+
/**
|
3763
|
+
* A cache has been added/deleted.
|
3764
|
+
*/
|
3765
|
+
onCacheStorageListUpdated(listener: (params: Protocol.Storage.CacheStorageListUpdatedEvent) => void): void;
|
3766
|
+
offCacheStorageListUpdated(listener: (params: Protocol.Storage.CacheStorageListUpdatedEvent) => void): void;
|
3767
|
+
onceCacheStorageListUpdated(eventMatcher?: (params: Protocol.Storage.CacheStorageListUpdatedEvent) => boolean): void;
|
3768
|
+
|
3769
|
+
/**
|
3770
|
+
* The origin's IndexedDB object store has been modified.
|
3771
|
+
*/
|
3772
|
+
onIndexedDBContentUpdated(listener: (params: Protocol.Storage.IndexedDBContentUpdatedEvent) => void): void;
|
3773
|
+
offIndexedDBContentUpdated(listener: (params: Protocol.Storage.IndexedDBContentUpdatedEvent) => void): void;
|
3774
|
+
onceIndexedDBContentUpdated(eventMatcher?: (params: Protocol.Storage.IndexedDBContentUpdatedEvent) => boolean): void;
|
3775
|
+
|
3776
|
+
/**
|
3777
|
+
* The origin's IndexedDB database list has been modified.
|
3778
|
+
*/
|
3779
|
+
onIndexedDBListUpdated(listener: (params: Protocol.Storage.IndexedDBListUpdatedEvent) => void): void;
|
3780
|
+
offIndexedDBListUpdated(listener: (params: Protocol.Storage.IndexedDBListUpdatedEvent) => void): void;
|
3781
|
+
onceIndexedDBListUpdated(eventMatcher?: (params: Protocol.Storage.IndexedDBListUpdatedEvent) => boolean): void;
|
3782
|
+
|
3783
|
+
/**
|
3784
|
+
* One of the interest groups was accessed by the associated page.
|
3785
|
+
*/
|
3786
|
+
onInterestGroupAccessed(listener: (params: Protocol.Storage.InterestGroupAccessedEvent) => void): void;
|
3787
|
+
offInterestGroupAccessed(listener: (params: Protocol.Storage.InterestGroupAccessedEvent) => void): void;
|
3788
|
+
onceInterestGroupAccessed(eventMatcher?: (params: Protocol.Storage.InterestGroupAccessedEvent) => boolean): void;
|
3789
|
+
|
3790
|
+
/**
|
3791
|
+
* Shared storage was accessed by the associated page.
|
3792
|
+
* The following parameters are included in all events.
|
3793
|
+
*/
|
3794
|
+
onSharedStorageAccessed(listener: (params: Protocol.Storage.SharedStorageAccessedEvent) => void): void;
|
3795
|
+
offSharedStorageAccessed(listener: (params: Protocol.Storage.SharedStorageAccessedEvent) => void): void;
|
3796
|
+
onceSharedStorageAccessed(eventMatcher?: (params: Protocol.Storage.SharedStorageAccessedEvent) => boolean): void;
|
3797
|
+
|
3798
|
+
onStorageBucketCreatedOrUpdated(listener: (params: Protocol.Storage.StorageBucketCreatedOrUpdatedEvent) => void): void;
|
3799
|
+
offStorageBucketCreatedOrUpdated(listener: (params: Protocol.Storage.StorageBucketCreatedOrUpdatedEvent) => void): void;
|
3800
|
+
onceStorageBucketCreatedOrUpdated(eventMatcher?: (params: Protocol.Storage.StorageBucketCreatedOrUpdatedEvent) => boolean): void;
|
3801
|
+
|
3802
|
+
onStorageBucketDeleted(listener: (params: Protocol.Storage.StorageBucketDeletedEvent) => void): void;
|
3803
|
+
offStorageBucketDeleted(listener: (params: Protocol.Storage.StorageBucketDeletedEvent) => void): void;
|
3804
|
+
onceStorageBucketDeleted(eventMatcher?: (params: Protocol.Storage.StorageBucketDeletedEvent) => boolean): void;
|
3805
|
+
|
3806
|
+
onAttributionReportingSourceRegistered(listener: (params: Protocol.Storage.AttributionReportingSourceRegisteredEvent) => void): void;
|
3807
|
+
offAttributionReportingSourceRegistered(listener: (params: Protocol.Storage.AttributionReportingSourceRegisteredEvent) => void): void;
|
3808
|
+
onceAttributionReportingSourceRegistered(eventMatcher?: (params: Protocol.Storage.AttributionReportingSourceRegisteredEvent) => boolean): void;
|
3809
|
+
|
3810
|
+
onAttributionReportingTriggerRegistered(listener: (params: Protocol.Storage.AttributionReportingTriggerRegisteredEvent) => void): void;
|
3811
|
+
offAttributionReportingTriggerRegistered(listener: (params: Protocol.Storage.AttributionReportingTriggerRegisteredEvent) => void): void;
|
3812
|
+
onceAttributionReportingTriggerRegistered(eventMatcher?: (params: Protocol.Storage.AttributionReportingTriggerRegisteredEvent) => boolean): void;
|
3813
|
+
|
3814
|
+
}
|
3815
|
+
|
3816
|
+
export interface SystemInfoApi {
|
3817
|
+
/**
|
3818
|
+
* Returns information about the system.
|
3819
|
+
*/
|
3820
|
+
getInfo(): Promise<Protocol.SystemInfo.GetInfoResponse>;
|
3821
|
+
|
3822
|
+
/**
|
3823
|
+
* Returns information about the feature state.
|
3824
|
+
*/
|
3825
|
+
getFeatureState(params: Protocol.SystemInfo.GetFeatureStateRequest): Promise<Protocol.SystemInfo.GetFeatureStateResponse>;
|
3826
|
+
|
3827
|
+
/**
|
3828
|
+
* Returns information about all running processes.
|
3829
|
+
*/
|
3830
|
+
getProcessInfo(): Promise<Protocol.SystemInfo.GetProcessInfoResponse>;
|
3831
|
+
|
3832
|
+
}
|
3833
|
+
|
3834
|
+
export interface TargetApi {
|
3835
|
+
/**
|
3836
|
+
* Activates (focuses) the target.
|
3837
|
+
*/
|
3838
|
+
activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise<void>;
|
3839
|
+
|
3840
|
+
/**
|
3841
|
+
* Attaches to the target with given id.
|
3842
|
+
*/
|
3843
|
+
attachToTarget(params: Protocol.Target.AttachToTargetRequest): Promise<Protocol.Target.AttachToTargetResponse>;
|
3844
|
+
|
3845
|
+
/**
|
3846
|
+
* Attaches to the browser target, only uses flat sessionId mode.
|
3847
|
+
*/
|
3848
|
+
attachToBrowserTarget(): Promise<Protocol.Target.AttachToBrowserTargetResponse>;
|
3849
|
+
|
3850
|
+
/**
|
3851
|
+
* Closes the target. If the target is a page that gets closed too.
|
3852
|
+
*/
|
3853
|
+
closeTarget(params: Protocol.Target.CloseTargetRequest): Promise<Protocol.Target.CloseTargetResponse>;
|
3854
|
+
|
3855
|
+
/**
|
3856
|
+
* Inject object to the target's main frame that provides a communication
|
3857
|
+
* channel with browser target.
|
3858
|
+
*
|
3859
|
+
* Injected object will be available as `window[bindingName]`.
|
3860
|
+
*
|
3861
|
+
* The object has the follwing API:
|
3862
|
+
* - `binding.send(json)` - a method to send messages over the remote debugging protocol
|
3863
|
+
* - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
|
3864
|
+
*/
|
3865
|
+
exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest): Promise<void>;
|
3866
|
+
|
3867
|
+
/**
|
3868
|
+
* Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
|
3869
|
+
* one.
|
3870
|
+
*/
|
3871
|
+
createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest): Promise<Protocol.Target.CreateBrowserContextResponse>;
|
3872
|
+
|
3873
|
+
/**
|
3874
|
+
* Returns all browser contexts created with `Target.createBrowserContext` method.
|
3875
|
+
*/
|
3876
|
+
getBrowserContexts(): Promise<Protocol.Target.GetBrowserContextsResponse>;
|
3877
|
+
|
3878
|
+
/**
|
3879
|
+
* Creates a new page.
|
3880
|
+
*/
|
3881
|
+
createTarget(params: Protocol.Target.CreateTargetRequest): Promise<Protocol.Target.CreateTargetResponse>;
|
3882
|
+
|
3883
|
+
/**
|
3884
|
+
* Detaches session with given id.
|
3885
|
+
*/
|
3886
|
+
detachFromTarget(params: Protocol.Target.DetachFromTargetRequest): Promise<void>;
|
3887
|
+
|
3888
|
+
/**
|
3889
|
+
* Deletes a BrowserContext. All the belonging pages will be closed without calling their
|
3890
|
+
* beforeunload hooks.
|
3891
|
+
*/
|
3892
|
+
disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest): Promise<void>;
|
3893
|
+
|
3894
|
+
/**
|
3895
|
+
* Returns information about a target.
|
3896
|
+
*/
|
3897
|
+
getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise<Protocol.Target.GetTargetInfoResponse>;
|
3898
|
+
|
3899
|
+
/**
|
3900
|
+
* Retrieves a list of available targets.
|
3901
|
+
*/
|
3902
|
+
getTargets(params: Protocol.Target.GetTargetsRequest): Promise<Protocol.Target.GetTargetsResponse>;
|
3903
|
+
|
3904
|
+
/**
|
3905
|
+
* Sends protocol message over session with given id.
|
3906
|
+
* Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
|
3907
|
+
* and crbug.com/991325.
|
3908
|
+
*/
|
3909
|
+
sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest): Promise<void>;
|
3910
|
+
|
3911
|
+
/**
|
3912
|
+
* Controls whether to automatically attach to new targets which are considered to be related to
|
3913
|
+
* this one. When turned on, attaches to all existing related targets as well. When turned off,
|
3914
|
+
* automatically detaches from all currently attached targets.
|
3915
|
+
* This also clears all targets added by `autoAttachRelated` from the list of targets to watch
|
3916
|
+
* for creation of related targets.
|
3917
|
+
*/
|
3918
|
+
setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise<void>;
|
3919
|
+
|
3920
|
+
/**
|
3921
|
+
* Adds the specified target to the list of targets that will be monitored for any related target
|
3922
|
+
* creation (such as child frames, child workers and new versions of service worker) and reported
|
3923
|
+
* through `attachedToTarget`. The specified target is also auto-attached.
|
3924
|
+
* This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
|
3925
|
+
* `setAutoAttach`. Only available at the Browser target.
|
3926
|
+
*/
|
3927
|
+
autoAttachRelated(params: Protocol.Target.AutoAttachRelatedRequest): Promise<void>;
|
3928
|
+
|
3929
|
+
/**
|
3930
|
+
* Controls whether to discover available targets and notify via
|
3931
|
+
* `targetCreated/targetInfoChanged/targetDestroyed` events.
|
3932
|
+
*/
|
3933
|
+
setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest): Promise<void>;
|
3934
|
+
|
3935
|
+
/**
|
3936
|
+
* Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
|
3937
|
+
* `true`.
|
3938
|
+
*/
|
3939
|
+
setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest): Promise<void>;
|
3940
|
+
|
3941
|
+
/**
|
3942
|
+
* Issued when attached to target because of auto-attach or `attachToTarget` command.
|
3943
|
+
*/
|
3944
|
+
onAttachedToTarget(listener: (params: Protocol.Target.AttachedToTargetEvent) => void): void;
|
3945
|
+
offAttachedToTarget(listener: (params: Protocol.Target.AttachedToTargetEvent) => void): void;
|
3946
|
+
onceAttachedToTarget(eventMatcher?: (params: Protocol.Target.AttachedToTargetEvent) => boolean): void;
|
3947
|
+
|
3948
|
+
/**
|
3949
|
+
* Issued when detached from target for any reason (including `detachFromTarget` command). Can be
|
3950
|
+
* issued multiple times per target if multiple sessions have been attached to it.
|
3951
|
+
*/
|
3952
|
+
onDetachedFromTarget(listener: (params: Protocol.Target.DetachedFromTargetEvent) => void): void;
|
3953
|
+
offDetachedFromTarget(listener: (params: Protocol.Target.DetachedFromTargetEvent) => void): void;
|
3954
|
+
onceDetachedFromTarget(eventMatcher?: (params: Protocol.Target.DetachedFromTargetEvent) => boolean): void;
|
3955
|
+
|
3956
|
+
/**
|
3957
|
+
* Notifies about a new protocol message received from the session (as reported in
|
3958
|
+
* `attachedToTarget` event).
|
3959
|
+
*/
|
3960
|
+
onReceivedMessageFromTarget(listener: (params: Protocol.Target.ReceivedMessageFromTargetEvent) => void): void;
|
3961
|
+
offReceivedMessageFromTarget(listener: (params: Protocol.Target.ReceivedMessageFromTargetEvent) => void): void;
|
3962
|
+
onceReceivedMessageFromTarget(eventMatcher?: (params: Protocol.Target.ReceivedMessageFromTargetEvent) => boolean): void;
|
3963
|
+
|
3964
|
+
/**
|
3965
|
+
* Issued when a possible inspection target is created.
|
3966
|
+
*/
|
3967
|
+
onTargetCreated(listener: (params: Protocol.Target.TargetCreatedEvent) => void): void;
|
3968
|
+
offTargetCreated(listener: (params: Protocol.Target.TargetCreatedEvent) => void): void;
|
3969
|
+
onceTargetCreated(eventMatcher?: (params: Protocol.Target.TargetCreatedEvent) => boolean): void;
|
3970
|
+
|
3971
|
+
/**
|
3972
|
+
* Issued when a target is destroyed.
|
3973
|
+
*/
|
3974
|
+
onTargetDestroyed(listener: (params: Protocol.Target.TargetDestroyedEvent) => void): void;
|
3975
|
+
offTargetDestroyed(listener: (params: Protocol.Target.TargetDestroyedEvent) => void): void;
|
3976
|
+
onceTargetDestroyed(eventMatcher?: (params: Protocol.Target.TargetDestroyedEvent) => boolean): void;
|
3977
|
+
|
3978
|
+
/**
|
3979
|
+
* Issued when a target has crashed.
|
3980
|
+
*/
|
3981
|
+
onTargetCrashed(listener: (params: Protocol.Target.TargetCrashedEvent) => void): void;
|
3982
|
+
offTargetCrashed(listener: (params: Protocol.Target.TargetCrashedEvent) => void): void;
|
3983
|
+
onceTargetCrashed(eventMatcher?: (params: Protocol.Target.TargetCrashedEvent) => boolean): void;
|
3984
|
+
|
3985
|
+
/**
|
3986
|
+
* Issued when some information about a target has changed. This only happens between
|
3987
|
+
* `targetCreated` and `targetDestroyed`.
|
3988
|
+
*/
|
3989
|
+
onTargetInfoChanged(listener: (params: Protocol.Target.TargetInfoChangedEvent) => void): void;
|
3990
|
+
offTargetInfoChanged(listener: (params: Protocol.Target.TargetInfoChangedEvent) => void): void;
|
3991
|
+
onceTargetInfoChanged(eventMatcher?: (params: Protocol.Target.TargetInfoChangedEvent) => boolean): void;
|
3992
|
+
|
3993
|
+
}
|
3994
|
+
|
3995
|
+
export interface TetheringApi {
|
3996
|
+
/**
|
3997
|
+
* Request browser port binding.
|
3998
|
+
*/
|
3999
|
+
bind(params: Protocol.Tethering.BindRequest): Promise<void>;
|
4000
|
+
|
4001
|
+
/**
|
4002
|
+
* Request browser port unbinding.
|
4003
|
+
*/
|
4004
|
+
unbind(params: Protocol.Tethering.UnbindRequest): Promise<void>;
|
4005
|
+
|
4006
|
+
/**
|
4007
|
+
* Informs that port was successfully bound and got a specified connection id.
|
4008
|
+
*/
|
4009
|
+
onAccepted(listener: (params: Protocol.Tethering.AcceptedEvent) => void): void;
|
4010
|
+
offAccepted(listener: (params: Protocol.Tethering.AcceptedEvent) => void): void;
|
4011
|
+
onceAccepted(eventMatcher?: (params: Protocol.Tethering.AcceptedEvent) => boolean): void;
|
4012
|
+
|
4013
|
+
}
|
4014
|
+
|
4015
|
+
export interface TracingApi {
|
4016
|
+
/**
|
4017
|
+
* Stop trace events collection.
|
4018
|
+
*/
|
4019
|
+
end(): Promise<void>;
|
4020
|
+
|
4021
|
+
/**
|
4022
|
+
* Gets supported tracing categories.
|
4023
|
+
*/
|
4024
|
+
getCategories(): Promise<Protocol.Tracing.GetCategoriesResponse>;
|
4025
|
+
|
4026
|
+
/**
|
4027
|
+
* Record a clock sync marker in the trace.
|
4028
|
+
*/
|
4029
|
+
recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest): Promise<void>;
|
4030
|
+
|
4031
|
+
/**
|
4032
|
+
* Request a global memory dump.
|
4033
|
+
*/
|
4034
|
+
requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest): Promise<Protocol.Tracing.RequestMemoryDumpResponse>;
|
4035
|
+
|
4036
|
+
/**
|
4037
|
+
* Start trace events collection.
|
4038
|
+
*/
|
4039
|
+
start(params: Protocol.Tracing.StartRequest): Promise<void>;
|
4040
|
+
|
4041
|
+
onBufferUsage(listener: (params: Protocol.Tracing.BufferUsageEvent) => void): void;
|
4042
|
+
offBufferUsage(listener: (params: Protocol.Tracing.BufferUsageEvent) => void): void;
|
4043
|
+
onceBufferUsage(eventMatcher?: (params: Protocol.Tracing.BufferUsageEvent) => boolean): void;
|
4044
|
+
|
4045
|
+
/**
|
4046
|
+
* Contains a bucket of collected trace events. When tracing is stopped collected events will be
|
4047
|
+
* sent as a sequence of dataCollected events followed by tracingComplete event.
|
4048
|
+
*/
|
4049
|
+
onDataCollected(listener: (params: Protocol.Tracing.DataCollectedEvent) => void): void;
|
4050
|
+
offDataCollected(listener: (params: Protocol.Tracing.DataCollectedEvent) => void): void;
|
4051
|
+
onceDataCollected(eventMatcher?: (params: Protocol.Tracing.DataCollectedEvent) => boolean): void;
|
4052
|
+
|
4053
|
+
/**
|
4054
|
+
* Signals that tracing is stopped and there is no trace buffers pending flush, all data were
|
4055
|
+
* delivered via dataCollected events.
|
4056
|
+
*/
|
4057
|
+
onTracingComplete(listener: (params: Protocol.Tracing.TracingCompleteEvent) => void): void;
|
4058
|
+
offTracingComplete(listener: (params: Protocol.Tracing.TracingCompleteEvent) => void): void;
|
4059
|
+
onceTracingComplete(eventMatcher?: (params: Protocol.Tracing.TracingCompleteEvent) => boolean): void;
|
4060
|
+
|
4061
|
+
}
|
4062
|
+
|
4063
|
+
export interface FetchApi {
|
4064
|
+
/**
|
4065
|
+
* Disables the fetch domain.
|
4066
|
+
*/
|
4067
|
+
disable(): Promise<void>;
|
4068
|
+
|
4069
|
+
/**
|
4070
|
+
* Enables issuing of requestPaused events. A request will be paused until client
|
4071
|
+
* calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
|
4072
|
+
*/
|
4073
|
+
enable(params: Protocol.Fetch.EnableRequest): Promise<void>;
|
4074
|
+
|
4075
|
+
/**
|
4076
|
+
* Causes the request to fail with specified reason.
|
4077
|
+
*/
|
4078
|
+
failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<void>;
|
4079
|
+
|
4080
|
+
/**
|
4081
|
+
* Provides response to the request.
|
4082
|
+
*/
|
4083
|
+
fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<void>;
|
4084
|
+
|
4085
|
+
/**
|
4086
|
+
* Continues the request, optionally modifying some of its parameters.
|
4087
|
+
*/
|
4088
|
+
continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<void>;
|
4089
|
+
|
4090
|
+
/**
|
4091
|
+
* Continues a request supplying authChallengeResponse following authRequired event.
|
4092
|
+
*/
|
4093
|
+
continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise<void>;
|
4094
|
+
|
4095
|
+
/**
|
4096
|
+
* Continues loading of the paused response, optionally modifying the
|
4097
|
+
* response headers. If either responseCode or headers are modified, all of them
|
4098
|
+
* must be present.
|
4099
|
+
*/
|
4100
|
+
continueResponse(params: Protocol.Fetch.ContinueResponseRequest): Promise<void>;
|
4101
|
+
|
4102
|
+
/**
|
4103
|
+
* Causes the body of the response to be received from the server and
|
4104
|
+
* returned as a single string. May only be issued for a request that
|
4105
|
+
* is paused in the Response stage and is mutually exclusive with
|
4106
|
+
* takeResponseBodyForInterceptionAsStream. Calling other methods that
|
4107
|
+
* affect the request or disabling fetch domain before body is received
|
4108
|
+
* results in an undefined behavior.
|
4109
|
+
* Note that the response body is not available for redirects. Requests
|
4110
|
+
* paused in the _redirect received_ state may be differentiated by
|
4111
|
+
* `responseCode` and presence of `location` response header, see
|
4112
|
+
* comments to `requestPaused` for details.
|
4113
|
+
*/
|
4114
|
+
getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise<Protocol.Fetch.GetResponseBodyResponse>;
|
4115
|
+
|
4116
|
+
/**
|
4117
|
+
* Returns a handle to the stream representing the response body.
|
4118
|
+
* The request must be paused in the HeadersReceived stage.
|
4119
|
+
* Note that after this command the request can't be continued
|
4120
|
+
* as is -- client either needs to cancel it or to provide the
|
4121
|
+
* response body.
|
4122
|
+
* The stream only supports sequential read, IO.read will fail if the position
|
4123
|
+
* is specified.
|
4124
|
+
* This method is mutually exclusive with getResponseBody.
|
4125
|
+
* Calling other methods that affect the request or disabling fetch
|
4126
|
+
* domain before body is received results in an undefined behavior.
|
4127
|
+
*/
|
4128
|
+
takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
|
4129
|
+
|
4130
|
+
/**
|
4131
|
+
* Issued when the domain is enabled and the request URL matches the
|
4132
|
+
* specified filter. The request is paused until the client responds
|
4133
|
+
* with one of continueRequest, failRequest or fulfillRequest.
|
4134
|
+
* The stage of the request can be determined by presence of responseErrorReason
|
4135
|
+
* and responseStatusCode -- the request is at the response stage if either
|
4136
|
+
* of these fields is present and in the request stage otherwise.
|
4137
|
+
* Redirect responses and subsequent requests are reported similarly to regular
|
4138
|
+
* responses and requests. Redirect responses may be distinguished by the value
|
4139
|
+
* of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
|
4140
|
+
* presence of the `location` header. Requests resulting from a redirect will
|
4141
|
+
* have `redirectedRequestId` field set.
|
4142
|
+
*/
|
4143
|
+
onRequestPaused(listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
|
4144
|
+
offRequestPaused(listener: (params: Protocol.Fetch.RequestPausedEvent) => void): void;
|
4145
|
+
onceRequestPaused(eventMatcher?: (params: Protocol.Fetch.RequestPausedEvent) => boolean): void;
|
4146
|
+
|
4147
|
+
/**
|
4148
|
+
* Issued when the domain is enabled with handleAuthRequests set to true.
|
4149
|
+
* The request is paused until client responds with continueWithAuth.
|
4150
|
+
*/
|
4151
|
+
onAuthRequired(listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
|
4152
|
+
offAuthRequired(listener: (params: Protocol.Fetch.AuthRequiredEvent) => void): void;
|
4153
|
+
onceAuthRequired(eventMatcher?: (params: Protocol.Fetch.AuthRequiredEvent) => boolean): void;
|
4154
|
+
|
4155
|
+
}
|
4156
|
+
|
4157
|
+
export interface WebAudioApi {
|
4158
|
+
/**
|
4159
|
+
* Enables the WebAudio domain and starts sending context lifetime events.
|
4160
|
+
*/
|
4161
|
+
enable(): Promise<void>;
|
4162
|
+
|
4163
|
+
/**
|
4164
|
+
* Disables the WebAudio domain.
|
4165
|
+
*/
|
4166
|
+
disable(): Promise<void>;
|
4167
|
+
|
4168
|
+
/**
|
4169
|
+
* Fetch the realtime data from the registered contexts.
|
4170
|
+
*/
|
4171
|
+
getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest): Promise<Protocol.WebAudio.GetRealtimeDataResponse>;
|
4172
|
+
|
4173
|
+
/**
|
4174
|
+
* Notifies that a new BaseAudioContext has been created.
|
4175
|
+
*/
|
4176
|
+
onContextCreated(listener: (params: Protocol.WebAudio.ContextCreatedEvent) => void): void;
|
4177
|
+
offContextCreated(listener: (params: Protocol.WebAudio.ContextCreatedEvent) => void): void;
|
4178
|
+
onceContextCreated(eventMatcher?: (params: Protocol.WebAudio.ContextCreatedEvent) => boolean): void;
|
4179
|
+
|
4180
|
+
/**
|
4181
|
+
* Notifies that an existing BaseAudioContext will be destroyed.
|
4182
|
+
*/
|
4183
|
+
onContextWillBeDestroyed(listener: (params: Protocol.WebAudio.ContextWillBeDestroyedEvent) => void): void;
|
4184
|
+
offContextWillBeDestroyed(listener: (params: Protocol.WebAudio.ContextWillBeDestroyedEvent) => void): void;
|
4185
|
+
onceContextWillBeDestroyed(eventMatcher?: (params: Protocol.WebAudio.ContextWillBeDestroyedEvent) => boolean): void;
|
4186
|
+
|
4187
|
+
/**
|
4188
|
+
* Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
|
4189
|
+
*/
|
4190
|
+
onContextChanged(listener: (params: Protocol.WebAudio.ContextChangedEvent) => void): void;
|
4191
|
+
offContextChanged(listener: (params: Protocol.WebAudio.ContextChangedEvent) => void): void;
|
4192
|
+
onceContextChanged(eventMatcher?: (params: Protocol.WebAudio.ContextChangedEvent) => boolean): void;
|
4193
|
+
|
4194
|
+
/**
|
4195
|
+
* Notifies that the construction of an AudioListener has finished.
|
4196
|
+
*/
|
4197
|
+
onAudioListenerCreated(listener: (params: Protocol.WebAudio.AudioListenerCreatedEvent) => void): void;
|
4198
|
+
offAudioListenerCreated(listener: (params: Protocol.WebAudio.AudioListenerCreatedEvent) => void): void;
|
4199
|
+
onceAudioListenerCreated(eventMatcher?: (params: Protocol.WebAudio.AudioListenerCreatedEvent) => boolean): void;
|
4200
|
+
|
4201
|
+
/**
|
4202
|
+
* Notifies that a new AudioListener has been created.
|
4203
|
+
*/
|
4204
|
+
onAudioListenerWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent) => void): void;
|
4205
|
+
offAudioListenerWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent) => void): void;
|
4206
|
+
onceAudioListenerWillBeDestroyed(eventMatcher?: (params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent) => boolean): void;
|
4207
|
+
|
4208
|
+
/**
|
4209
|
+
* Notifies that a new AudioNode has been created.
|
4210
|
+
*/
|
4211
|
+
onAudioNodeCreated(listener: (params: Protocol.WebAudio.AudioNodeCreatedEvent) => void): void;
|
4212
|
+
offAudioNodeCreated(listener: (params: Protocol.WebAudio.AudioNodeCreatedEvent) => void): void;
|
4213
|
+
onceAudioNodeCreated(eventMatcher?: (params: Protocol.WebAudio.AudioNodeCreatedEvent) => boolean): void;
|
4214
|
+
|
4215
|
+
/**
|
4216
|
+
* Notifies that an existing AudioNode has been destroyed.
|
4217
|
+
*/
|
4218
|
+
onAudioNodeWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent) => void): void;
|
4219
|
+
offAudioNodeWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent) => void): void;
|
4220
|
+
onceAudioNodeWillBeDestroyed(eventMatcher?: (params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent) => boolean): void;
|
4221
|
+
|
4222
|
+
/**
|
4223
|
+
* Notifies that a new AudioParam has been created.
|
4224
|
+
*/
|
4225
|
+
onAudioParamCreated(listener: (params: Protocol.WebAudio.AudioParamCreatedEvent) => void): void;
|
4226
|
+
offAudioParamCreated(listener: (params: Protocol.WebAudio.AudioParamCreatedEvent) => void): void;
|
4227
|
+
onceAudioParamCreated(eventMatcher?: (params: Protocol.WebAudio.AudioParamCreatedEvent) => boolean): void;
|
4228
|
+
|
4229
|
+
/**
|
4230
|
+
* Notifies that an existing AudioParam has been destroyed.
|
4231
|
+
*/
|
4232
|
+
onAudioParamWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent) => void): void;
|
4233
|
+
offAudioParamWillBeDestroyed(listener: (params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent) => void): void;
|
4234
|
+
onceAudioParamWillBeDestroyed(eventMatcher?: (params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent) => boolean): void;
|
4235
|
+
|
4236
|
+
/**
|
4237
|
+
* Notifies that two AudioNodes are connected.
|
4238
|
+
*/
|
4239
|
+
onNodesConnected(listener: (params: Protocol.WebAudio.NodesConnectedEvent) => void): void;
|
4240
|
+
offNodesConnected(listener: (params: Protocol.WebAudio.NodesConnectedEvent) => void): void;
|
4241
|
+
onceNodesConnected(eventMatcher?: (params: Protocol.WebAudio.NodesConnectedEvent) => boolean): void;
|
4242
|
+
|
4243
|
+
/**
|
4244
|
+
* Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
|
4245
|
+
*/
|
4246
|
+
onNodesDisconnected(listener: (params: Protocol.WebAudio.NodesDisconnectedEvent) => void): void;
|
4247
|
+
offNodesDisconnected(listener: (params: Protocol.WebAudio.NodesDisconnectedEvent) => void): void;
|
4248
|
+
onceNodesDisconnected(eventMatcher?: (params: Protocol.WebAudio.NodesDisconnectedEvent) => boolean): void;
|
4249
|
+
|
4250
|
+
/**
|
4251
|
+
* Notifies that an AudioNode is connected to an AudioParam.
|
4252
|
+
*/
|
4253
|
+
onNodeParamConnected(listener: (params: Protocol.WebAudio.NodeParamConnectedEvent) => void): void;
|
4254
|
+
offNodeParamConnected(listener: (params: Protocol.WebAudio.NodeParamConnectedEvent) => void): void;
|
4255
|
+
onceNodeParamConnected(eventMatcher?: (params: Protocol.WebAudio.NodeParamConnectedEvent) => boolean): void;
|
4256
|
+
|
4257
|
+
/**
|
4258
|
+
* Notifies that an AudioNode is disconnected to an AudioParam.
|
4259
|
+
*/
|
4260
|
+
onNodeParamDisconnected(listener: (params: Protocol.WebAudio.NodeParamDisconnectedEvent) => void): void;
|
4261
|
+
offNodeParamDisconnected(listener: (params: Protocol.WebAudio.NodeParamDisconnectedEvent) => void): void;
|
4262
|
+
onceNodeParamDisconnected(eventMatcher?: (params: Protocol.WebAudio.NodeParamDisconnectedEvent) => boolean): void;
|
4263
|
+
|
4264
|
+
}
|
4265
|
+
|
4266
|
+
export interface WebAuthnApi {
|
4267
|
+
/**
|
4268
|
+
* Enable the WebAuthn domain and start intercepting credential storage and
|
4269
|
+
* retrieval with a virtual authenticator.
|
4270
|
+
*/
|
4271
|
+
enable(params: Protocol.WebAuthn.EnableRequest): Promise<void>;
|
4272
|
+
|
4273
|
+
/**
|
4274
|
+
* Disable the WebAuthn domain.
|
4275
|
+
*/
|
4276
|
+
disable(): Promise<void>;
|
4277
|
+
|
4278
|
+
/**
|
4279
|
+
* Creates and adds a virtual authenticator.
|
4280
|
+
*/
|
4281
|
+
addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest): Promise<Protocol.WebAuthn.AddVirtualAuthenticatorResponse>;
|
4282
|
+
|
4283
|
+
/**
|
4284
|
+
* Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
|
4285
|
+
*/
|
4286
|
+
setResponseOverrideBits(params: Protocol.WebAuthn.SetResponseOverrideBitsRequest): Promise<void>;
|
4287
|
+
|
4288
|
+
/**
|
4289
|
+
* Removes the given authenticator.
|
4290
|
+
*/
|
4291
|
+
removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest): Promise<void>;
|
4292
|
+
|
4293
|
+
/**
|
4294
|
+
* Adds the credential to the specified authenticator.
|
4295
|
+
*/
|
4296
|
+
addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise<void>;
|
4297
|
+
|
4298
|
+
/**
|
4299
|
+
* Returns a single credential stored in the given virtual authenticator that
|
4300
|
+
* matches the credential ID.
|
4301
|
+
*/
|
4302
|
+
getCredential(params: Protocol.WebAuthn.GetCredentialRequest): Promise<Protocol.WebAuthn.GetCredentialResponse>;
|
4303
|
+
|
4304
|
+
/**
|
4305
|
+
* Returns all the credentials stored in the given virtual authenticator.
|
4306
|
+
*/
|
4307
|
+
getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest): Promise<Protocol.WebAuthn.GetCredentialsResponse>;
|
4308
|
+
|
4309
|
+
/**
|
4310
|
+
* Removes a credential from the authenticator.
|
4311
|
+
*/
|
4312
|
+
removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest): Promise<void>;
|
4313
|
+
|
4314
|
+
/**
|
4315
|
+
* Clears all the credentials from the specified device.
|
4316
|
+
*/
|
4317
|
+
clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest): Promise<void>;
|
4318
|
+
|
4319
|
+
/**
|
4320
|
+
* Sets whether User Verification succeeds or fails for an authenticator.
|
4321
|
+
* The default is true.
|
4322
|
+
*/
|
4323
|
+
setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest): Promise<void>;
|
4324
|
+
|
4325
|
+
/**
|
4326
|
+
* Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
|
4327
|
+
* The default is true.
|
4328
|
+
*/
|
4329
|
+
setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest): Promise<void>;
|
4330
|
+
|
4331
|
+
/**
|
4332
|
+
* Triggered when a credential is added to an authenticator.
|
4333
|
+
*/
|
4334
|
+
onCredentialAdded(listener: (params: Protocol.WebAuthn.CredentialAddedEvent) => void): void;
|
4335
|
+
offCredentialAdded(listener: (params: Protocol.WebAuthn.CredentialAddedEvent) => void): void;
|
4336
|
+
onceCredentialAdded(eventMatcher?: (params: Protocol.WebAuthn.CredentialAddedEvent) => boolean): void;
|
4337
|
+
|
4338
|
+
/**
|
4339
|
+
* Triggered when a credential is used in a webauthn assertion.
|
4340
|
+
*/
|
4341
|
+
onCredentialAsserted(listener: (params: Protocol.WebAuthn.CredentialAssertedEvent) => void): void;
|
4342
|
+
offCredentialAsserted(listener: (params: Protocol.WebAuthn.CredentialAssertedEvent) => void): void;
|
4343
|
+
onceCredentialAsserted(eventMatcher?: (params: Protocol.WebAuthn.CredentialAssertedEvent) => boolean): void;
|
4344
|
+
|
4345
|
+
}
|
4346
|
+
|
4347
|
+
export interface MediaApi {
|
4348
|
+
/**
|
4349
|
+
* Enables the Media domain
|
4350
|
+
*/
|
4351
|
+
enable(): Promise<void>;
|
4352
|
+
|
4353
|
+
/**
|
4354
|
+
* Disables the Media domain.
|
4355
|
+
*/
|
4356
|
+
disable(): Promise<void>;
|
4357
|
+
|
4358
|
+
/**
|
4359
|
+
* This can be called multiple times, and can be used to set / override /
|
4360
|
+
* remove player properties. A null propValue indicates removal.
|
4361
|
+
*/
|
4362
|
+
onPlayerPropertiesChanged(listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
|
4363
|
+
offPlayerPropertiesChanged(listener: (params: Protocol.Media.PlayerPropertiesChangedEvent) => void): void;
|
4364
|
+
oncePlayerPropertiesChanged(eventMatcher?: (params: Protocol.Media.PlayerPropertiesChangedEvent) => boolean): void;
|
4365
|
+
|
4366
|
+
/**
|
4367
|
+
* Send events as a list, allowing them to be batched on the browser for less
|
4368
|
+
* congestion. If batched, events must ALWAYS be in chronological order.
|
4369
|
+
*/
|
4370
|
+
onPlayerEventsAdded(listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
|
4371
|
+
offPlayerEventsAdded(listener: (params: Protocol.Media.PlayerEventsAddedEvent) => void): void;
|
4372
|
+
oncePlayerEventsAdded(eventMatcher?: (params: Protocol.Media.PlayerEventsAddedEvent) => boolean): void;
|
4373
|
+
|
4374
|
+
/**
|
4375
|
+
* Send a list of any messages that need to be delivered.
|
4376
|
+
*/
|
4377
|
+
onPlayerMessagesLogged(listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
|
4378
|
+
offPlayerMessagesLogged(listener: (params: Protocol.Media.PlayerMessagesLoggedEvent) => void): void;
|
4379
|
+
oncePlayerMessagesLogged(eventMatcher?: (params: Protocol.Media.PlayerMessagesLoggedEvent) => boolean): void;
|
4380
|
+
|
4381
|
+
/**
|
4382
|
+
* Send a list of any errors that need to be delivered.
|
4383
|
+
*/
|
4384
|
+
onPlayerErrorsRaised(listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
|
4385
|
+
offPlayerErrorsRaised(listener: (params: Protocol.Media.PlayerErrorsRaisedEvent) => void): void;
|
4386
|
+
oncePlayerErrorsRaised(eventMatcher?: (params: Protocol.Media.PlayerErrorsRaisedEvent) => boolean): void;
|
4387
|
+
|
4388
|
+
/**
|
4389
|
+
* Called whenever a player is created, or when a new agent joins and receives
|
4390
|
+
* a list of active players. If an agent is restored, it will receive the full
|
4391
|
+
* list of player ids and all events again.
|
4392
|
+
*/
|
4393
|
+
onPlayersCreated(listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
|
4394
|
+
offPlayersCreated(listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
|
4395
|
+
oncePlayersCreated(eventMatcher?: (params: Protocol.Media.PlayersCreatedEvent) => boolean): void;
|
4396
|
+
|
4397
|
+
}
|
4398
|
+
|
4399
|
+
export interface DeviceAccessApi {
|
4400
|
+
/**
|
4401
|
+
* Enable events in this domain.
|
4402
|
+
*/
|
4403
|
+
enable(): Promise<void>;
|
4404
|
+
|
4405
|
+
/**
|
4406
|
+
* Disable events in this domain.
|
4407
|
+
*/
|
4408
|
+
disable(): Promise<void>;
|
4409
|
+
|
4410
|
+
/**
|
4411
|
+
* Select a device in response to a DeviceAccess.deviceRequestPrompted event.
|
4412
|
+
*/
|
4413
|
+
selectPrompt(params: Protocol.DeviceAccess.SelectPromptRequest): Promise<void>;
|
4414
|
+
|
4415
|
+
/**
|
4416
|
+
* Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
|
4417
|
+
*/
|
4418
|
+
cancelPrompt(params: Protocol.DeviceAccess.CancelPromptRequest): Promise<void>;
|
4419
|
+
|
4420
|
+
/**
|
4421
|
+
* A device request opened a user prompt to select a device. Respond with the
|
4422
|
+
* selectPrompt or cancelPrompt command.
|
4423
|
+
*/
|
4424
|
+
onDeviceRequestPrompted(listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
|
4425
|
+
offDeviceRequestPrompted(listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
|
4426
|
+
onceDeviceRequestPrompted(eventMatcher?: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => boolean): void;
|
4427
|
+
|
4428
|
+
}
|
4429
|
+
|
4430
|
+
export interface PreloadApi {
|
4431
|
+
enable(): Promise<void>;
|
4432
|
+
|
4433
|
+
disable(): Promise<void>;
|
4434
|
+
|
4435
|
+
/**
|
4436
|
+
* Upsert. Currently, it is only emitted when a rule set added.
|
4437
|
+
*/
|
4438
|
+
onRuleSetUpdated(listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
|
4439
|
+
offRuleSetUpdated(listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
|
4440
|
+
onceRuleSetUpdated(eventMatcher?: (params: Protocol.Preload.RuleSetUpdatedEvent) => boolean): void;
|
4441
|
+
|
4442
|
+
onRuleSetRemoved(listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
|
4443
|
+
offRuleSetRemoved(listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
|
4444
|
+
onceRuleSetRemoved(eventMatcher?: (params: Protocol.Preload.RuleSetRemovedEvent) => boolean): void;
|
4445
|
+
|
4446
|
+
/**
|
4447
|
+
* Fired when a preload enabled state is updated.
|
4448
|
+
*/
|
4449
|
+
onPreloadEnabledStateUpdated(listener: (params: Protocol.Preload.PreloadEnabledStateUpdatedEvent) => void): void;
|
4450
|
+
offPreloadEnabledStateUpdated(listener: (params: Protocol.Preload.PreloadEnabledStateUpdatedEvent) => void): void;
|
4451
|
+
oncePreloadEnabledStateUpdated(eventMatcher?: (params: Protocol.Preload.PreloadEnabledStateUpdatedEvent) => boolean): void;
|
4452
|
+
|
4453
|
+
/**
|
4454
|
+
* Fired when a prefetch attempt is updated.
|
4455
|
+
*/
|
4456
|
+
onPrefetchStatusUpdated(listener: (params: Protocol.Preload.PrefetchStatusUpdatedEvent) => void): void;
|
4457
|
+
offPrefetchStatusUpdated(listener: (params: Protocol.Preload.PrefetchStatusUpdatedEvent) => void): void;
|
4458
|
+
oncePrefetchStatusUpdated(eventMatcher?: (params: Protocol.Preload.PrefetchStatusUpdatedEvent) => boolean): void;
|
4459
|
+
|
4460
|
+
/**
|
4461
|
+
* Fired when a prerender attempt is updated.
|
4462
|
+
*/
|
4463
|
+
onPrerenderStatusUpdated(listener: (params: Protocol.Preload.PrerenderStatusUpdatedEvent) => void): void;
|
4464
|
+
offPrerenderStatusUpdated(listener: (params: Protocol.Preload.PrerenderStatusUpdatedEvent) => void): void;
|
4465
|
+
oncePrerenderStatusUpdated(eventMatcher?: (params: Protocol.Preload.PrerenderStatusUpdatedEvent) => boolean): void;
|
4466
|
+
|
4467
|
+
/**
|
4468
|
+
* Send a list of sources for all preloading attempts in a document.
|
4469
|
+
*/
|
4470
|
+
onPreloadingAttemptSourcesUpdated(listener: (params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent) => void): void;
|
4471
|
+
offPreloadingAttemptSourcesUpdated(listener: (params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent) => void): void;
|
4472
|
+
oncePreloadingAttemptSourcesUpdated(eventMatcher?: (params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent) => boolean): void;
|
4473
|
+
|
4474
|
+
}
|
4475
|
+
|
4476
|
+
export interface FedCmApi {
|
4477
|
+
enable(params: Protocol.FedCm.EnableRequest): Promise<void>;
|
4478
|
+
|
4479
|
+
disable(): Promise<void>;
|
4480
|
+
|
4481
|
+
selectAccount(params: Protocol.FedCm.SelectAccountRequest): Promise<void>;
|
4482
|
+
|
4483
|
+
clickDialogButton(params: Protocol.FedCm.ClickDialogButtonRequest): Promise<void>;
|
4484
|
+
|
4485
|
+
dismissDialog(params: Protocol.FedCm.DismissDialogRequest): Promise<void>;
|
4486
|
+
|
4487
|
+
/**
|
4488
|
+
* Resets the cooldown time, if any, to allow the next FedCM call to show
|
4489
|
+
* a dialog even if one was recently dismissed by the user.
|
4490
|
+
*/
|
4491
|
+
resetCooldown(): Promise<void>;
|
4492
|
+
|
4493
|
+
onDialogShown(listener: (params: Protocol.FedCm.DialogShownEvent) => void): void;
|
4494
|
+
offDialogShown(listener: (params: Protocol.FedCm.DialogShownEvent) => void): void;
|
4495
|
+
onceDialogShown(eventMatcher?: (params: Protocol.FedCm.DialogShownEvent) => boolean): void;
|
4496
|
+
|
4497
|
+
/**
|
4498
|
+
* Triggered when a dialog is closed, either by user action, JS abort,
|
4499
|
+
* or a command below.
|
4500
|
+
*/
|
4501
|
+
onDialogClosed(listener: (params: Protocol.FedCm.DialogClosedEvent) => void): void;
|
4502
|
+
offDialogClosed(listener: (params: Protocol.FedCm.DialogClosedEvent) => void): void;
|
4503
|
+
onceDialogClosed(eventMatcher?: (params: Protocol.FedCm.DialogClosedEvent) => boolean): void;
|
4504
|
+
|
4505
|
+
}
|
4506
|
+
}
|
4507
|
+
|
4508
|
+
export default ProtocolTestsProxyApi;
|