blob: 68a476a9c70693baaf168b18df13a0136f994958 [file] [log] [blame]
Jack Franklin82978692020-03-12 14:06:421// Copyright (c) 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5/**
6 * This file is auto-generated, do not edit manually. *
7 * Re-generate with: npm run generate-protocol-resources.
8 */
9
10
11/**
12 * API generated from Protocol commands and events.
13 */
14declare namespace ProtocolProxyApi {
Tim van der Lippefcf81792020-04-27 13:48:4315 export interface ProtocolApi {
Jack Franklin82978692020-03-12 14:06:4216 Accessibility: AccessibilityApi;
17
18 Animation: AnimationApi;
19
20 ApplicationCache: ApplicationCacheApi;
21
22 Audits: AuditsApi;
23
24 BackgroundService: BackgroundServiceApi;
25
26 Browser: BrowserApi;
27
28 CSS: CSSApi;
29
30 CacheStorage: CacheStorageApi;
31
32 Cast: CastApi;
33
34 DOM: DOMApi;
35
36 DOMDebugger: DOMDebuggerApi;
37
38 DOMSnapshot: DOMSnapshotApi;
39
40 DOMStorage: DOMStorageApi;
41
42 Database: DatabaseApi;
43
44 DeviceOrientation: DeviceOrientationApi;
45
46 Emulation: EmulationApi;
47
48 HeadlessExperimental: HeadlessExperimentalApi;
49
50 IO: IOApi;
51
52 IndexedDB: IndexedDBApi;
53
54 Input: InputApi;
55
56 Inspector: InspectorApi;
57
58 LayerTree: LayerTreeApi;
59
60 Log: LogApi;
61
62 Memory: MemoryApi;
63
64 Network: NetworkApi;
65
66 Overlay: OverlayApi;
67
68 Page: PageApi;
69
70 Performance: PerformanceApi;
71
Simon Zündccdfc9b2021-01-11 12:27:1472 PerformanceTimeline: PerformanceTimelineApi;
73
Jack Franklin82978692020-03-12 14:06:4274 Security: SecurityApi;
75
76 ServiceWorker: ServiceWorkerApi;
77
78 Storage: StorageApi;
79
80 SystemInfo: SystemInfoApi;
81
82 Target: TargetApi;
83
84 Tethering: TetheringApi;
85
86 Tracing: TracingApi;
87
88 Fetch: FetchApi;
89
90 WebAudio: WebAudioApi;
91
92 WebAuthn: WebAuthnApi;
93
94 Media: MediaApi;
95
Jack Franklin82978692020-03-12 14:06:4296 Debugger: DebuggerApi;
97
98 HeapProfiler: HeapProfilerApi;
99
100 Profiler: ProfilerApi;
101
102 Runtime: RuntimeApi;
103
104 Schema: SchemaApi;
105 }
106
107
108 export interface AccessibilityApi {
109 /**
110 * Disables the accessibility domain.
111 */
Tim van der Lippe48335362020-05-12 14:34:15112 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42113
114 /**
115 * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
116 * This turns on accessibility for the page, which can impact performance until accessibility is disabled.
117 */
Tim van der Lippe48335362020-05-12 14:34:15118 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42119
120 /**
121 * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
122 */
Tim van der Lippe96de6062020-04-27 16:30:50123 invoke_getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest):
Jack Franklin82978692020-03-12 14:06:42124 Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
125
126 /**
Yoichi Osato2d4ece52020-12-08 04:47:27127 * Fetches the entire accessibility tree for the root Document
Jack Franklin82978692020-03-12 14:06:42128 */
Yoichi Osato2d4ece52020-12-08 04:47:27129 invoke_getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest):
130 Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
131
132 /**
133 * Fetches a particular accessibility node by AXNodeId.
134 * Requires `enable()` to have been called previously.
135 */
136 invoke_getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest):
137 Promise<Protocol.Accessibility.GetChildAXNodesResponse>;
Wolfgang Beyer5893cf52020-10-01 07:37:31138
139 /**
140 * Query a DOM node's accessibility subtree for accessible name and role.
141 * This command computes the name and role for all nodes in the subtree, including those that are
142 * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
143 * node is specified, or the DOM node does not exist, the command returns an error. If neither
144 * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
145 */
146 invoke_queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest):
147 Promise<Protocol.Accessibility.QueryAXTreeResponse>;
Jack Franklin82978692020-03-12 14:06:42148 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59149 export interface AccessibilityDispatcher {}
Jack Franklin82978692020-03-12 14:06:42150
151 export interface AnimationApi {
152 /**
153 * Disables animation domain notifications.
154 */
Tim van der Lippe48335362020-05-12 14:34:15155 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42156
157 /**
158 * Enables animation domain notifications.
159 */
Tim van der Lippe48335362020-05-12 14:34:15160 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42161
162 /**
163 * Returns the current time of the an animation.
164 */
Tim van der Lippe96de6062020-04-27 16:30:50165 invoke_getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest):
Jack Franklin82978692020-03-12 14:06:42166 Promise<Protocol.Animation.GetCurrentTimeResponse>;
167
168 /**
169 * Gets the playback rate of the document timeline.
170 */
Tim van der Lippe96de6062020-04-27 16:30:50171 invoke_getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
Jack Franklin82978692020-03-12 14:06:42172
173 /**
174 * Releases a set of animations to no longer be manipulated.
175 */
Tim van der Lippe48335362020-05-12 14:34:15176 invoke_releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest):
177 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42178
179 /**
180 * Gets the remote object of the Animation.
181 */
Tim van der Lippe96de6062020-04-27 16:30:50182 invoke_resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest):
Jack Franklin82978692020-03-12 14:06:42183 Promise<Protocol.Animation.ResolveAnimationResponse>;
184
185 /**
186 * Seek a set of animations to a particular time within each animation.
187 */
Tim van der Lippe48335362020-05-12 14:34:15188 invoke_seekAnimations(params: Protocol.Animation.SeekAnimationsRequest):
189 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42190
191 /**
192 * Sets the paused state of a set of animations.
193 */
Tim van der Lippe48335362020-05-12 14:34:15194 invoke_setPaused(params: Protocol.Animation.SetPausedRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42195
196 /**
197 * Sets the playback rate of the document timeline.
198 */
Tim van der Lippe48335362020-05-12 14:34:15199 invoke_setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest):
200 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42201
202 /**
203 * Sets the timing of an animation node.
204 */
Tim van der Lippe48335362020-05-12 14:34:15205 invoke_setTiming(params: Protocol.Animation.SetTimingRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28206 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59207 export interface AnimationDispatcher {
Jack Franklin82978692020-03-12 14:06:42208 /**
209 * Event for when an animation has been cancelled.
210 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28211 animationCanceled(params: Protocol.Animation.AnimationCanceledEvent): void;
Jack Franklin82978692020-03-12 14:06:42212
213 /**
214 * Event for each animation that has been created.
215 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28216 animationCreated(params: Protocol.Animation.AnimationCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42217
218 /**
219 * Event for animation that has been started.
220 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28221 animationStarted(params: Protocol.Animation.AnimationStartedEvent): void;
Jack Franklin82978692020-03-12 14:06:42222 }
223
224 export interface ApplicationCacheApi {
225 /**
226 * Enables application cache domain notifications.
227 */
Tim van der Lippe48335362020-05-12 14:34:15228 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42229
230 /**
231 * Returns relevant application cache data for the document in given frame.
232 */
Tim van der Lippe96de6062020-04-27 16:30:50233 invoke_getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest):
Jack Franklin82978692020-03-12 14:06:42234 Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
235
236 /**
237 * Returns array of frame identifiers with manifest urls for each frame containing a document
238 * associated with some application cache.
239 */
Tim van der Lippe96de6062020-04-27 16:30:50240 invoke_getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
Jack Franklin82978692020-03-12 14:06:42241
242 /**
243 * Returns manifest URL for document in the given frame.
244 */
Tim van der Lippe96de6062020-04-27 16:30:50245 invoke_getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest):
Jack Franklin82978692020-03-12 14:06:42246 Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28247 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59248 export interface ApplicationCacheDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:28249 applicationCacheStatusUpdated(params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42250
Tim van der Lipped1c8d6c2020-05-12 13:56:28251 networkStateUpdated(params: Protocol.ApplicationCache.NetworkStateUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42252 }
253
254 export interface AuditsApi {
255 /**
256 * Returns the response body and size if it were re-encoded with the specified settings. Only
257 * applies to images.
258 */
Tim van der Lippe96de6062020-04-27 16:30:50259 invoke_getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest):
Jack Franklin82978692020-03-12 14:06:42260 Promise<Protocol.Audits.GetEncodedResponseResponse>;
261
262 /**
263 * Disables issues domain, prevents further issues from being reported to the client.
264 */
Tim van der Lippe48335362020-05-12 14:34:15265 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42266
267 /**
268 * Enables issues domain, sends the issues collected so far to the client by means of the
269 * `issueAdded` event.
270 */
Tim van der Lippe48335362020-05-12 14:34:15271 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Alex Rudenko268a0e22021-02-01 10:27:34272
273 /**
274 * Runs the contrast check for the target page. Found issues are reported
275 * using Audits.issueAdded event.
276 */
Simon Zünd91cd7292021-03-10 07:21:51277 invoke_checkContrast(params: Protocol.Audits.CheckContrastRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28278 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59279 export interface AuditsDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:28280 issueAdded(params: Protocol.Audits.IssueAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:42281 }
282
283 export interface BackgroundServiceApi {
284 /**
285 * Enables event updates for the service.
286 */
Tim van der Lippe48335362020-05-12 14:34:15287 invoke_startObserving(params: Protocol.BackgroundService.StartObservingRequest):
288 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42289
290 /**
291 * Disables event updates for the service.
292 */
Tim van der Lippe48335362020-05-12 14:34:15293 invoke_stopObserving(params: Protocol.BackgroundService.StopObservingRequest):
294 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42295
296 /**
297 * Set the recording state for the service.
298 */
Tim van der Lippe48335362020-05-12 14:34:15299 invoke_setRecording(params: Protocol.BackgroundService.SetRecordingRequest):
300 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42301
302 /**
303 * Clears all stored data for the service.
304 */
Tim van der Lippe48335362020-05-12 14:34:15305 invoke_clearEvents(params: Protocol.BackgroundService.ClearEventsRequest):
306 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28307 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59308 export interface BackgroundServiceDispatcher {
Jack Franklin82978692020-03-12 14:06:42309 /**
310 * Called when the recording state for the service has been updated.
311 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28312 recordingStateChanged(params: Protocol.BackgroundService.RecordingStateChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:42313
314 /**
315 * Called with all existing backgroundServiceEvents when enabled, and all new
316 * events afterwards if enabled and recording.
317 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28318 backgroundServiceEventReceived(params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:42319 }
320
321 export interface BrowserApi {
322 /**
323 * Set permission settings for given origin.
324 */
Tim van der Lippe48335362020-05-12 14:34:15325 invoke_setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42326
327 /**
328 * Grant specific permissions to the given origin and reject all others.
329 */
Tim van der Lippe48335362020-05-12 14:34:15330 invoke_grantPermissions(params: Protocol.Browser.GrantPermissionsRequest):
331 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42332
333 /**
334 * Reset all permission management for all origins.
335 */
Tim van der Lippe48335362020-05-12 14:34:15336 invoke_resetPermissions(params: Protocol.Browser.ResetPermissionsRequest):
337 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42338
339 /**
Wolfgang Beyer209a6442020-04-23 10:59:43340 * Set the behavior when downloading a file.
341 */
Tim van der Lippe48335362020-05-12 14:34:15342 invoke_setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest):
343 Promise<Protocol.ProtocolResponseWithError>;
Wolfgang Beyer209a6442020-04-23 10:59:43344
345 /**
Simon Zünd91cd7292021-03-10 07:21:51346 * Cancel a download if in progress
347 */
348 invoke_cancelDownload(params: Protocol.Browser.CancelDownloadRequest): Promise<Protocol.ProtocolResponseWithError>;
349
350 /**
Jack Franklin82978692020-03-12 14:06:42351 * Close browser gracefully.
352 */
Tim van der Lippe48335362020-05-12 14:34:15353 invoke_close(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42354
355 /**
356 * Crashes browser on the main thread.
357 */
Tim van der Lippe48335362020-05-12 14:34:15358 invoke_crash(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42359
360 /**
361 * Crashes GPU process.
362 */
Tim van der Lippe48335362020-05-12 14:34:15363 invoke_crashGpuProcess(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42364
365 /**
366 * Returns version information.
367 */
Tim van der Lippe96de6062020-04-27 16:30:50368 invoke_getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
Jack Franklin82978692020-03-12 14:06:42369
370 /**
371 * Returns the command line switches for the browser process if, and only if
372 * --enable-automation is on the commandline.
373 */
Tim van der Lippe96de6062020-04-27 16:30:50374 invoke_getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
Jack Franklin82978692020-03-12 14:06:42375
376 /**
377 * Get Chrome histograms.
378 */
Tim van der Lippe96de6062020-04-27 16:30:50379 invoke_getHistograms(params: Protocol.Browser.GetHistogramsRequest):
380 Promise<Protocol.Browser.GetHistogramsResponse>;
Jack Franklin82978692020-03-12 14:06:42381
382 /**
383 * Get a Chrome histogram by name.
384 */
Tim van der Lippe96de6062020-04-27 16:30:50385 invoke_getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
Jack Franklin82978692020-03-12 14:06:42386
387 /**
388 * Get position and size of the browser window.
389 */
Tim van der Lippe96de6062020-04-27 16:30:50390 invoke_getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest):
391 Promise<Protocol.Browser.GetWindowBoundsResponse>;
Jack Franklin82978692020-03-12 14:06:42392
393 /**
394 * Get the browser window that contains the devtools target.
395 */
Tim van der Lippe96de6062020-04-27 16:30:50396 invoke_getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest):
Jack Franklin82978692020-03-12 14:06:42397 Promise<Protocol.Browser.GetWindowForTargetResponse>;
398
399 /**
400 * Set position and/or size of the browser window.
401 */
Tim van der Lippe48335362020-05-12 14:34:15402 invoke_setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest):
403 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42404
405 /**
406 * Set dock tile details, platform-specific.
407 */
Tim van der Lippe48335362020-05-12 14:34:15408 invoke_setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<Protocol.ProtocolResponseWithError>;
Songtao Xia160e3842020-10-25 20:39:39409
410 /**
411 * Invoke custom browser commands used by telemetry.
412 */
413 invoke_executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest):
414 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42415 }
Alex Rudenko16c517d2021-04-12 07:55:12416 export interface BrowserDispatcher {
417 /**
418 * Fired when page is about to start a download.
419 */
420 downloadWillBegin(params: Protocol.Browser.DownloadWillBeginEvent): void;
421
422 /**
423 * Fired when download makes progress. Last call has |done| == true.
424 */
425 downloadProgress(params: Protocol.Browser.DownloadProgressEvent): void;
426 }
Jack Franklin82978692020-03-12 14:06:42427
428 export interface CSSApi {
429 /**
430 * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
431 * position specified by `location`.
432 */
Tim van der Lippe96de6062020-04-27 16:30:50433 invoke_addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
Jack Franklin82978692020-03-12 14:06:42434
435 /**
436 * Returns all class names from specified stylesheet.
437 */
Tim van der Lippe96de6062020-04-27 16:30:50438 invoke_collectClassNames(params: Protocol.CSS.CollectClassNamesRequest):
439 Promise<Protocol.CSS.CollectClassNamesResponse>;
Jack Franklin82978692020-03-12 14:06:42440
441 /**
442 * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
443 */
Tim van der Lippe96de6062020-04-27 16:30:50444 invoke_createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest):
445 Promise<Protocol.CSS.CreateStyleSheetResponse>;
Jack Franklin82978692020-03-12 14:06:42446
447 /**
448 * Disables the CSS agent for the given page.
449 */
Tim van der Lippe48335362020-05-12 14:34:15450 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42451
452 /**
453 * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
454 * enabled until the result of this command is received.
455 */
Tim van der Lippe48335362020-05-12 14:34:15456 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42457
458 /**
459 * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
460 * the browser.
461 */
Tim van der Lippe48335362020-05-12 14:34:15462 invoke_forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42463
Tim van der Lippe96de6062020-04-27 16:30:50464 invoke_getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest):
Jack Franklin82978692020-03-12 14:06:42465 Promise<Protocol.CSS.GetBackgroundColorsResponse>;
466
467 /**
468 * Returns the computed style for a DOM node identified by `nodeId`.
469 */
Tim van der Lippe96de6062020-04-27 16:30:50470 invoke_getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest):
Jack Franklin82978692020-03-12 14:06:42471 Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
472
473 /**
474 * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
475 * attributes) for a DOM node identified by `nodeId`.
476 */
Tim van der Lippe96de6062020-04-27 16:30:50477 invoke_getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest):
Jack Franklin82978692020-03-12 14:06:42478 Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
479
480 /**
481 * Returns requested styles for a DOM node identified by `nodeId`.
482 */
Tim van der Lippe96de6062020-04-27 16:30:50483 invoke_getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest):
Jack Franklin82978692020-03-12 14:06:42484 Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
485
486 /**
487 * Returns all media queries parsed by the rendering engine.
488 */
Tim van der Lippe96de6062020-04-27 16:30:50489 invoke_getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
Jack Franklin82978692020-03-12 14:06:42490
491 /**
492 * Requests information about platform fonts which we used to render child TextNodes in the given
493 * node.
494 */
Tim van der Lippe96de6062020-04-27 16:30:50495 invoke_getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest):
Jack Franklin82978692020-03-12 14:06:42496 Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
497
498 /**
499 * Returns the current textual content for a stylesheet.
500 */
Tim van der Lippe96de6062020-04-27 16:30:50501 invoke_getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest):
502 Promise<Protocol.CSS.GetStyleSheetTextResponse>;
Jack Franklin82978692020-03-12 14:06:42503
504 /**
Changhao Han16150ea2020-08-04 11:26:12505 * Starts tracking the given computed styles for updates. The specified array of properties
506 * replaces the one previously specified. Pass empty array to disable tracking.
507 * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
508 * The changes to computed style properties are only tracked for nodes pushed to the front-end
509 * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
510 * to the front-end, no updates will be issued for the node.
511 */
512 invoke_trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest):
513 Promise<Protocol.ProtocolResponseWithError>;
514
515 /**
516 * Polls the next batch of computed style updates.
517 */
518 invoke_takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
519
520 /**
Jack Franklin82978692020-03-12 14:06:42521 * Find a rule with the given active property for the given node and set the new value for this
522 * property
523 */
Tim van der Lippe96de6062020-04-27 16:30:50524 invoke_setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest):
Tim van der Lippe48335362020-05-12 14:34:15525 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42526
527 /**
528 * Modifies the keyframe rule key text.
529 */
Tim van der Lippe96de6062020-04-27 16:30:50530 invoke_setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
Jack Franklin82978692020-03-12 14:06:42531
532 /**
533 * Modifies the rule selector.
534 */
Tim van der Lippe96de6062020-04-27 16:30:50535 invoke_setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
Jack Franklin82978692020-03-12 14:06:42536
537 /**
538 * Modifies the rule selector.
539 */
Tim van der Lippe96de6062020-04-27 16:30:50540 invoke_setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
Jack Franklin82978692020-03-12 14:06:42541
542 /**
543 * Sets the new stylesheet text.
544 */
Tim van der Lippe96de6062020-04-27 16:30:50545 invoke_setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest):
546 Promise<Protocol.CSS.SetStyleSheetTextResponse>;
Jack Franklin82978692020-03-12 14:06:42547
548 /**
549 * Applies specified style edits one after another in the given order.
550 */
Tim van der Lippe96de6062020-04-27 16:30:50551 invoke_setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
Jack Franklin82978692020-03-12 14:06:42552
553 /**
554 * Enables the selector recording.
555 */
Tim van der Lippe48335362020-05-12 14:34:15556 invoke_startRuleUsageTracking(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42557
558 /**
559 * Stop tracking rule usage and return the list of rules that were used since last call to
560 * `takeCoverageDelta` (or since start of coverage instrumentation)
561 */
Tim van der Lippe96de6062020-04-27 16:30:50562 invoke_stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
Jack Franklin82978692020-03-12 14:06:42563
564 /**
565 * Obtain list of rules that became used since last call to this method (or since start of coverage
566 * instrumentation)
567 */
Tim van der Lippe96de6062020-04-27 16:30:50568 invoke_takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
Alex Rudenko94a6bdf2020-06-29 07:36:37569
570 /**
571 * Enables/disables rendering of local CSS fonts (enabled by default).
572 */
573 invoke_setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest):
574 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28575 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59576 export interface CSSDispatcher {
Jack Franklin82978692020-03-12 14:06:42577 /**
578 * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
579 * web font
580 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28581 fontsUpdated(params: Protocol.CSS.FontsUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42582
583 /**
584 * Fires whenever a MediaQuery result changes (for example, after a browser window has been
585 * resized.) The current implementation considers only viewport-dependent media features.
586 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28587 mediaQueryResultChanged(): void;
Jack Franklin82978692020-03-12 14:06:42588
589 /**
590 * Fired whenever an active document stylesheet is added.
591 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28592 styleSheetAdded(params: Protocol.CSS.StyleSheetAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:42593
594 /**
595 * Fired whenever a stylesheet is changed as a result of the client operation.
596 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28597 styleSheetChanged(params: Protocol.CSS.StyleSheetChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:42598
599 /**
600 * Fired whenever an active document stylesheet is removed.
601 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28602 styleSheetRemoved(params: Protocol.CSS.StyleSheetRemovedEvent): void;
Jack Franklin82978692020-03-12 14:06:42603 }
604
605 export interface CacheStorageApi {
606 /**
607 * Deletes a cache.
608 */
Tim van der Lippe48335362020-05-12 14:34:15609 invoke_deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42610
611 /**
612 * Deletes a cache entry.
613 */
Tim van der Lippe48335362020-05-12 14:34:15614 invoke_deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42615
616 /**
617 * Requests cache names.
618 */
Tim van der Lippe96de6062020-04-27 16:30:50619 invoke_requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest):
Jack Franklin82978692020-03-12 14:06:42620 Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
621
622 /**
623 * Fetches cache entry.
624 */
Tim van der Lippe96de6062020-04-27 16:30:50625 invoke_requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest):
Jack Franklin82978692020-03-12 14:06:42626 Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
627
628 /**
629 * Requests data from cache.
630 */
Tim van der Lippe96de6062020-04-27 16:30:50631 invoke_requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest):
Jack Franklin82978692020-03-12 14:06:42632 Promise<Protocol.CacheStorage.RequestEntriesResponse>;
633 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59634 export interface CacheStorageDispatcher {}
Jack Franklin82978692020-03-12 14:06:42635
636 export interface CastApi {
637 /**
638 * Starts observing for sinks that can be used for tab mirroring, and if set,
639 * sinks compatible with |presentationUrl| as well. When sinks are found, a
640 * |sinksUpdated| event is fired.
641 * Also starts observing for issue messages. When an issue is added or removed,
642 * an |issueUpdated| event is fired.
643 */
Tim van der Lippe48335362020-05-12 14:34:15644 invoke_enable(params: Protocol.Cast.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42645
646 /**
647 * Stops observing for sinks and issues.
648 */
Tim van der Lippe48335362020-05-12 14:34:15649 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42650
651 /**
652 * Sets a sink to be used when the web page requests the browser to choose a
653 * sink via Presentation API, Remote Playback API, or Cast SDK.
654 */
Tim van der Lippe48335362020-05-12 14:34:15655 invoke_setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42656
657 /**
658 * Starts mirroring the tab to the sink.
659 */
Tim van der Lippe48335362020-05-12 14:34:15660 invoke_startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest):
661 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42662
663 /**
664 * Stops the active Cast session on the sink.
665 */
Tim van der Lippe48335362020-05-12 14:34:15666 invoke_stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28667 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59668 export interface CastDispatcher {
Jack Franklin82978692020-03-12 14:06:42669 /**
670 * This is fired whenever the list of available sinks changes. A sink is a
671 * device or a software surface that you can cast to.
672 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28673 sinksUpdated(params: Protocol.Cast.SinksUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42674
675 /**
676 * This is fired whenever the outstanding issue/error message changes.
677 * |issueMessage| is empty if there is no issue.
678 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28679 issueUpdated(params: Protocol.Cast.IssueUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42680 }
681
682 export interface DOMApi {
683 /**
684 * Collects class names for the node with given id and all of it's child nodes.
685 */
Tim van der Lippe96de6062020-04-27 16:30:50686 invoke_collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest):
Jack Franklin82978692020-03-12 14:06:42687 Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
688
689 /**
690 * Creates a deep copy of the specified node and places it into the target container before the
691 * given anchor.
692 */
Tim van der Lippe96de6062020-04-27 16:30:50693 invoke_copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
Jack Franklin82978692020-03-12 14:06:42694
695 /**
696 * Describes node given its id, does not require domain to be enabled. Does not start tracking any
697 * objects, can be used for automation.
698 */
Tim van der Lippe96de6062020-04-27 16:30:50699 invoke_describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
Jack Franklin82978692020-03-12 14:06:42700
701 /**
702 * Scrolls the specified rect of the given node into view if not already visible.
703 * Note: exactly one between nodeId, backendNodeId and objectId should be passed
704 * to identify the node.
705 */
Tim van der Lippe48335362020-05-12 14:34:15706 invoke_scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest):
707 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42708
709 /**
710 * Disables DOM agent for the given page.
711 */
Tim van der Lippe48335362020-05-12 14:34:15712 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42713
714 /**
715 * Discards search results from the session with the given id. `getSearchResults` should no longer
716 * be called for that search.
717 */
Tim van der Lippe48335362020-05-12 14:34:15718 invoke_discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest):
719 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42720
721 /**
722 * Enables DOM agent for the given page.
723 */
Tim van der Lippe48335362020-05-12 14:34:15724 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42725
726 /**
727 * Focuses the given element.
728 */
Tim van der Lippe48335362020-05-12 14:34:15729 invoke_focus(params: Protocol.DOM.FocusRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42730
731 /**
732 * Returns attributes for the specified node.
733 */
Tim van der Lippe96de6062020-04-27 16:30:50734 invoke_getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
Jack Franklin82978692020-03-12 14:06:42735
736 /**
737 * Returns boxes for the given node.
738 */
Tim van der Lippe96de6062020-04-27 16:30:50739 invoke_getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
Jack Franklin82978692020-03-12 14:06:42740
741 /**
742 * Returns quads that describe node position on the page. This method
743 * might return multiple quads for inline nodes.
744 */
Tim van der Lippe96de6062020-04-27 16:30:50745 invoke_getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
Jack Franklin82978692020-03-12 14:06:42746
747 /**
748 * Returns the root DOM node (and optionally the subtree) to the caller.
749 */
Tim van der Lippe96de6062020-04-27 16:30:50750 invoke_getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
Jack Franklin82978692020-03-12 14:06:42751
752 /**
753 * Returns the root DOM node (and optionally the subtree) to the caller.
Wolfgang Beyer43f4ee32020-08-06 07:59:28754 * Deprecated, as it is not designed to work well with the rest of the DOM agent.
755 * Use DOMSnapshot.captureSnapshot instead.
Jack Franklin82978692020-03-12 14:06:42756 */
Tim van der Lippe96de6062020-04-27 16:30:50757 invoke_getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest):
Jack Franklin82978692020-03-12 14:06:42758 Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
759
760 /**
Alex Rudenko70bcd612020-08-11 11:55:23761 * Finds nodes with a given computed style in a subtree.
762 */
763 invoke_getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest):
764 Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
765
766 /**
Jack Franklin82978692020-03-12 14:06:42767 * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
768 * either returned or not.
769 */
Tim van der Lippe96de6062020-04-27 16:30:50770 invoke_getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest):
Jack Franklin82978692020-03-12 14:06:42771 Promise<Protocol.DOM.GetNodeForLocationResponse>;
772
773 /**
774 * Returns node's HTML markup.
775 */
Tim van der Lippe96de6062020-04-27 16:30:50776 invoke_getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
Jack Franklin82978692020-03-12 14:06:42777
778 /**
779 * Returns the id of the nearest ancestor that is a relayout boundary.
780 */
Tim van der Lippe96de6062020-04-27 16:30:50781 invoke_getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest):
Jack Franklin82978692020-03-12 14:06:42782 Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
783
784 /**
785 * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
786 * identifier.
787 */
Tim van der Lippe96de6062020-04-27 16:30:50788 invoke_getSearchResults(params: Protocol.DOM.GetSearchResultsRequest):
789 Promise<Protocol.DOM.GetSearchResultsResponse>;
Jack Franklin82978692020-03-12 14:06:42790
791 /**
792 * Hides any highlight.
793 */
Tim van der Lippe48335362020-05-12 14:34:15794 invoke_hideHighlight(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42795
796 /**
797 * Highlights DOM node.
798 */
Tim van der Lippe48335362020-05-12 14:34:15799 invoke_highlightNode(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42800
801 /**
802 * Highlights given rectangle.
803 */
Tim van der Lippe48335362020-05-12 14:34:15804 invoke_highlightRect(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42805
806 /**
807 * Marks last undoable state.
808 */
Tim van der Lippe48335362020-05-12 14:34:15809 invoke_markUndoableState(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42810
811 /**
812 * Moves node into the new container, places it before the given anchor.
813 */
Tim van der Lippe96de6062020-04-27 16:30:50814 invoke_moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
Jack Franklin82978692020-03-12 14:06:42815
816 /**
817 * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
818 * `cancelSearch` to end this search session.
819 */
Tim van der Lippe96de6062020-04-27 16:30:50820 invoke_performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
Jack Franklin82978692020-03-12 14:06:42821
822 /**
823 * Requests that the node is sent to the caller given its path. // FIXME, use XPath
824 */
Tim van der Lippe96de6062020-04-27 16:30:50825 invoke_pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest):
Jack Franklin82978692020-03-12 14:06:42826 Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
827
828 /**
829 * Requests that a batch of nodes is sent to the caller given their backend node ids.
830 */
Tim van der Lippe96de6062020-04-27 16:30:50831 invoke_pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest):
Jack Franklin82978692020-03-12 14:06:42832 Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
833
834 /**
835 * Executes `querySelector` on a given node.
836 */
Tim van der Lippe96de6062020-04-27 16:30:50837 invoke_querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
Jack Franklin82978692020-03-12 14:06:42838
839 /**
840 * Executes `querySelectorAll` on a given node.
841 */
Tim van der Lippe96de6062020-04-27 16:30:50842 invoke_querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest):
843 Promise<Protocol.DOM.QuerySelectorAllResponse>;
Jack Franklin82978692020-03-12 14:06:42844
845 /**
846 * Re-does the last undone action.
847 */
Tim van der Lippe48335362020-05-12 14:34:15848 invoke_redo(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42849
850 /**
851 * Removes attribute with given name from an element with given id.
852 */
Tim van der Lippe48335362020-05-12 14:34:15853 invoke_removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42854
855 /**
856 * Removes node with given id.
857 */
Tim van der Lippe48335362020-05-12 14:34:15858 invoke_removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42859
860 /**
861 * Requests that children of the node with given id are returned to the caller in form of
862 * `setChildNodes` events where not only immediate children are retrieved, but all children down to
863 * the specified depth.
864 */
Tim van der Lippe48335362020-05-12 14:34:15865 invoke_requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest):
866 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42867
868 /**
869 * Requests that the node is sent to the caller given the JavaScript node object reference. All
870 * nodes that form the path from the node to the root are also sent to the client as a series of
871 * `setChildNodes` notifications.
872 */
Tim van der Lippe96de6062020-04-27 16:30:50873 invoke_requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
Jack Franklin82978692020-03-12 14:06:42874
875 /**
876 * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
877 */
Tim van der Lippe96de6062020-04-27 16:30:50878 invoke_resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
Jack Franklin82978692020-03-12 14:06:42879
880 /**
881 * Sets attribute for an element with given id.
882 */
Tim van der Lippe48335362020-05-12 14:34:15883 invoke_setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest):
884 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42885
886 /**
887 * Sets attributes on element with given id. This method is useful when user edits some existing
888 * attribute value and types in several attribute name/value pairs.
889 */
Tim van der Lippe48335362020-05-12 14:34:15890 invoke_setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest):
891 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42892
893 /**
894 * Sets files for the given file input element.
895 */
Tim van der Lippe48335362020-05-12 14:34:15896 invoke_setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest):
897 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42898
899 /**
900 * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
901 */
Tim van der Lippe48335362020-05-12 14:34:15902 invoke_setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest):
903 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42904
905 /**
906 * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
907 */
Tim van der Lippe96de6062020-04-27 16:30:50908 invoke_getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest):
Jack Franklin82978692020-03-12 14:06:42909 Promise<Protocol.DOM.GetNodeStackTracesResponse>;
910
911 /**
912 * Returns file information for the given
913 * File wrapper.
914 */
Tim van der Lippe96de6062020-04-27 16:30:50915 invoke_getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>;
Jack Franklin82978692020-03-12 14:06:42916
917 /**
918 * Enables console to refer to the node with given id via $x (see Command Line API for more details
919 * $x functions).
920 */
Tim van der Lippe48335362020-05-12 14:34:15921 invoke_setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42922
923 /**
924 * Sets node name for a node with given id.
925 */
Tim van der Lippe96de6062020-04-27 16:30:50926 invoke_setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>;
Jack Franklin82978692020-03-12 14:06:42927
928 /**
929 * Sets node value for a node with given id.
930 */
Tim van der Lippe48335362020-05-12 14:34:15931 invoke_setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42932
933 /**
934 * Sets node HTML markup, returns new node id.
935 */
Tim van der Lippe48335362020-05-12 14:34:15936 invoke_setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42937
938 /**
939 * Undoes the last performed action.
940 */
Tim van der Lippe48335362020-05-12 14:34:15941 invoke_undo(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:42942
943 /**
944 * Returns iframe node that owns iframe with the given domain.
945 */
Tim van der Lippe96de6062020-04-27 16:30:50946 invoke_getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:28947 }
Tim van der Lippe3c7eedc2020-10-20 10:21:59948 export interface DOMDispatcher {
Jack Franklin82978692020-03-12 14:06:42949 /**
950 * Fired when `Element`'s attribute is modified.
951 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28952 attributeModified(params: Protocol.DOM.AttributeModifiedEvent): void;
Jack Franklin82978692020-03-12 14:06:42953
954 /**
955 * Fired when `Element`'s attribute is removed.
956 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28957 attributeRemoved(params: Protocol.DOM.AttributeRemovedEvent): void;
Jack Franklin82978692020-03-12 14:06:42958
959 /**
960 * Mirrors `DOMCharacterDataModified` event.
961 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28962 characterDataModified(params: Protocol.DOM.CharacterDataModifiedEvent): void;
Jack Franklin82978692020-03-12 14:06:42963
964 /**
965 * Fired when `Container`'s child node count has changed.
966 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28967 childNodeCountUpdated(params: Protocol.DOM.ChildNodeCountUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42968
969 /**
970 * Mirrors `DOMNodeInserted` event.
971 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28972 childNodeInserted(params: Protocol.DOM.ChildNodeInsertedEvent): void;
Jack Franklin82978692020-03-12 14:06:42973
974 /**
975 * Mirrors `DOMNodeRemoved` event.
976 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28977 childNodeRemoved(params: Protocol.DOM.ChildNodeRemovedEvent): void;
Jack Franklin82978692020-03-12 14:06:42978
979 /**
Simon Zünddc192602021-04-29 06:20:31980 * Called when distribution is changed.
Jack Franklin82978692020-03-12 14:06:42981 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28982 distributedNodesUpdated(params: Protocol.DOM.DistributedNodesUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42983
984 /**
985 * Fired when `Document` has been totally updated. Node ids are no longer valid.
986 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28987 documentUpdated(): void;
Jack Franklin82978692020-03-12 14:06:42988
989 /**
990 * Fired when `Element`'s inline style is modified via a CSS property modification.
991 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28992 inlineStyleInvalidated(params: Protocol.DOM.InlineStyleInvalidatedEvent): void;
Jack Franklin82978692020-03-12 14:06:42993
994 /**
995 * Called when a pseudo element is added to an element.
996 */
Tim van der Lipped1c8d6c2020-05-12 13:56:28997 pseudoElementAdded(params: Protocol.DOM.PseudoElementAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:42998
999 /**
1000 * Called when a pseudo element is removed from an element.
1001 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281002 pseudoElementRemoved(params: Protocol.DOM.PseudoElementRemovedEvent): void;
Jack Franklin82978692020-03-12 14:06:421003
1004 /**
1005 * Fired when backend wants to provide client with the missing DOM structure. This happens upon
1006 * most of the calls requesting node ids.
1007 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281008 setChildNodes(params: Protocol.DOM.SetChildNodesEvent): void;
Jack Franklin82978692020-03-12 14:06:421009
1010 /**
1011 * Called when shadow root is popped from the element.
1012 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281013 shadowRootPopped(params: Protocol.DOM.ShadowRootPoppedEvent): void;
Jack Franklin82978692020-03-12 14:06:421014
1015 /**
1016 * Called when shadow root is pushed into the element.
1017 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281018 shadowRootPushed(params: Protocol.DOM.ShadowRootPushedEvent): void;
Jack Franklin82978692020-03-12 14:06:421019 }
1020
1021 export interface DOMDebuggerApi {
1022 /**
1023 * Returns event listeners of the given object.
1024 */
Tim van der Lippe96de6062020-04-27 16:30:501025 invoke_getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest):
Jack Franklin82978692020-03-12 14:06:421026 Promise<Protocol.DOMDebugger.GetEventListenersResponse>;
1027
1028 /**
1029 * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
1030 */
Tim van der Lippe48335362020-05-12 14:34:151031 invoke_removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest):
1032 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421033
1034 /**
1035 * Removes breakpoint on particular DOM event.
1036 */
Tim van der Lippe96de6062020-04-27 16:30:501037 invoke_removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest):
Tim van der Lippe48335362020-05-12 14:34:151038 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421039
1040 /**
1041 * Removes breakpoint on particular native event.
1042 */
Tim van der Lippe96de6062020-04-27 16:30:501043 invoke_removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest):
Tim van der Lippe48335362020-05-12 14:34:151044 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421045
1046 /**
1047 * Removes breakpoint from XMLHttpRequest.
1048 */
Tim van der Lippe48335362020-05-12 14:34:151049 invoke_removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest):
1050 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421051
1052 /**
Alfonso Castaño7a13f662020-11-18 09:39:361053 * Sets breakpoint on particular CSP violations.
1054 */
1055 invoke_setBreakOnCSPViolation(params: Protocol.DOMDebugger.SetBreakOnCSPViolationRequest):
1056 Promise<Protocol.ProtocolResponseWithError>;
1057
1058 /**
Jack Franklin82978692020-03-12 14:06:421059 * Sets breakpoint on particular operation with DOM.
1060 */
Tim van der Lippe48335362020-05-12 14:34:151061 invoke_setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest):
1062 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421063
1064 /**
1065 * Sets breakpoint on particular DOM event.
1066 */
Tim van der Lippe48335362020-05-12 14:34:151067 invoke_setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest):
1068 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421069
1070 /**
1071 * Sets breakpoint on particular native event.
1072 */
Tim van der Lippe96de6062020-04-27 16:30:501073 invoke_setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest):
Tim van der Lippe48335362020-05-12 14:34:151074 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421075
1076 /**
1077 * Sets breakpoint on XMLHttpRequest.
1078 */
Tim van der Lippe48335362020-05-12 14:34:151079 invoke_setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest):
1080 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421081 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591082 export interface DOMDebuggerDispatcher {}
Jack Franklin82978692020-03-12 14:06:421083
1084 export interface DOMSnapshotApi {
1085 /**
1086 * Disables DOM snapshot agent for the given page.
1087 */
Tim van der Lippe48335362020-05-12 14:34:151088 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421089
1090 /**
1091 * Enables DOM snapshot agent for the given page.
1092 */
Tim van der Lippe48335362020-05-12 14:34:151093 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421094
1095 /**
1096 * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
1097 * template contents, and imported documents) in a flattened array, as well as layout and
1098 * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
1099 * flattened.
1100 */
Tim van der Lippe96de6062020-04-27 16:30:501101 invoke_getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest):
1102 Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
Jack Franklin82978692020-03-12 14:06:421103
1104 /**
1105 * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
1106 * template contents, and imported documents) in a flattened array, as well as layout and
1107 * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
1108 * flattened.
1109 */
Tim van der Lippe96de6062020-04-27 16:30:501110 invoke_captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest):
Jack Franklin82978692020-03-12 14:06:421111 Promise<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
1112 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591113 export interface DOMSnapshotDispatcher {}
Jack Franklin82978692020-03-12 14:06:421114
1115 export interface DOMStorageApi {
Tim van der Lippe48335362020-05-12 14:34:151116 invoke_clear(params: Protocol.DOMStorage.ClearRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421117
1118 /**
1119 * Disables storage tracking, prevents storage events from being sent to the client.
1120 */
Tim van der Lippe48335362020-05-12 14:34:151121 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421122
1123 /**
1124 * Enables storage tracking, storage events will now be delivered to the client.
1125 */
Tim van der Lippe48335362020-05-12 14:34:151126 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421127
Tim van der Lippe96de6062020-04-27 16:30:501128 invoke_getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest):
Jack Franklin82978692020-03-12 14:06:421129 Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
1130
Tim van der Lippe48335362020-05-12 14:34:151131 invoke_removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest):
1132 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421133
Tim van der Lippe48335362020-05-12 14:34:151134 invoke_setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest):
1135 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281136 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591137 export interface DOMStorageDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:281138 domStorageItemAdded(params: Protocol.DOMStorage.DomStorageItemAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:421139
Tim van der Lipped1c8d6c2020-05-12 13:56:281140 domStorageItemRemoved(params: Protocol.DOMStorage.DomStorageItemRemovedEvent): void;
Jack Franklin82978692020-03-12 14:06:421141
Tim van der Lipped1c8d6c2020-05-12 13:56:281142 domStorageItemUpdated(params: Protocol.DOMStorage.DomStorageItemUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:421143
Tim van der Lipped1c8d6c2020-05-12 13:56:281144 domStorageItemsCleared(params: Protocol.DOMStorage.DomStorageItemsClearedEvent): void;
Jack Franklin82978692020-03-12 14:06:421145 }
1146
1147 export interface DatabaseApi {
1148 /**
1149 * Disables database tracking, prevents database events from being sent to the client.
1150 */
Tim van der Lippe48335362020-05-12 14:34:151151 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421152
1153 /**
1154 * Enables database tracking, database events will now be delivered to the client.
1155 */
Tim van der Lippe48335362020-05-12 14:34:151156 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421157
Tim van der Lippe96de6062020-04-27 16:30:501158 invoke_executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
Jack Franklin82978692020-03-12 14:06:421159
Tim van der Lippe96de6062020-04-27 16:30:501160 invoke_getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest):
Jack Franklin82978692020-03-12 14:06:421161 Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281162 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591163 export interface DatabaseDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:281164 addDatabase(params: Protocol.Database.AddDatabaseEvent): void;
Jack Franklin82978692020-03-12 14:06:421165 }
1166
1167 export interface DeviceOrientationApi {
1168 /**
1169 * Clears the overridden Device Orientation.
1170 */
Tim van der Lippe48335362020-05-12 14:34:151171 invoke_clearDeviceOrientationOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421172
1173 /**
1174 * Overrides the Device Orientation.
1175 */
Tim van der Lippe96de6062020-04-27 16:30:501176 invoke_setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest):
Tim van der Lippe48335362020-05-12 14:34:151177 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421178 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591179 export interface DeviceOrientationDispatcher {}
Jack Franklin82978692020-03-12 14:06:421180
1181 export interface EmulationApi {
1182 /**
1183 * Tells whether emulation is supported.
1184 */
Tim van der Lippe96de6062020-04-27 16:30:501185 invoke_canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
Jack Franklin82978692020-03-12 14:06:421186
1187 /**
Simon Zünddc192602021-04-29 06:20:311188 * Clears the overridden device metrics.
Jack Franklin82978692020-03-12 14:06:421189 */
Tim van der Lippe48335362020-05-12 14:34:151190 invoke_clearDeviceMetricsOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421191
1192 /**
Simon Zünddc192602021-04-29 06:20:311193 * Clears the overridden Geolocation Position and Error.
Jack Franklin82978692020-03-12 14:06:421194 */
Tim van der Lippe48335362020-05-12 14:34:151195 invoke_clearGeolocationOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421196
1197 /**
1198 * Requests that page scale factor is reset to initial values.
1199 */
Tim van der Lippe48335362020-05-12 14:34:151200 invoke_resetPageScaleFactor(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421201
1202 /**
1203 * Enables or disables simulating a focused and active page.
1204 */
Tim van der Lippe48335362020-05-12 14:34:151205 invoke_setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest):
1206 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421207
1208 /**
1209 * Enables CPU throttling to emulate slow CPUs.
1210 */
Tim van der Lippe48335362020-05-12 14:34:151211 invoke_setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest):
1212 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421213
1214 /**
1215 * Sets or clears an override of the default background color of the frame. This override is used
1216 * if the content does not specify one.
1217 */
Tim van der Lippe96de6062020-04-27 16:30:501218 invoke_setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest):
Tim van der Lippe48335362020-05-12 14:34:151219 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421220
1221 /**
1222 * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
1223 * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
1224 * query results).
1225 */
Tim van der Lippe48335362020-05-12 14:34:151226 invoke_setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest):
1227 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421228
Tim van der Lippe48335362020-05-12 14:34:151229 invoke_setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest):
1230 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421231
Tim van der Lippe48335362020-05-12 14:34:151232 invoke_setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest):
1233 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421234
Tim van der Lippe48335362020-05-12 14:34:151235 invoke_setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest):
1236 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421237
1238 /**
1239 * Emulates the given media type or media feature for CSS media queries.
1240 */
Tim van der Lippe48335362020-05-12 14:34:151241 invoke_setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest):
1242 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421243
1244 /**
1245 * Emulates the given vision deficiency.
1246 */
Tim van der Lippe48335362020-05-12 14:34:151247 invoke_setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest):
1248 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421249
1250 /**
1251 * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
1252 * unavailable.
1253 */
Tim van der Lippe48335362020-05-12 14:34:151254 invoke_setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest):
1255 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421256
1257 /**
Maksim Sadym6a414142020-07-29 20:35:331258 * Overrides the Idle state.
1259 */
1260 invoke_setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest):
1261 Promise<Protocol.ProtocolResponseWithError>;
1262
1263 /**
1264 * Clears Idle state overrides.
1265 */
1266 invoke_clearIdleOverride(): Promise<Protocol.ProtocolResponseWithError>;
1267
1268 /**
Jack Franklin82978692020-03-12 14:06:421269 * Overrides value returned by the javascript navigator object.
1270 */
Tim van der Lippe48335362020-05-12 14:34:151271 invoke_setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest):
1272 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421273
1274 /**
1275 * Sets a specified page scale factor.
1276 */
Tim van der Lippe48335362020-05-12 14:34:151277 invoke_setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest):
1278 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421279
1280 /**
1281 * Switches script execution in the page.
1282 */
Tim van der Lippe48335362020-05-12 14:34:151283 invoke_setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest):
1284 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421285
1286 /**
1287 * Enables touch on platforms which do not support them.
1288 */
Tim van der Lippe48335362020-05-12 14:34:151289 invoke_setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest):
1290 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421291
1292 /**
1293 * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
1294 * the current virtual time policy. Note this supersedes any previous time budget.
1295 */
Tim van der Lippe96de6062020-04-27 16:30:501296 invoke_setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest):
Jack Franklin82978692020-03-12 14:06:421297 Promise<Protocol.Emulation.SetVirtualTimePolicyResponse>;
1298
1299 /**
1300 * Overrides default host system locale with the specified one.
1301 */
Tim van der Lippe48335362020-05-12 14:34:151302 invoke_setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest):
1303 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421304
1305 /**
1306 * Overrides default host system timezone with the specified one.
1307 */
Tim van der Lippe48335362020-05-12 14:34:151308 invoke_setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest):
1309 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421310
1311 /**
1312 * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
1313 * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
1314 * on Android.
1315 */
Tim van der Lippe48335362020-05-12 14:34:151316 invoke_setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest):
1317 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421318
Alex Rudenko288d9022020-10-30 14:36:411319 invoke_setDisabledImageTypes(params: Protocol.Emulation.SetDisabledImageTypesRequest):
1320 Promise<Protocol.ProtocolResponseWithError>;
1321
Jack Franklin82978692020-03-12 14:06:421322 /**
1323 * Allows overriding user agent with the given string.
1324 */
Tim van der Lippe48335362020-05-12 14:34:151325 invoke_setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest):
1326 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281327 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591328 export interface EmulationDispatcher {
Jack Franklin82978692020-03-12 14:06:421329 /**
1330 * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
1331 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281332 virtualTimeBudgetExpired(): void;
Jack Franklin82978692020-03-12 14:06:421333 }
1334
1335 export interface HeadlessExperimentalApi {
1336 /**
1337 * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
1338 * screenshot from the resulting frame. Requires that the target was created with enabled
1339 * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
1340 * https://goo.gl/3zHXhB for more background.
1341 */
Tim van der Lippe96de6062020-04-27 16:30:501342 invoke_beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest):
Jack Franklin82978692020-03-12 14:06:421343 Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
1344
1345 /**
1346 * Disables headless events for the target.
1347 */
Tim van der Lippe48335362020-05-12 14:34:151348 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421349
1350 /**
1351 * Enables headless events for the target.
1352 */
Tim van der Lippe48335362020-05-12 14:34:151353 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281354 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591355 export interface HeadlessExperimentalDispatcher {
Jack Franklin82978692020-03-12 14:06:421356 /**
1357 * Issued when the target starts or stops needing BeginFrames.
1358 * Deprecated. Issue beginFrame unconditionally instead and use result from
1359 * beginFrame to detect whether the frames were suppressed.
1360 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281361 needsBeginFramesChanged(params: Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:421362 }
1363
1364 // eslint thinks this is us prefixing our interfaces but it's not!
1365 // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1366 export interface IOApi {
1367 /**
1368 * Close the stream, discard any temporary backing storage.
1369 */
Tim van der Lippe48335362020-05-12 14:34:151370 invoke_close(params: Protocol.IO.CloseRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421371
1372 /**
1373 * Read a chunk of the stream
1374 */
Tim van der Lippe96de6062020-04-27 16:30:501375 invoke_read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
Jack Franklin82978692020-03-12 14:06:421376
1377 /**
1378 * Return UUID of Blob object specified by a remote object id.
1379 */
Tim van der Lippe96de6062020-04-27 16:30:501380 invoke_resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
Jack Franklin82978692020-03-12 14:06:421381 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591382 export interface IODispatcher {}
Jack Franklin82978692020-03-12 14:06:421383
1384 // eslint thinks this is us prefixing our interfaces but it's not!
1385 // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1386 export interface IndexedDBApi {
1387 /**
1388 * Clears all entries from an object store.
1389 */
Tim van der Lippe48335362020-05-12 14:34:151390 invoke_clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest):
1391 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421392
1393 /**
1394 * Deletes a database.
1395 */
Tim van der Lippe48335362020-05-12 14:34:151396 invoke_deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest):
1397 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421398
1399 /**
1400 * Delete a range of entries from an object store
1401 */
Tim van der Lippe48335362020-05-12 14:34:151402 invoke_deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest):
1403 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421404
1405 /**
1406 * Disables events from backend.
1407 */
Tim van der Lippe48335362020-05-12 14:34:151408 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421409
1410 /**
1411 * Enables events from backend.
1412 */
Tim van der Lippe48335362020-05-12 14:34:151413 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421414
1415 /**
1416 * Requests data from object store or index.
1417 */
Tim van der Lippe96de6062020-04-27 16:30:501418 invoke_requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
Jack Franklin82978692020-03-12 14:06:421419
1420 /**
1421 * Gets metadata of an object store
1422 */
Tim van der Lippe96de6062020-04-27 16:30:501423 invoke_getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
Jack Franklin82978692020-03-12 14:06:421424
1425 /**
1426 * Requests database with given name in given frame.
1427 */
Tim van der Lippe96de6062020-04-27 16:30:501428 invoke_requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest):
Jack Franklin82978692020-03-12 14:06:421429 Promise<Protocol.IndexedDB.RequestDatabaseResponse>;
1430
1431 /**
1432 * Requests database names for given security origin.
1433 */
Tim van der Lippe96de6062020-04-27 16:30:501434 invoke_requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest):
Jack Franklin82978692020-03-12 14:06:421435 Promise<Protocol.IndexedDB.RequestDatabaseNamesResponse>;
1436 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591437 export interface IndexedDBDispatcher {}
Jack Franklin82978692020-03-12 14:06:421438
1439 // eslint thinks this is us prefixing our interfaces but it's not!
1440 // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1441 export interface InputApi {
1442 /**
Alex Rudenko16c517d2021-04-12 07:55:121443 * Dispatches a drag event into the page.
1444 */
1445 invoke_dispatchDragEvent(params: Protocol.Input.DispatchDragEventRequest):
1446 Promise<Protocol.ProtocolResponseWithError>;
1447
1448 /**
Jack Franklin82978692020-03-12 14:06:421449 * Dispatches a key event to the page.
1450 */
Tim van der Lippe48335362020-05-12 14:34:151451 invoke_dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest):
1452 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421453
1454 /**
1455 * This method emulates inserting text that doesn't come from a key press,
1456 * for example an emoji keyboard or an IME.
1457 */
Tim van der Lippe48335362020-05-12 14:34:151458 invoke_insertText(params: Protocol.Input.InsertTextRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421459
1460 /**
1461 * Dispatches a mouse event to the page.
1462 */
Tim van der Lippe48335362020-05-12 14:34:151463 invoke_dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest):
1464 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421465
1466 /**
1467 * Dispatches a touch event to the page.
1468 */
Tim van der Lippe48335362020-05-12 14:34:151469 invoke_dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest):
1470 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421471
1472 /**
1473 * Emulates touch event from the mouse event parameters.
1474 */
Tim van der Lippe48335362020-05-12 14:34:151475 invoke_emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest):
1476 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421477
1478 /**
1479 * Ignores input events (useful while auditing page).
1480 */
Tim van der Lippe48335362020-05-12 14:34:151481 invoke_setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest):
1482 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421483
1484 /**
Alex Rudenko16c517d2021-04-12 07:55:121485 * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
1486 * Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
1487 */
1488 invoke_setInterceptDrags(params: Protocol.Input.SetInterceptDragsRequest):
1489 Promise<Protocol.ProtocolResponseWithError>;
1490
1491 /**
Jack Franklin82978692020-03-12 14:06:421492 * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
1493 */
Tim van der Lippe48335362020-05-12 14:34:151494 invoke_synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest):
1495 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421496
1497 /**
1498 * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
1499 */
Tim van der Lippe48335362020-05-12 14:34:151500 invoke_synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest):
1501 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421502
1503 /**
1504 * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
1505 */
Tim van der Lippe48335362020-05-12 14:34:151506 invoke_synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest):
1507 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421508 }
Alex Rudenko16c517d2021-04-12 07:55:121509 export interface InputDispatcher {
1510 /**
1511 * Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
1512 * restore normal drag and drop behavior.
1513 */
1514 dragIntercepted(params: Protocol.Input.DragInterceptedEvent): void;
1515 }
Jack Franklin82978692020-03-12 14:06:421516
1517 // eslint thinks this is us prefixing our interfaces but it's not!
1518 // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1519 export interface InspectorApi {
1520 /**
1521 * Disables inspector domain notifications.
1522 */
Tim van der Lippe48335362020-05-12 14:34:151523 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421524
1525 /**
1526 * Enables inspector domain notifications.
1527 */
Tim van der Lippe48335362020-05-12 14:34:151528 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281529 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591530 export interface InspectorDispatcher {
Jack Franklin82978692020-03-12 14:06:421531 /**
1532 * Fired when remote debugging connection is about to be terminated. Contains detach reason.
1533 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281534 detached(params: Protocol.Inspector.DetachedEvent): void;
Jack Franklin82978692020-03-12 14:06:421535
1536 /**
1537 * Fired when debugging target has crashed
1538 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281539 targetCrashed(): void;
Jack Franklin82978692020-03-12 14:06:421540
1541 /**
1542 * Fired when debugging target has reloaded after crash
1543 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281544 targetReloadedAfterCrash(): void;
Jack Franklin82978692020-03-12 14:06:421545 }
1546
1547 export interface LayerTreeApi {
1548 /**
1549 * Provides the reasons why the given layer was composited.
1550 */
Tim van der Lippe96de6062020-04-27 16:30:501551 invoke_compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest):
Jack Franklin82978692020-03-12 14:06:421552 Promise<Protocol.LayerTree.CompositingReasonsResponse>;
1553
1554 /**
1555 * Disables compositing tree inspection.
1556 */
Tim van der Lippe48335362020-05-12 14:34:151557 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421558
1559 /**
1560 * Enables compositing tree inspection.
1561 */
Tim van der Lippe48335362020-05-12 14:34:151562 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421563
1564 /**
1565 * Returns the snapshot identifier.
1566 */
Tim van der Lippe96de6062020-04-27 16:30:501567 invoke_loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest):
1568 Promise<Protocol.LayerTree.LoadSnapshotResponse>;
Jack Franklin82978692020-03-12 14:06:421569
1570 /**
1571 * Returns the layer snapshot identifier.
1572 */
Tim van der Lippe96de6062020-04-27 16:30:501573 invoke_makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest):
1574 Promise<Protocol.LayerTree.MakeSnapshotResponse>;
Jack Franklin82978692020-03-12 14:06:421575
Tim van der Lippe96de6062020-04-27 16:30:501576 invoke_profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest):
Jack Franklin82978692020-03-12 14:06:421577 Promise<Protocol.LayerTree.ProfileSnapshotResponse>;
1578
1579 /**
1580 * Releases layer snapshot captured by the back-end.
1581 */
Tim van der Lippe48335362020-05-12 14:34:151582 invoke_releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest):
1583 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421584
1585 /**
1586 * Replays the layer snapshot and returns the resulting bitmap.
1587 */
Tim van der Lippe96de6062020-04-27 16:30:501588 invoke_replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest):
Jack Franklin82978692020-03-12 14:06:421589 Promise<Protocol.LayerTree.ReplaySnapshotResponse>;
1590
1591 /**
1592 * Replays the layer snapshot and returns canvas log.
1593 */
Tim van der Lippe96de6062020-04-27 16:30:501594 invoke_snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest):
Jack Franklin82978692020-03-12 14:06:421595 Promise<Protocol.LayerTree.SnapshotCommandLogResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281596 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591597 export interface LayerTreeDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:281598 layerPainted(params: Protocol.LayerTree.LayerPaintedEvent): void;
Jack Franklin82978692020-03-12 14:06:421599
Tim van der Lipped1c8d6c2020-05-12 13:56:281600 layerTreeDidChange(params: Protocol.LayerTree.LayerTreeDidChangeEvent): void;
Jack Franklin82978692020-03-12 14:06:421601 }
1602
1603 export interface LogApi {
1604 /**
1605 * Clears the log.
1606 */
Tim van der Lippe48335362020-05-12 14:34:151607 invoke_clear(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421608
1609 /**
1610 * Disables log domain, prevents further log entries from being reported to the client.
1611 */
Tim van der Lippe48335362020-05-12 14:34:151612 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421613
1614 /**
1615 * Enables log domain, sends the entries collected so far to the client by means of the
1616 * `entryAdded` notification.
1617 */
Tim van der Lippe48335362020-05-12 14:34:151618 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421619
1620 /**
1621 * start violation reporting.
1622 */
Tim van der Lippe48335362020-05-12 14:34:151623 invoke_startViolationsReport(params: Protocol.Log.StartViolationsReportRequest):
1624 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421625
1626 /**
1627 * Stop violation reporting.
1628 */
Tim van der Lippe48335362020-05-12 14:34:151629 invoke_stopViolationsReport(): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281630 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591631 export interface LogDispatcher {
Jack Franklin82978692020-03-12 14:06:421632 /**
1633 * Issued when new message was logged.
1634 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281635 entryAdded(params: Protocol.Log.EntryAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:421636 }
1637
1638 export interface MemoryApi {
Tim van der Lippe96de6062020-04-27 16:30:501639 invoke_getDOMCounters(): Promise<Protocol.Memory.GetDOMCountersResponse>;
Jack Franklin82978692020-03-12 14:06:421640
Tim van der Lippe48335362020-05-12 14:34:151641 invoke_prepareForLeakDetection(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421642
1643 /**
1644 * Simulate OomIntervention by purging V8 memory.
1645 */
Tim van der Lippe48335362020-05-12 14:34:151646 invoke_forciblyPurgeJavaScriptMemory(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421647
1648 /**
1649 * Enable/disable suppressing memory pressure notifications in all processes.
1650 */
Tim van der Lippe96de6062020-04-27 16:30:501651 invoke_setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest):
Tim van der Lippe48335362020-05-12 14:34:151652 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421653
1654 /**
1655 * Simulate a memory pressure notification in all processes.
1656 */
Tim van der Lippe48335362020-05-12 14:34:151657 invoke_simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest):
1658 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421659
1660 /**
1661 * Start collecting native memory profile.
1662 */
Tim van der Lippe48335362020-05-12 14:34:151663 invoke_startSampling(params: Protocol.Memory.StartSamplingRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421664
1665 /**
1666 * Stop collecting native memory profile.
1667 */
Tim van der Lippe48335362020-05-12 14:34:151668 invoke_stopSampling(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421669
1670 /**
1671 * Retrieve native memory allocations profile
1672 * collected since renderer process startup.
1673 */
Tim van der Lippe96de6062020-04-27 16:30:501674 invoke_getAllTimeSamplingProfile(): Promise<Protocol.Memory.GetAllTimeSamplingProfileResponse>;
Jack Franklin82978692020-03-12 14:06:421675
1676 /**
1677 * Retrieve native memory allocations profile
1678 * collected since browser process startup.
1679 */
Tim van der Lippe96de6062020-04-27 16:30:501680 invoke_getBrowserSamplingProfile(): Promise<Protocol.Memory.GetBrowserSamplingProfileResponse>;
Jack Franklin82978692020-03-12 14:06:421681
1682 /**
1683 * Retrieve native memory allocations profile collected since last
1684 * `startSampling` call.
1685 */
Tim van der Lippe96de6062020-04-27 16:30:501686 invoke_getSamplingProfile(): Promise<Protocol.Memory.GetSamplingProfileResponse>;
Jack Franklin82978692020-03-12 14:06:421687 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591688 export interface MemoryDispatcher {}
Jack Franklin82978692020-03-12 14:06:421689
1690 export interface NetworkApi {
1691 /**
Alex Rudenkob992f322021-03-24 14:01:281692 * Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
1693 */
1694 invoke_setAcceptedEncodings(params: Protocol.Network.SetAcceptedEncodingsRequest):
1695 Promise<Protocol.ProtocolResponseWithError>;
1696
1697 /**
1698 * Clears accepted encodings set by setAcceptedEncodings
1699 */
1700 invoke_clearAcceptedEncodingsOverride(): Promise<Protocol.ProtocolResponseWithError>;
1701
1702 /**
Jack Franklin82978692020-03-12 14:06:421703 * Tells whether clearing browser cache is supported.
1704 */
Tim van der Lippe96de6062020-04-27 16:30:501705 invoke_canClearBrowserCache(): Promise<Protocol.Network.CanClearBrowserCacheResponse>;
Jack Franklin82978692020-03-12 14:06:421706
1707 /**
1708 * Tells whether clearing browser cookies is supported.
1709 */
Tim van der Lippe96de6062020-04-27 16:30:501710 invoke_canClearBrowserCookies(): Promise<Protocol.Network.CanClearBrowserCookiesResponse>;
Jack Franklin82978692020-03-12 14:06:421711
1712 /**
1713 * Tells whether emulation of network conditions is supported.
1714 */
Tim van der Lippe96de6062020-04-27 16:30:501715 invoke_canEmulateNetworkConditions(): Promise<Protocol.Network.CanEmulateNetworkConditionsResponse>;
Jack Franklin82978692020-03-12 14:06:421716
1717 /**
1718 * Clears browser cache.
1719 */
Tim van der Lippe48335362020-05-12 14:34:151720 invoke_clearBrowserCache(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421721
1722 /**
1723 * Clears browser cookies.
1724 */
Tim van der Lippe48335362020-05-12 14:34:151725 invoke_clearBrowserCookies(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421726
1727 /**
1728 * Response to Network.requestIntercepted which either modifies the request to continue with any
1729 * modifications, or blocks it, or completes it with the provided response bytes. If a network
1730 * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
1731 * event will be sent with the same InterceptionId.
1732 * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
1733 */
Tim van der Lippe48335362020-05-12 14:34:151734 invoke_continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest):
1735 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421736
1737 /**
1738 * Deletes browser cookies with matching name and url or domain/path pair.
1739 */
Tim van der Lippe48335362020-05-12 14:34:151740 invoke_deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421741
1742 /**
1743 * Disables network tracking, prevents network events from being sent to the client.
1744 */
Tim van der Lippe48335362020-05-12 14:34:151745 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421746
1747 /**
1748 * Activates emulation of network conditions.
1749 */
Tim van der Lippe48335362020-05-12 14:34:151750 invoke_emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest):
1751 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421752
1753 /**
1754 * Enables network tracking, network events will now be delivered to the client.
1755 */
Tim van der Lippe48335362020-05-12 14:34:151756 invoke_enable(params: Protocol.Network.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421757
1758 /**
1759 * Returns all browser cookies. Depending on the backend support, will return detailed cookie
1760 * information in the `cookies` field.
1761 */
Tim van der Lippe96de6062020-04-27 16:30:501762 invoke_getAllCookies(): Promise<Protocol.Network.GetAllCookiesResponse>;
Jack Franklin82978692020-03-12 14:06:421763
1764 /**
1765 * Returns the DER-encoded certificate.
1766 */
Tim van der Lippe96de6062020-04-27 16:30:501767 invoke_getCertificate(params: Protocol.Network.GetCertificateRequest):
1768 Promise<Protocol.Network.GetCertificateResponse>;
Jack Franklin82978692020-03-12 14:06:421769
1770 /**
1771 * Returns all browser cookies for the current URL. Depending on the backend support, will return
1772 * detailed cookie information in the `cookies` field.
1773 */
Tim van der Lippe96de6062020-04-27 16:30:501774 invoke_getCookies(params: Protocol.Network.GetCookiesRequest): Promise<Protocol.Network.GetCookiesResponse>;
Jack Franklin82978692020-03-12 14:06:421775
1776 /**
1777 * Returns content served for the given request.
1778 */
Tim van der Lippe96de6062020-04-27 16:30:501779 invoke_getResponseBody(params: Protocol.Network.GetResponseBodyRequest):
1780 Promise<Protocol.Network.GetResponseBodyResponse>;
Jack Franklin82978692020-03-12 14:06:421781
1782 /**
1783 * Returns post data sent with the request. Returns an error when no data was sent with the request.
1784 */
Tim van der Lippe96de6062020-04-27 16:30:501785 invoke_getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest):
Jack Franklin82978692020-03-12 14:06:421786 Promise<Protocol.Network.GetRequestPostDataResponse>;
1787
1788 /**
1789 * Returns content served for the given currently intercepted request.
1790 */
Tim van der Lippe96de6062020-04-27 16:30:501791 invoke_getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest):
Jack Franklin82978692020-03-12 14:06:421792 Promise<Protocol.Network.GetResponseBodyForInterceptionResponse>;
1793
1794 /**
1795 * Returns a handle to the stream representing the response body. Note that after this command,
1796 * the intercepted request can't be continued as is -- you either need to cancel it or to provide
1797 * the response body. The stream only supports sequential read, IO.read will fail if the position
1798 * is specified.
1799 */
Tim van der Lippe96de6062020-04-27 16:30:501800 invoke_takeResponseBodyForInterceptionAsStream(params:
1801 Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest):
Jack Franklin82978692020-03-12 14:06:421802 Promise<Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse>;
1803
1804 /**
1805 * This method sends a new XMLHttpRequest which is identical to the original one. The following
1806 * parameters should be identical: method, url, async, request body, extra headers, withCredentials
1807 * attribute, user, password.
1808 */
Tim van der Lippe48335362020-05-12 14:34:151809 invoke_replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421810
1811 /**
1812 * Searches for given string in response content.
1813 */
Tim van der Lippe96de6062020-04-27 16:30:501814 invoke_searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest):
Jack Franklin82978692020-03-12 14:06:421815 Promise<Protocol.Network.SearchInResponseBodyResponse>;
1816
1817 /**
1818 * Blocks URLs from loading.
1819 */
Tim van der Lippe48335362020-05-12 14:34:151820 invoke_setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421821
1822 /**
1823 * Toggles ignoring of service worker for each request.
1824 */
Tim van der Lippe48335362020-05-12 14:34:151825 invoke_setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest):
1826 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421827
1828 /**
1829 * Toggles ignoring cache for each request. If `true`, cache will not be used.
1830 */
Tim van der Lippe48335362020-05-12 14:34:151831 invoke_setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest):
1832 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421833
1834 /**
1835 * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
1836 */
Tim van der Lippe96de6062020-04-27 16:30:501837 invoke_setCookie(params: Protocol.Network.SetCookieRequest): Promise<Protocol.Network.SetCookieResponse>;
Jack Franklin82978692020-03-12 14:06:421838
1839 /**
1840 * Sets given cookies.
1841 */
Tim van der Lippe48335362020-05-12 14:34:151842 invoke_setCookies(params: Protocol.Network.SetCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421843
1844 /**
1845 * For testing.
1846 */
Tim van der Lippe48335362020-05-12 14:34:151847 invoke_setDataSizeLimitsForTest(params: Protocol.Network.SetDataSizeLimitsForTestRequest):
1848 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421849
1850 /**
1851 * Specifies whether to always send extra HTTP headers with the requests from this page.
1852 */
Tim van der Lippe48335362020-05-12 14:34:151853 invoke_setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest):
1854 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421855
1856 /**
Songtao Xia160e3842020-10-25 20:39:391857 * Specifies whether to attach a page script stack id in requests
Patrick Brosset6f3b86e2020-09-16 14:55:531858 */
Songtao Xia160e3842020-10-25 20:39:391859 invoke_setAttachDebugStack(params: Protocol.Network.SetAttachDebugStackRequest):
Patrick Brosset6f3b86e2020-09-16 14:55:531860 Promise<Protocol.ProtocolResponseWithError>;
1861
1862 /**
Jack Franklin82978692020-03-12 14:06:421863 * Sets the requests to intercept that match the provided patterns and optionally resource types.
1864 * Deprecated, please use Fetch.enable instead.
1865 */
Tim van der Lippe48335362020-05-12 14:34:151866 invoke_setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest):
1867 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:421868
1869 /**
1870 * Allows overriding user agent with the given string.
1871 */
Tim van der Lippe48335362020-05-12 14:34:151872 invoke_setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest):
1873 Promise<Protocol.ProtocolResponseWithError>;
Sigurd Schneider141bdf72020-08-18 13:39:221874
1875 /**
1876 * Returns information about the COEP/COOP isolation status.
1877 */
1878 invoke_getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest):
1879 Promise<Protocol.Network.GetSecurityIsolationStatusResponse>;
Sigurd Schneider97aa8882020-09-24 14:49:341880
1881 /**
1882 * Fetches the resource and returns the content.
1883 */
1884 invoke_loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest):
1885 Promise<Protocol.Network.LoadNetworkResourceResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:281886 }
Tim van der Lippe3c7eedc2020-10-20 10:21:591887 export interface NetworkDispatcher {
Jack Franklin82978692020-03-12 14:06:421888 /**
1889 * Fired when data chunk was received over the network.
1890 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281891 dataReceived(params: Protocol.Network.DataReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421892
1893 /**
1894 * Fired when EventSource message is received.
1895 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281896 eventSourceMessageReceived(params: Protocol.Network.EventSourceMessageReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421897
1898 /**
1899 * Fired when HTTP request has failed to load.
1900 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281901 loadingFailed(params: Protocol.Network.LoadingFailedEvent): void;
Jack Franklin82978692020-03-12 14:06:421902
1903 /**
1904 * Fired when HTTP request has finished loading.
1905 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281906 loadingFinished(params: Protocol.Network.LoadingFinishedEvent): void;
Jack Franklin82978692020-03-12 14:06:421907
1908 /**
1909 * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
1910 * mocked.
1911 * Deprecated, use Fetch.requestPaused instead.
1912 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281913 requestIntercepted(params: Protocol.Network.RequestInterceptedEvent): void;
Jack Franklin82978692020-03-12 14:06:421914
1915 /**
1916 * Fired if request ended up loading from cache.
1917 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281918 requestServedFromCache(params: Protocol.Network.RequestServedFromCacheEvent): void;
Jack Franklin82978692020-03-12 14:06:421919
1920 /**
1921 * Fired when page is about to send HTTP request.
1922 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281923 requestWillBeSent(params: Protocol.Network.RequestWillBeSentEvent): void;
Jack Franklin82978692020-03-12 14:06:421924
1925 /**
1926 * Fired when resource loading priority is changed
1927 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281928 resourceChangedPriority(params: Protocol.Network.ResourceChangedPriorityEvent): void;
Jack Franklin82978692020-03-12 14:06:421929
1930 /**
1931 * Fired when a signed exchange was received over the network
1932 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281933 signedExchangeReceived(params: Protocol.Network.SignedExchangeReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421934
1935 /**
1936 * Fired when HTTP response is available.
1937 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281938 responseReceived(params: Protocol.Network.ResponseReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421939
1940 /**
1941 * Fired when WebSocket is closed.
1942 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281943 webSocketClosed(params: Protocol.Network.WebSocketClosedEvent): void;
Jack Franklin82978692020-03-12 14:06:421944
1945 /**
1946 * Fired upon WebSocket creation.
1947 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281948 webSocketCreated(params: Protocol.Network.WebSocketCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:421949
1950 /**
1951 * Fired when WebSocket message error occurs.
1952 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281953 webSocketFrameError(params: Protocol.Network.WebSocketFrameErrorEvent): void;
Jack Franklin82978692020-03-12 14:06:421954
1955 /**
1956 * Fired when WebSocket message is received.
1957 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281958 webSocketFrameReceived(params: Protocol.Network.WebSocketFrameReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421959
1960 /**
1961 * Fired when WebSocket message is sent.
1962 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281963 webSocketFrameSent(params: Protocol.Network.WebSocketFrameSentEvent): void;
Jack Franklin82978692020-03-12 14:06:421964
1965 /**
1966 * Fired when WebSocket handshake response becomes available.
1967 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281968 webSocketHandshakeResponseReceived(params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent): void;
Jack Franklin82978692020-03-12 14:06:421969
1970 /**
1971 * Fired when WebSocket is about to initiate handshake.
1972 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281973 webSocketWillSendHandshakeRequest(params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent): void;
Jack Franklin82978692020-03-12 14:06:421974
1975 /**
Simon Zünda37afbf2020-12-01 10:29:571976 * Fired upon WebTransport creation.
1977 */
1978 webTransportCreated(params: Protocol.Network.WebTransportCreatedEvent): void;
1979
Yoichi Osato52fcc522021-01-26 07:21:491980 /**
1981 * Fired when WebTransport handshake is finished.
1982 */
1983 webTransportConnectionEstablished(params: Protocol.Network.WebTransportConnectionEstablishedEvent): void;
1984
1985 /**
1986 * Fired when WebTransport is disposed.
1987 */
Simon Zünda37afbf2020-12-01 10:29:571988 webTransportClosed(params: Protocol.Network.WebTransportClosedEvent): void;
1989
1990 /**
Jack Franklin82978692020-03-12 14:06:421991 * Fired when additional information about a requestWillBeSent event is available from the
1992 * network stack. Not every requestWillBeSent event will have an additional
1993 * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
1994 * or requestWillBeSentExtraInfo will be fired first for the same request.
1995 */
Tim van der Lipped1c8d6c2020-05-12 13:56:281996 requestWillBeSentExtraInfo(params: Protocol.Network.RequestWillBeSentExtraInfoEvent): void;
Jack Franklin82978692020-03-12 14:06:421997
1998 /**
1999 * Fired when additional information about a responseReceived event is available from the network
2000 * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
2001 * it, and responseReceivedExtraInfo may be fired before or after responseReceived.
2002 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282003 responseReceivedExtraInfo(params: Protocol.Network.ResponseReceivedExtraInfoEvent): void;
Simon Zünda37afbf2020-12-01 10:29:572004
2005 /**
2006 * Fired exactly once for each Trust Token operation. Depending on
2007 * the type of the operation and whether the operation succeeded or
2008 * failed, the event is fired before the corresponding request was sent
2009 * or after the response was received.
2010 */
2011 trustTokenOperationDone(params: Protocol.Network.TrustTokenOperationDoneEvent): void;
Jack Franklin82978692020-03-12 14:06:422012 }
2013
2014 export interface OverlayApi {
2015 /**
2016 * Disables domain notifications.
2017 */
Tim van der Lippe48335362020-05-12 14:34:152018 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422019
2020 /**
2021 * Enables domain notifications.
2022 */
Tim van der Lippe48335362020-05-12 14:34:152023 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422024
2025 /**
2026 * For testing.
2027 */
Tim van der Lippe96de6062020-04-27 16:30:502028 invoke_getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest):
Jack Franklin82978692020-03-12 14:06:422029 Promise<Protocol.Overlay.GetHighlightObjectForTestResponse>;
2030
2031 /**
Fawaz Mohammad89cfdb12020-07-13 17:52:292032 * For Persistent Grid testing.
2033 */
2034 invoke_getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest):
2035 Promise<Protocol.Overlay.GetGridHighlightObjectsForTestResponse>;
2036
2037 /**
Olivia Flynn828c1802020-07-31 18:44:052038 * For Source Order Viewer testing.
2039 */
2040 invoke_getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest):
2041 Promise<Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse>;
2042
2043 /**
Jack Franklin82978692020-03-12 14:06:422044 * Hides any highlight.
2045 */
Tim van der Lippe48335362020-05-12 14:34:152046 invoke_hideHighlight(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422047
2048 /**
2049 * Highlights owner element of the frame with given id.
2050 */
Tim van der Lippe48335362020-05-12 14:34:152051 invoke_highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422052
2053 /**
2054 * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
2055 * objectId must be specified.
2056 */
Tim van der Lippe48335362020-05-12 14:34:152057 invoke_highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422058
2059 /**
2060 * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
2061 */
Tim van der Lippe48335362020-05-12 14:34:152062 invoke_highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422063
2064 /**
2065 * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
2066 */
Tim van der Lippe48335362020-05-12 14:34:152067 invoke_highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422068
2069 /**
Olivia Flynn828c1802020-07-31 18:44:052070 * Highlights the source order of the children of the DOM node with given id or with the given
2071 * JavaScript object wrapper. Either nodeId or objectId must be specified.
2072 */
2073 invoke_highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest):
2074 Promise<Protocol.ProtocolResponseWithError>;
2075
2076 /**
Jack Franklin82978692020-03-12 14:06:422077 * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
2078 * Backend then generates 'inspectNodeRequested' event upon element selection.
2079 */
Tim van der Lippe48335362020-05-12 14:34:152080 invoke_setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422081
2082 /**
2083 * Highlights owner element of all frames detected to be ads.
2084 */
Tim van der Lippe48335362020-05-12 14:34:152085 invoke_setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest):
2086 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422087
Tim van der Lippe48335362020-05-12 14:34:152088 invoke_setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest):
2089 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422090
2091 /**
2092 * Requests that backend shows debug borders on layers
2093 */
Tim van der Lippe48335362020-05-12 14:34:152094 invoke_setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest):
2095 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422096
2097 /**
2098 * Requests that backend shows the FPS counter
2099 */
Tim van der Lippe48335362020-05-12 14:34:152100 invoke_setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest):
2101 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422102
2103 /**
Fawaz Mohammad89cfdb12020-07-13 17:52:292104 * Highlight multiple elements with the CSS Grid overlay.
2105 */
2106 invoke_setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest):
2107 Promise<Protocol.ProtocolResponseWithError>;
2108
Alex Rudenko42bab2c2020-11-17 11:47:072109 invoke_setShowFlexOverlays(params: Protocol.Overlay.SetShowFlexOverlaysRequest):
2110 Promise<Protocol.ProtocolResponseWithError>;
2111
Alex Rudenkoecbaa922021-03-30 10:47:172112 invoke_setShowScrollSnapOverlays(params: Protocol.Overlay.SetShowScrollSnapOverlaysRequest):
2113 Promise<Protocol.ProtocolResponseWithError>;
2114
Fawaz Mohammad89cfdb12020-07-13 17:52:292115 /**
Jack Franklin82978692020-03-12 14:06:422116 * Requests that backend shows paint rectangles
2117 */
Tim van der Lippe48335362020-05-12 14:34:152118 invoke_setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest):
2119 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422120
2121 /**
2122 * Requests that backend shows layout shift regions
2123 */
Tim van der Lippe48335362020-05-12 14:34:152124 invoke_setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest):
2125 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422126
2127 /**
2128 * Requests that backend shows scroll bottleneck rects
2129 */
Tim van der Lippe48335362020-05-12 14:34:152130 invoke_setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest):
2131 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422132
2133 /**
2134 * Requests that backend shows hit-test borders on layers
2135 */
Tim van der Lippe48335362020-05-12 14:34:152136 invoke_setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest):
2137 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422138
2139 /**
Andrey Kosyakov5fccb462021-01-21 00:23:202140 * Request that backend shows an overlay with web vital metrics.
2141 */
2142 invoke_setShowWebVitals(params: Protocol.Overlay.SetShowWebVitalsRequest):
2143 Promise<Protocol.ProtocolResponseWithError>;
2144
2145 /**
Jack Franklin82978692020-03-12 14:06:422146 * Paints viewport size upon main frame resize.
2147 */
Tim van der Lippe48335362020-05-12 14:34:152148 invoke_setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest):
2149 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422150
2151 /**
Alex Rudenko00931d62020-05-04 07:46:362152 * Add a dual screen device hinge
2153 */
Tim van der Lippe48335362020-05-12 14:34:152154 invoke_setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282155 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592156 export interface OverlayDispatcher {
Alex Rudenko00931d62020-05-04 07:46:362157 /**
Jack Franklin82978692020-03-12 14:06:422158 * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
2159 * user manually inspects an element.
2160 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282161 inspectNodeRequested(params: Protocol.Overlay.InspectNodeRequestedEvent): void;
Jack Franklin82978692020-03-12 14:06:422162
2163 /**
2164 * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
2165 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282166 nodeHighlightRequested(params: Protocol.Overlay.NodeHighlightRequestedEvent): void;
Jack Franklin82978692020-03-12 14:06:422167
2168 /**
2169 * Fired when user asks to capture screenshot of some area on the page.
2170 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282171 screenshotRequested(params: Protocol.Overlay.ScreenshotRequestedEvent): void;
Jack Franklin82978692020-03-12 14:06:422172
2173 /**
2174 * Fired when user cancels the inspect mode.
2175 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282176 inspectModeCanceled(): void;
Jack Franklin82978692020-03-12 14:06:422177 }
2178
2179 export interface PageApi {
2180 /**
2181 * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
2182 */
Tim van der Lippe96de6062020-04-27 16:30:502183 invoke_addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest):
Jack Franklin82978692020-03-12 14:06:422184 Promise<Protocol.Page.AddScriptToEvaluateOnLoadResponse>;
2185
2186 /**
2187 * Evaluates given script in every frame upon creation (before loading frame's scripts).
2188 */
Tim van der Lippe96de6062020-04-27 16:30:502189 invoke_addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest):
Jack Franklin82978692020-03-12 14:06:422190 Promise<Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse>;
2191
2192 /**
2193 * Brings page to front (activates tab).
2194 */
Tim van der Lippe48335362020-05-12 14:34:152195 invoke_bringToFront(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422196
2197 /**
2198 * Capture page screenshot.
2199 */
Tim van der Lippe96de6062020-04-27 16:30:502200 invoke_captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest):
2201 Promise<Protocol.Page.CaptureScreenshotResponse>;
Jack Franklin82978692020-03-12 14:06:422202
2203 /**
2204 * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
2205 * iframes, shadow DOM, external resources, and element-inline styles.
2206 */
Tim van der Lippe96de6062020-04-27 16:30:502207 invoke_captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest):
2208 Promise<Protocol.Page.CaptureSnapshotResponse>;
Jack Franklin82978692020-03-12 14:06:422209
2210 /**
Simon Zünddc192602021-04-29 06:20:312211 * Clears the overridden device metrics.
Jack Franklin82978692020-03-12 14:06:422212 */
Tim van der Lippe48335362020-05-12 14:34:152213 invoke_clearDeviceMetricsOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422214
2215 /**
2216 * Clears the overridden Device Orientation.
2217 */
Tim van der Lippe48335362020-05-12 14:34:152218 invoke_clearDeviceOrientationOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422219
2220 /**
Simon Zünddc192602021-04-29 06:20:312221 * Clears the overridden Geolocation Position and Error.
Jack Franklin82978692020-03-12 14:06:422222 */
Tim van der Lippe48335362020-05-12 14:34:152223 invoke_clearGeolocationOverride(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422224
2225 /**
2226 * Creates an isolated world for the given frame.
2227 */
Tim van der Lippe96de6062020-04-27 16:30:502228 invoke_createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest):
Jack Franklin82978692020-03-12 14:06:422229 Promise<Protocol.Page.CreateIsolatedWorldResponse>;
2230
2231 /**
2232 * Deletes browser cookie with given name, domain and path.
2233 */
Tim van der Lippe48335362020-05-12 14:34:152234 invoke_deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422235
2236 /**
2237 * Disables page domain notifications.
2238 */
Tim van der Lippe48335362020-05-12 14:34:152239 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422240
2241 /**
2242 * Enables page domain notifications.
2243 */
Tim van der Lippe48335362020-05-12 14:34:152244 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422245
Tim van der Lippe96de6062020-04-27 16:30:502246 invoke_getAppManifest(): Promise<Protocol.Page.GetAppManifestResponse>;
Jack Franklin82978692020-03-12 14:06:422247
Tim van der Lippe96de6062020-04-27 16:30:502248 invoke_getInstallabilityErrors(): Promise<Protocol.Page.GetInstallabilityErrorsResponse>;
Jack Franklin82978692020-03-12 14:06:422249
Tim van der Lippe96de6062020-04-27 16:30:502250 invoke_getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
Jack Franklin82978692020-03-12 14:06:422251
2252 /**
2253 * Returns all browser cookies. Depending on the backend support, will return detailed cookie
2254 * information in the `cookies` field.
2255 */
Tim van der Lippe96de6062020-04-27 16:30:502256 invoke_getCookies(): Promise<Protocol.Page.GetCookiesResponse>;
Jack Franklin82978692020-03-12 14:06:422257
2258 /**
2259 * Returns present frame tree structure.
2260 */
Tim van der Lippe96de6062020-04-27 16:30:502261 invoke_getFrameTree(): Promise<Protocol.Page.GetFrameTreeResponse>;
Jack Franklin82978692020-03-12 14:06:422262
2263 /**
2264 * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
2265 */
Tim van der Lippe96de6062020-04-27 16:30:502266 invoke_getLayoutMetrics(): Promise<Protocol.Page.GetLayoutMetricsResponse>;
Jack Franklin82978692020-03-12 14:06:422267
2268 /**
2269 * Returns navigation history for the current page.
2270 */
Tim van der Lippe96de6062020-04-27 16:30:502271 invoke_getNavigationHistory(): Promise<Protocol.Page.GetNavigationHistoryResponse>;
Jack Franklin82978692020-03-12 14:06:422272
2273 /**
2274 * Resets navigation history for the current page.
2275 */
Tim van der Lippe48335362020-05-12 14:34:152276 invoke_resetNavigationHistory(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422277
2278 /**
2279 * Returns content of the given resource.
2280 */
Tim van der Lippe96de6062020-04-27 16:30:502281 invoke_getResourceContent(params: Protocol.Page.GetResourceContentRequest):
Jack Franklin82978692020-03-12 14:06:422282 Promise<Protocol.Page.GetResourceContentResponse>;
2283
2284 /**
2285 * Returns present frame / resource tree structure.
2286 */
Tim van der Lippe96de6062020-04-27 16:30:502287 invoke_getResourceTree(): Promise<Protocol.Page.GetResourceTreeResponse>;
Jack Franklin82978692020-03-12 14:06:422288
2289 /**
2290 * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
2291 */
Tim van der Lippe48335362020-05-12 14:34:152292 invoke_handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest):
2293 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422294
2295 /**
2296 * Navigates current page to the given URL.
2297 */
Tim van der Lippe96de6062020-04-27 16:30:502298 invoke_navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;
Jack Franklin82978692020-03-12 14:06:422299
2300 /**
2301 * Navigates current page to the given history entry.
2302 */
Tim van der Lippe48335362020-05-12 14:34:152303 invoke_navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest):
2304 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422305
2306 /**
2307 * Print page as PDF.
2308 */
Tim van der Lippe96de6062020-04-27 16:30:502309 invoke_printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise<Protocol.Page.PrintToPDFResponse>;
Jack Franklin82978692020-03-12 14:06:422310
2311 /**
2312 * Reloads given page optionally ignoring the cache.
2313 */
Tim van der Lippe48335362020-05-12 14:34:152314 invoke_reload(params: Protocol.Page.ReloadRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422315
2316 /**
2317 * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
2318 */
Tim van der Lippe48335362020-05-12 14:34:152319 invoke_removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest):
2320 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422321
2322 /**
2323 * Removes given script from the list.
2324 */
Tim van der Lippe96de6062020-04-27 16:30:502325 invoke_removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest):
Tim van der Lippe48335362020-05-12 14:34:152326 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422327
2328 /**
2329 * Acknowledges that a screencast frame has been received by the frontend.
2330 */
Tim van der Lippe48335362020-05-12 14:34:152331 invoke_screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest):
2332 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422333
2334 /**
2335 * Searches for given string in resource content.
2336 */
Tim van der Lippe96de6062020-04-27 16:30:502337 invoke_searchInResource(params: Protocol.Page.SearchInResourceRequest):
2338 Promise<Protocol.Page.SearchInResourceResponse>;
Jack Franklin82978692020-03-12 14:06:422339
2340 /**
2341 * Enable Chrome's experimental ad filter on all sites.
2342 */
Tim van der Lippe48335362020-05-12 14:34:152343 invoke_setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest):
2344 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422345
2346 /**
2347 * Enable page Content Security Policy by-passing.
2348 */
Tim van der Lippe48335362020-05-12 14:34:152349 invoke_setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422350
2351 /**
Sigurd Schneider0f767a62021-02-18 08:30:432352 * Get Permissions Policy state on given frame.
2353 */
2354 invoke_getPermissionsPolicyState(params: Protocol.Page.GetPermissionsPolicyStateRequest):
2355 Promise<Protocol.Page.GetPermissionsPolicyStateResponse>;
2356
2357 /**
Jack Franklin82978692020-03-12 14:06:422358 * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
2359 * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
2360 * query results).
2361 */
Tim van der Lippe48335362020-05-12 14:34:152362 invoke_setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest):
2363 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422364
2365 /**
2366 * Overrides the Device Orientation.
2367 */
Tim van der Lippe48335362020-05-12 14:34:152368 invoke_setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest):
2369 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422370
2371 /**
2372 * Set generic font families.
2373 */
Tim van der Lippe48335362020-05-12 14:34:152374 invoke_setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422375
2376 /**
2377 * Set default font sizes.
2378 */
Tim van der Lippe48335362020-05-12 14:34:152379 invoke_setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422380
2381 /**
2382 * Sets given markup as the document's HTML.
2383 */
Tim van der Lippe48335362020-05-12 14:34:152384 invoke_setDocumentContent(params: Protocol.Page.SetDocumentContentRequest):
2385 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422386
2387 /**
2388 * Set the behavior when downloading a file.
2389 */
Tim van der Lippe48335362020-05-12 14:34:152390 invoke_setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest):
2391 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422392
2393 /**
2394 * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
2395 * unavailable.
2396 */
Tim van der Lippe48335362020-05-12 14:34:152397 invoke_setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest):
2398 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422399
2400 /**
2401 * Controls whether page will emit lifecycle events.
2402 */
Tim van der Lippe48335362020-05-12 14:34:152403 invoke_setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest):
2404 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422405
2406 /**
2407 * Toggles mouse event-based touch event emulation.
2408 */
Tim van der Lippe48335362020-05-12 14:34:152409 invoke_setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest):
2410 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422411
2412 /**
2413 * Starts sending each frame using the `screencastFrame` event.
2414 */
Tim van der Lippe48335362020-05-12 14:34:152415 invoke_startScreencast(params: Protocol.Page.StartScreencastRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422416
2417 /**
2418 * Force the page stop all navigations and pending resource fetches.
2419 */
Tim van der Lippe48335362020-05-12 14:34:152420 invoke_stopLoading(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422421
2422 /**
2423 * Crashes renderer on the IO thread, generates minidumps.
2424 */
Tim van der Lippe48335362020-05-12 14:34:152425 invoke_crash(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422426
2427 /**
2428 * Tries to close page, running its beforeunload hooks, if any.
2429 */
Tim van der Lippe48335362020-05-12 14:34:152430 invoke_close(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422431
2432 /**
2433 * Tries to update the web lifecycle state of the page.
2434 * It will transition the page to the given state according to:
2435 * https://github.com/WICG/web-lifecycle/
2436 */
Tim van der Lippe48335362020-05-12 14:34:152437 invoke_setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest):
2438 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422439
2440 /**
2441 * Stops sending each frame in the `screencastFrame`.
2442 */
Tim van der Lippe48335362020-05-12 14:34:152443 invoke_stopScreencast(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422444
2445 /**
2446 * Forces compilation cache to be generated for every subresource script.
Simon Zünd91cd7292021-03-10 07:21:512447 * See also: `Page.produceCompilationCache`.
Jack Franklin82978692020-03-12 14:06:422448 */
Tim van der Lippe48335362020-05-12 14:34:152449 invoke_setProduceCompilationCache(params: Protocol.Page.SetProduceCompilationCacheRequest):
2450 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422451
2452 /**
Simon Zünd91cd7292021-03-10 07:21:512453 * Requests backend to produce compilation cache for the specified scripts.
2454 * Unlike setProduceCompilationCache, this allows client to only produce cache
2455 * for specific scripts. `scripts` are appeneded to the list of scripts
2456 * for which the cache for would produced. Disabling compilation cache with
2457 * `setProduceCompilationCache` would reset all pending cache requests.
2458 * The list may also be reset during page navigation.
2459 * When script with a matching URL is encountered, the cache is optionally
2460 * produced upon backend discretion, based on internal heuristics.
2461 * See also: `Page.compilationCacheProduced`.
2462 */
2463 invoke_produceCompilationCache(params: Protocol.Page.ProduceCompilationCacheRequest):
2464 Promise<Protocol.ProtocolResponseWithError>;
2465
2466 /**
Jack Franklin82978692020-03-12 14:06:422467 * Seeds compilation cache for given url. Compilation cache does not survive
2468 * cross-process navigation.
2469 */
Tim van der Lippe48335362020-05-12 14:34:152470 invoke_addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest):
2471 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422472
2473 /**
2474 * Clears seeded compilation cache.
2475 */
Tim van der Lippe48335362020-05-12 14:34:152476 invoke_clearCompilationCache(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422477
2478 /**
2479 * Generates a report for testing.
2480 */
Tim van der Lippe48335362020-05-12 14:34:152481 invoke_generateTestReport(params: Protocol.Page.GenerateTestReportRequest):
2482 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422483
2484 /**
2485 * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
2486 */
Tim van der Lippe48335362020-05-12 14:34:152487 invoke_waitForDebugger(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422488
2489 /**
2490 * Intercept file chooser requests and transfer control to protocol clients.
2491 * When file chooser interception is enabled, native file chooser dialog is not shown.
2492 * Instead, a protocol event `Page.fileChooserOpened` is emitted.
2493 */
Tim van der Lippe48335362020-05-12 14:34:152494 invoke_setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest):
2495 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282496 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592497 export interface PageDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:282498 domContentEventFired(params: Protocol.Page.DomContentEventFiredEvent): void;
Jack Franklin82978692020-03-12 14:06:422499
2500 /**
2501 * Emitted only when `page.interceptFileChooser` is enabled.
2502 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282503 fileChooserOpened(params: Protocol.Page.FileChooserOpenedEvent): void;
Jack Franklin82978692020-03-12 14:06:422504
2505 /**
2506 * Fired when frame has been attached to its parent.
2507 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282508 frameAttached(params: Protocol.Page.FrameAttachedEvent): void;
Jack Franklin82978692020-03-12 14:06:422509
2510 /**
2511 * Fired when frame no longer has a scheduled navigation.
2512 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282513 frameClearedScheduledNavigation(params: Protocol.Page.FrameClearedScheduledNavigationEvent): void;
Jack Franklin82978692020-03-12 14:06:422514
2515 /**
2516 * Fired when frame has been detached from its parent.
2517 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282518 frameDetached(params: Protocol.Page.FrameDetachedEvent): void;
Jack Franklin82978692020-03-12 14:06:422519
2520 /**
2521 * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
2522 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282523 frameNavigated(params: Protocol.Page.FrameNavigatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422524
Wolfgang Beyera36129e2020-11-13 08:03:322525 /**
2526 * Fired when opening document to write to.
2527 */
2528 documentOpened(params: Protocol.Page.DocumentOpenedEvent): void;
2529
Tim van der Lipped1c8d6c2020-05-12 13:56:282530 frameResized(): void;
Jack Franklin82978692020-03-12 14:06:422531
2532 /**
2533 * Fired when a renderer-initiated navigation is requested.
2534 * Navigation may still be cancelled after the event is issued.
2535 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282536 frameRequestedNavigation(params: Protocol.Page.FrameRequestedNavigationEvent): void;
Jack Franklin82978692020-03-12 14:06:422537
2538 /**
2539 * Fired when frame schedules a potential navigation.
2540 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282541 frameScheduledNavigation(params: Protocol.Page.FrameScheduledNavigationEvent): void;
Jack Franklin82978692020-03-12 14:06:422542
2543 /**
2544 * Fired when frame has started loading.
2545 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282546 frameStartedLoading(params: Protocol.Page.FrameStartedLoadingEvent): void;
Jack Franklin82978692020-03-12 14:06:422547
2548 /**
2549 * Fired when frame has stopped loading.
2550 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282551 frameStoppedLoading(params: Protocol.Page.FrameStoppedLoadingEvent): void;
Jack Franklin82978692020-03-12 14:06:422552
2553 /**
2554 * Fired when page is about to start a download.
Alex Rudenko16c517d2021-04-12 07:55:122555 * Deprecated. Use Browser.downloadWillBegin instead.
Jack Franklin82978692020-03-12 14:06:422556 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282557 downloadWillBegin(params: Protocol.Page.DownloadWillBeginEvent): void;
Jack Franklin82978692020-03-12 14:06:422558
2559 /**
Wolfgang Beyer209a6442020-04-23 10:59:432560 * Fired when download makes progress. Last call has |done| == true.
Alex Rudenko16c517d2021-04-12 07:55:122561 * Deprecated. Use Browser.downloadProgress instead.
Wolfgang Beyer209a6442020-04-23 10:59:432562 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282563 downloadProgress(params: Protocol.Page.DownloadProgressEvent): void;
Wolfgang Beyer209a6442020-04-23 10:59:432564
2565 /**
Jack Franklin82978692020-03-12 14:06:422566 * Fired when interstitial page was hidden
2567 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282568 interstitialHidden(): void;
Jack Franklin82978692020-03-12 14:06:422569
2570 /**
2571 * Fired when interstitial page was shown
2572 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282573 interstitialShown(): void;
Jack Franklin82978692020-03-12 14:06:422574
2575 /**
2576 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
2577 * closed.
2578 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282579 javascriptDialogClosed(params: Protocol.Page.JavascriptDialogClosedEvent): void;
Jack Franklin82978692020-03-12 14:06:422580
2581 /**
2582 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
2583 * open.
2584 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282585 javascriptDialogOpening(params: Protocol.Page.JavascriptDialogOpeningEvent): void;
Jack Franklin82978692020-03-12 14:06:422586
2587 /**
2588 * Fired for top level page lifecycle events such as navigation, load, paint, etc.
2589 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282590 lifecycleEvent(params: Protocol.Page.LifecycleEventEvent): void;
Jack Franklin82978692020-03-12 14:06:422591
Sigurd Schneider3660f782021-04-19 06:44:462592 /**
2593 * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
2594 * not assume any ordering with the Page.frameNavigated event. This event is fired only for
2595 * main-frame history navigation where the document changes (non-same-document navigations),
2596 * when bfcache navigation fails.
2597 */
2598 backForwardCacheNotUsed(params: Protocol.Page.BackForwardCacheNotUsedEvent): void;
2599
Tim van der Lipped1c8d6c2020-05-12 13:56:282600 loadEventFired(params: Protocol.Page.LoadEventFiredEvent): void;
Jack Franklin82978692020-03-12 14:06:422601
2602 /**
2603 * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
2604 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282605 navigatedWithinDocument(params: Protocol.Page.NavigatedWithinDocumentEvent): void;
Jack Franklin82978692020-03-12 14:06:422606
2607 /**
2608 * Compressed image data requested by the `startScreencast`.
2609 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282610 screencastFrame(params: Protocol.Page.ScreencastFrameEvent): void;
Jack Franklin82978692020-03-12 14:06:422611
2612 /**
2613 * Fired when the page with currently enabled screencast was shown or hidden `.
2614 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282615 screencastVisibilityChanged(params: Protocol.Page.ScreencastVisibilityChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:422616
2617 /**
2618 * Fired when a new window is going to be opened, via window.open(), link click, form submission,
2619 * etc.
2620 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282621 windowOpen(params: Protocol.Page.WindowOpenEvent): void;
Jack Franklin82978692020-03-12 14:06:422622
2623 /**
2624 * Issued for every compilation cache generated. Is only available
2625 * if Page.setGenerateCompilationCache is enabled.
2626 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282627 compilationCacheProduced(params: Protocol.Page.CompilationCacheProducedEvent): void;
Jack Franklin82978692020-03-12 14:06:422628 }
2629
2630 export interface PerformanceApi {
2631 /**
2632 * Disable collecting and reporting metrics.
2633 */
Tim van der Lippe48335362020-05-12 14:34:152634 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422635
2636 /**
2637 * Enable collecting and reporting metrics.
2638 */
Tim van der Lippe48335362020-05-12 14:34:152639 invoke_enable(params: Protocol.Performance.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422640
2641 /**
2642 * Sets time domain to use for collecting and reporting duration metrics.
2643 * Note that this must be called before enabling metrics collection. Calling
2644 * this method while metrics collection is enabled returns an error.
2645 */
Tim van der Lippe48335362020-05-12 14:34:152646 invoke_setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest):
2647 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422648
2649 /**
2650 * Retrieve current values of run-time metrics.
2651 */
Tim van der Lippe96de6062020-04-27 16:30:502652 invoke_getMetrics(): Promise<Protocol.Performance.GetMetricsResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282653 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592654 export interface PerformanceDispatcher {
Jack Franklin82978692020-03-12 14:06:422655 /**
2656 * Current values of the metrics.
2657 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282658 metrics(params: Protocol.Performance.MetricsEvent): void;
Jack Franklin82978692020-03-12 14:06:422659 }
2660
Simon Zündccdfc9b2021-01-11 12:27:142661 export interface PerformanceTimelineApi {
2662 /**
2663 * Previously buffered events would be reported before method returns.
2664 * See also: timelineEventAdded
2665 */
2666 invoke_enable(params: Protocol.PerformanceTimeline.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
2667 }
2668 export interface PerformanceTimelineDispatcher {
2669 /**
2670 * Sent when a performance timeline event is added. See reportPerformanceTimeline method.
2671 */
2672 timelineEventAdded(params: Protocol.PerformanceTimeline.TimelineEventAddedEvent): void;
2673 }
2674
Jack Franklin82978692020-03-12 14:06:422675 export interface SecurityApi {
2676 /**
2677 * Disables tracking security state changes.
2678 */
Tim van der Lippe48335362020-05-12 14:34:152679 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422680
2681 /**
2682 * Enables tracking security state changes.
2683 */
Tim van der Lippe48335362020-05-12 14:34:152684 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422685
2686 /**
2687 * Enable/disable whether all certificate errors should be ignored.
2688 */
Tim van der Lippe48335362020-05-12 14:34:152689 invoke_setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest):
2690 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422691
2692 /**
2693 * Handles a certificate error that fired a certificateError event.
2694 */
Tim van der Lippe48335362020-05-12 14:34:152695 invoke_handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest):
2696 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422697
2698 /**
2699 * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
2700 * be handled by the DevTools client and should be answered with `handleCertificateError` commands.
2701 */
Tim van der Lippe48335362020-05-12 14:34:152702 invoke_setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest):
2703 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282704 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592705 export interface SecurityDispatcher {
Jack Franklin82978692020-03-12 14:06:422706 /**
2707 * There is a certificate error. If overriding certificate errors is enabled, then it should be
2708 * handled with the `handleCertificateError` command. Note: this event does not fire if the
2709 * certificate error has been allowed internally. Only one client per target should override
2710 * certificate errors at the same time.
2711 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282712 certificateError(params: Protocol.Security.CertificateErrorEvent): void;
Jack Franklin82978692020-03-12 14:06:422713
2714 /**
2715 * The security state of the page changed.
2716 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282717 visibleSecurityStateChanged(params: Protocol.Security.VisibleSecurityStateChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:422718
2719 /**
2720 * The security state of the page changed.
2721 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282722 securityStateChanged(params: Protocol.Security.SecurityStateChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:422723 }
2724
2725 export interface ServiceWorkerApi {
Tim van der Lippe48335362020-05-12 14:34:152726 invoke_deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest):
2727 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422728
Tim van der Lippe48335362020-05-12 14:34:152729 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422730
Tim van der Lippe48335362020-05-12 14:34:152731 invoke_dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest):
2732 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422733
Tim van der Lippe48335362020-05-12 14:34:152734 invoke_dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest):
2735 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422736
Tim van der Lippe48335362020-05-12 14:34:152737 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422738
Tim van der Lippe48335362020-05-12 14:34:152739 invoke_inspectWorker(params: Protocol.ServiceWorker.InspectWorkerRequest):
2740 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422741
Tim van der Lippe48335362020-05-12 14:34:152742 invoke_setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest):
2743 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422744
Tim van der Lippe48335362020-05-12 14:34:152745 invoke_skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422746
Tim van der Lippe48335362020-05-12 14:34:152747 invoke_startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422748
Tim van der Lippe48335362020-05-12 14:34:152749 invoke_stopAllWorkers(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422750
Tim van der Lippe48335362020-05-12 14:34:152751 invoke_stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422752
Tim van der Lippe48335362020-05-12 14:34:152753 invoke_unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422754
Tim van der Lippe48335362020-05-12 14:34:152755 invoke_updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest):
2756 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282757 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592758 export interface ServiceWorkerDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:282759 workerErrorReported(params: Protocol.ServiceWorker.WorkerErrorReportedEvent): void;
Jack Franklin82978692020-03-12 14:06:422760
Tim van der Lipped1c8d6c2020-05-12 13:56:282761 workerRegistrationUpdated(params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422762
Tim van der Lipped1c8d6c2020-05-12 13:56:282763 workerVersionUpdated(params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422764 }
2765
2766 export interface StorageApi {
2767 /**
2768 * Clears storage for origin.
2769 */
Tim van der Lippe48335362020-05-12 14:34:152770 invoke_clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest):
2771 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422772
2773 /**
2774 * Returns all browser cookies.
2775 */
Tim van der Lippe96de6062020-04-27 16:30:502776 invoke_getCookies(params: Protocol.Storage.GetCookiesRequest): Promise<Protocol.Storage.GetCookiesResponse>;
Jack Franklin82978692020-03-12 14:06:422777
2778 /**
2779 * Sets given cookies.
2780 */
Tim van der Lippe48335362020-05-12 14:34:152781 invoke_setCookies(params: Protocol.Storage.SetCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422782
2783 /**
2784 * Clears cookies.
2785 */
Tim van der Lippe48335362020-05-12 14:34:152786 invoke_clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422787
2788 /**
2789 * Returns usage and quota in bytes.
2790 */
Tim van der Lippe96de6062020-04-27 16:30:502791 invoke_getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest):
Jack Franklin82978692020-03-12 14:06:422792 Promise<Protocol.Storage.GetUsageAndQuotaResponse>;
2793
2794 /**
Sigurd Schneider78542872020-10-21 08:19:462795 * Override quota for the specified origin
2796 */
2797 invoke_overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest):
2798 Promise<Protocol.ProtocolResponseWithError>;
2799
2800 /**
Jack Franklin82978692020-03-12 14:06:422801 * Registers origin to be notified when an update occurs to its cache storage list.
2802 */
Tim van der Lippe48335362020-05-12 14:34:152803 invoke_trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest):
2804 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422805
2806 /**
2807 * Registers origin to be notified when an update occurs to its IndexedDB.
2808 */
Tim van der Lippe48335362020-05-12 14:34:152809 invoke_trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest):
2810 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422811
2812 /**
2813 * Unregisters origin from receiving notifications for cache storage.
2814 */
Tim van der Lippe48335362020-05-12 14:34:152815 invoke_untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest):
2816 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422817
2818 /**
2819 * Unregisters origin from receiving notifications for IndexedDB.
2820 */
Tim van der Lippe48335362020-05-12 14:34:152821 invoke_untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest):
2822 Promise<Protocol.ProtocolResponseWithError>;
Simon Zünd2b3b5ea2021-01-21 09:04:252823
2824 /**
2825 * Returns the number of stored Trust Tokens per issuer for the
2826 * current browsing context.
2827 */
2828 invoke_getTrustTokens(): Promise<Protocol.Storage.GetTrustTokensResponse>;
Simon Zünd91cd7292021-03-10 07:21:512829
2830 /**
2831 * Removes all Trust Tokens issued by the provided issuerOrigin.
2832 * Leaves other stored data, including the issuer's Redemption Records, intact.
2833 */
2834 invoke_clearTrustTokens(params: Protocol.Storage.ClearTrustTokensRequest):
2835 Promise<Protocol.Storage.ClearTrustTokensResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282836 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592837 export interface StorageDispatcher {
Jack Franklin82978692020-03-12 14:06:422838 /**
2839 * A cache's contents have been modified.
2840 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282841 cacheStorageContentUpdated(params: Protocol.Storage.CacheStorageContentUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422842
2843 /**
2844 * A cache has been added/deleted.
2845 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282846 cacheStorageListUpdated(params: Protocol.Storage.CacheStorageListUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422847
2848 /**
2849 * The origin's IndexedDB object store has been modified.
2850 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282851 indexedDBContentUpdated(params: Protocol.Storage.IndexedDBContentUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422852
2853 /**
2854 * The origin's IndexedDB database list has been modified.
2855 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282856 indexedDBListUpdated(params: Protocol.Storage.IndexedDBListUpdatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422857 }
2858
2859 export interface SystemInfoApi {
2860 /**
2861 * Returns information about the system.
2862 */
Tim van der Lippe96de6062020-04-27 16:30:502863 invoke_getInfo(): Promise<Protocol.SystemInfo.GetInfoResponse>;
Jack Franklin82978692020-03-12 14:06:422864
2865 /**
2866 * Returns information about all running processes.
2867 */
Tim van der Lippe96de6062020-04-27 16:30:502868 invoke_getProcessInfo(): Promise<Protocol.SystemInfo.GetProcessInfoResponse>;
Jack Franklin82978692020-03-12 14:06:422869 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592870 export interface SystemInfoDispatcher {}
Jack Franklin82978692020-03-12 14:06:422871
2872 export interface TargetApi {
2873 /**
2874 * Activates (focuses) the target.
2875 */
Tim van der Lippe48335362020-05-12 14:34:152876 invoke_activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422877
2878 /**
2879 * Attaches to the target with given id.
2880 */
Tim van der Lippe96de6062020-04-27 16:30:502881 invoke_attachToTarget(params: Protocol.Target.AttachToTargetRequest):
2882 Promise<Protocol.Target.AttachToTargetResponse>;
Jack Franklin82978692020-03-12 14:06:422883
2884 /**
2885 * Attaches to the browser target, only uses flat sessionId mode.
2886 */
Tim van der Lippe96de6062020-04-27 16:30:502887 invoke_attachToBrowserTarget(): Promise<Protocol.Target.AttachToBrowserTargetResponse>;
Jack Franklin82978692020-03-12 14:06:422888
2889 /**
2890 * Closes the target. If the target is a page that gets closed too.
2891 */
Tim van der Lippe96de6062020-04-27 16:30:502892 invoke_closeTarget(params: Protocol.Target.CloseTargetRequest): Promise<Protocol.Target.CloseTargetResponse>;
Jack Franklin82978692020-03-12 14:06:422893
2894 /**
2895 * Inject object to the target's main frame that provides a communication
2896 * channel with browser target.
2897 *
2898 * Injected object will be available as `window[bindingName]`.
2899 *
2900 * The object has the follwing API:
2901 * - `binding.send(json)` - a method to send messages over the remote debugging protocol
2902 * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
2903 */
Tim van der Lippe48335362020-05-12 14:34:152904 invoke_exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest):
2905 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422906
2907 /**
2908 * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
2909 * one.
2910 */
Tim van der Lippe96de6062020-04-27 16:30:502911 invoke_createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest):
Jack Franklin82978692020-03-12 14:06:422912 Promise<Protocol.Target.CreateBrowserContextResponse>;
2913
2914 /**
2915 * Returns all browser contexts created with `Target.createBrowserContext` method.
2916 */
Tim van der Lippe96de6062020-04-27 16:30:502917 invoke_getBrowserContexts(): Promise<Protocol.Target.GetBrowserContextsResponse>;
Jack Franklin82978692020-03-12 14:06:422918
2919 /**
2920 * Creates a new page.
2921 */
Tim van der Lippe96de6062020-04-27 16:30:502922 invoke_createTarget(params: Protocol.Target.CreateTargetRequest): Promise<Protocol.Target.CreateTargetResponse>;
Jack Franklin82978692020-03-12 14:06:422923
2924 /**
2925 * Detaches session with given id.
2926 */
Tim van der Lippe48335362020-05-12 14:34:152927 invoke_detachFromTarget(params: Protocol.Target.DetachFromTargetRequest):
2928 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422929
2930 /**
2931 * Deletes a BrowserContext. All the belonging pages will be closed without calling their
2932 * beforeunload hooks.
2933 */
Tim van der Lippe48335362020-05-12 14:34:152934 invoke_disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest):
2935 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422936
2937 /**
2938 * Returns information about a target.
2939 */
Tim van der Lippe96de6062020-04-27 16:30:502940 invoke_getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise<Protocol.Target.GetTargetInfoResponse>;
Jack Franklin82978692020-03-12 14:06:422941
2942 /**
2943 * Retrieves a list of available targets.
2944 */
Tim van der Lippe96de6062020-04-27 16:30:502945 invoke_getTargets(): Promise<Protocol.Target.GetTargetsResponse>;
Jack Franklin82978692020-03-12 14:06:422946
2947 /**
2948 * Sends protocol message over session with given id.
2949 * Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
2950 * and crbug.com/991325.
2951 */
Tim van der Lippe48335362020-05-12 14:34:152952 invoke_sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest):
2953 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422954
2955 /**
2956 * Controls whether to automatically attach to new targets which are considered to be related to
2957 * this one. When turned on, attaches to all existing related targets as well. When turned off,
2958 * automatically detaches from all currently attached targets.
2959 */
Tim van der Lippe48335362020-05-12 14:34:152960 invoke_setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422961
2962 /**
2963 * Controls whether to discover available targets and notify via
2964 * `targetCreated/targetInfoChanged/targetDestroyed` events.
2965 */
Tim van der Lippe48335362020-05-12 14:34:152966 invoke_setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest):
2967 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:422968
2969 /**
2970 * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
2971 * `true`.
2972 */
Tim van der Lippe48335362020-05-12 14:34:152973 invoke_setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest):
2974 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:282975 }
Tim van der Lippe3c7eedc2020-10-20 10:21:592976 export interface TargetDispatcher {
Jack Franklin82978692020-03-12 14:06:422977 /**
2978 * Issued when attached to target because of auto-attach or `attachToTarget` command.
2979 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282980 attachedToTarget(params: Protocol.Target.AttachedToTargetEvent): void;
Jack Franklin82978692020-03-12 14:06:422981
2982 /**
2983 * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
2984 * issued multiple times per target if multiple sessions have been attached to it.
2985 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282986 detachedFromTarget(params: Protocol.Target.DetachedFromTargetEvent): void;
Jack Franklin82978692020-03-12 14:06:422987
2988 /**
2989 * Notifies about a new protocol message received from the session (as reported in
2990 * `attachedToTarget` event).
2991 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282992 receivedMessageFromTarget(params: Protocol.Target.ReceivedMessageFromTargetEvent): void;
Jack Franklin82978692020-03-12 14:06:422993
2994 /**
2995 * Issued when a possible inspection target is created.
2996 */
Tim van der Lipped1c8d6c2020-05-12 13:56:282997 targetCreated(params: Protocol.Target.TargetCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:422998
2999 /**
3000 * Issued when a target is destroyed.
3001 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283002 targetDestroyed(params: Protocol.Target.TargetDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423003
3004 /**
3005 * Issued when a target has crashed.
3006 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283007 targetCrashed(params: Protocol.Target.TargetCrashedEvent): void;
Jack Franklin82978692020-03-12 14:06:423008
3009 /**
3010 * Issued when some information about a target has changed. This only happens between
3011 * `targetCreated` and `targetDestroyed`.
3012 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283013 targetInfoChanged(params: Protocol.Target.TargetInfoChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:423014 }
3015
3016 export interface TetheringApi {
3017 /**
3018 * Request browser port binding.
3019 */
Tim van der Lippe48335362020-05-12 14:34:153020 invoke_bind(params: Protocol.Tethering.BindRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423021
3022 /**
3023 * Request browser port unbinding.
3024 */
Tim van der Lippe48335362020-05-12 14:34:153025 invoke_unbind(params: Protocol.Tethering.UnbindRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283026 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593027 export interface TetheringDispatcher {
Jack Franklin82978692020-03-12 14:06:423028 /**
3029 * Informs that port was successfully bound and got a specified connection id.
3030 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283031 accepted(params: Protocol.Tethering.AcceptedEvent): void;
Jack Franklin82978692020-03-12 14:06:423032 }
3033
3034 export interface TracingApi {
3035 /**
3036 * Stop trace events collection.
3037 */
Tim van der Lippe48335362020-05-12 14:34:153038 invoke_end(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423039
3040 /**
3041 * Gets supported tracing categories.
3042 */
Tim van der Lippe96de6062020-04-27 16:30:503043 invoke_getCategories(): Promise<Protocol.Tracing.GetCategoriesResponse>;
Jack Franklin82978692020-03-12 14:06:423044
3045 /**
3046 * Record a clock sync marker in the trace.
3047 */
Tim van der Lippe48335362020-05-12 14:34:153048 invoke_recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest):
3049 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423050
3051 /**
3052 * Request a global memory dump.
3053 */
Tim van der Lippe96de6062020-04-27 16:30:503054 invoke_requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest):
Jack Franklin82978692020-03-12 14:06:423055 Promise<Protocol.Tracing.RequestMemoryDumpResponse>;
3056
3057 /**
3058 * Start trace events collection.
3059 */
Tim van der Lippe48335362020-05-12 14:34:153060 invoke_start(params: Protocol.Tracing.StartRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283061 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593062 export interface TracingDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:283063 bufferUsage(params: Protocol.Tracing.BufferUsageEvent): void;
Jack Franklin82978692020-03-12 14:06:423064
3065 /**
3066 * Contains an bucket of collected trace events. When tracing is stopped collected events will be
3067 * send as a sequence of dataCollected events followed by tracingComplete event.
3068 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283069 dataCollected(params: Protocol.Tracing.DataCollectedEvent): void;
Jack Franklin82978692020-03-12 14:06:423070
3071 /**
3072 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
3073 * delivered via dataCollected events.
3074 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283075 tracingComplete(params: Protocol.Tracing.TracingCompleteEvent): void;
Jack Franklin82978692020-03-12 14:06:423076 }
3077
3078 export interface FetchApi {
3079 /**
3080 * Disables the fetch domain.
3081 */
Tim van der Lippe48335362020-05-12 14:34:153082 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423083
3084 /**
3085 * Enables issuing of requestPaused events. A request will be paused until client
3086 * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
3087 */
Tim van der Lippe48335362020-05-12 14:34:153088 invoke_enable(params: Protocol.Fetch.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423089
3090 /**
3091 * Causes the request to fail with specified reason.
3092 */
Tim van der Lippe48335362020-05-12 14:34:153093 invoke_failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423094
3095 /**
3096 * Provides response to the request.
3097 */
Tim van der Lippe48335362020-05-12 14:34:153098 invoke_fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423099
3100 /**
3101 * Continues the request, optionally modifying some of its parameters.
3102 */
Tim van der Lippe48335362020-05-12 14:34:153103 invoke_continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423104
3105 /**
3106 * Continues a request supplying authChallengeResponse following authRequired event.
3107 */
Tim van der Lippe48335362020-05-12 14:34:153108 invoke_continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest):
3109 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423110
3111 /**
3112 * Causes the body of the response to be received from the server and
3113 * returned as a single string. May only be issued for a request that
3114 * is paused in the Response stage and is mutually exclusive with
3115 * takeResponseBodyForInterceptionAsStream. Calling other methods that
3116 * affect the request or disabling fetch domain before body is received
3117 * results in an undefined behavior.
3118 */
Tim van der Lippe96de6062020-04-27 16:30:503119 invoke_getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest):
3120 Promise<Protocol.Fetch.GetResponseBodyResponse>;
Jack Franklin82978692020-03-12 14:06:423121
3122 /**
3123 * Returns a handle to the stream representing the response body.
3124 * The request must be paused in the HeadersReceived stage.
3125 * Note that after this command the request can't be continued
3126 * as is -- client either needs to cancel it or to provide the
3127 * response body.
3128 * The stream only supports sequential read, IO.read will fail if the position
3129 * is specified.
3130 * This method is mutually exclusive with getResponseBody.
3131 * Calling other methods that affect the request or disabling fetch
3132 * domain before body is received results in an undefined behavior.
3133 */
Tim van der Lippe96de6062020-04-27 16:30:503134 invoke_takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest):
Jack Franklin82978692020-03-12 14:06:423135 Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283136 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593137 export interface FetchDispatcher {
Jack Franklin82978692020-03-12 14:06:423138 /**
3139 * Issued when the domain is enabled and the request URL matches the
3140 * specified filter. The request is paused until the client responds
3141 * with one of continueRequest, failRequest or fulfillRequest.
3142 * The stage of the request can be determined by presence of responseErrorReason
3143 * and responseStatusCode -- the request is at the response stage if either
3144 * of these fields is present and in the request stage otherwise.
3145 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283146 requestPaused(params: Protocol.Fetch.RequestPausedEvent): void;
Jack Franklin82978692020-03-12 14:06:423147
3148 /**
3149 * Issued when the domain is enabled with handleAuthRequests set to true.
3150 * The request is paused until client responds with continueWithAuth.
3151 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283152 authRequired(params: Protocol.Fetch.AuthRequiredEvent): void;
Jack Franklin82978692020-03-12 14:06:423153 }
3154
3155 export interface WebAudioApi {
3156 /**
3157 * Enables the WebAudio domain and starts sending context lifetime events.
3158 */
Tim van der Lippe48335362020-05-12 14:34:153159 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423160
3161 /**
3162 * Disables the WebAudio domain.
3163 */
Tim van der Lippe48335362020-05-12 14:34:153164 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423165
3166 /**
3167 * Fetch the realtime data from the registered contexts.
3168 */
Tim van der Lippe96de6062020-04-27 16:30:503169 invoke_getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest):
Jack Franklin82978692020-03-12 14:06:423170 Promise<Protocol.WebAudio.GetRealtimeDataResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283171 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593172 export interface WebAudioDispatcher {
Jack Franklin82978692020-03-12 14:06:423173 /**
3174 * Notifies that a new BaseAudioContext has been created.
3175 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283176 contextCreated(params: Protocol.WebAudio.ContextCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423177
3178 /**
3179 * Notifies that an existing BaseAudioContext will be destroyed.
3180 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283181 contextWillBeDestroyed(params: Protocol.WebAudio.ContextWillBeDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423182
3183 /**
3184 * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
3185 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283186 contextChanged(params: Protocol.WebAudio.ContextChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:423187
3188 /**
3189 * Notifies that the construction of an AudioListener has finished.
3190 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283191 audioListenerCreated(params: Protocol.WebAudio.AudioListenerCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423192
3193 /**
3194 * Notifies that a new AudioListener has been created.
3195 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283196 audioListenerWillBeDestroyed(params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423197
3198 /**
3199 * Notifies that a new AudioNode has been created.
3200 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283201 audioNodeCreated(params: Protocol.WebAudio.AudioNodeCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423202
3203 /**
3204 * Notifies that an existing AudioNode has been destroyed.
3205 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283206 audioNodeWillBeDestroyed(params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423207
3208 /**
3209 * Notifies that a new AudioParam has been created.
3210 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283211 audioParamCreated(params: Protocol.WebAudio.AudioParamCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423212
3213 /**
3214 * Notifies that an existing AudioParam has been destroyed.
3215 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283216 audioParamWillBeDestroyed(params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423217
3218 /**
3219 * Notifies that two AudioNodes are connected.
3220 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283221 nodesConnected(params: Protocol.WebAudio.NodesConnectedEvent): void;
Jack Franklin82978692020-03-12 14:06:423222
3223 /**
3224 * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
3225 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283226 nodesDisconnected(params: Protocol.WebAudio.NodesDisconnectedEvent): void;
Jack Franklin82978692020-03-12 14:06:423227
3228 /**
3229 * Notifies that an AudioNode is connected to an AudioParam.
3230 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283231 nodeParamConnected(params: Protocol.WebAudio.NodeParamConnectedEvent): void;
Jack Franklin82978692020-03-12 14:06:423232
3233 /**
3234 * Notifies that an AudioNode is disconnected to an AudioParam.
3235 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283236 nodeParamDisconnected(params: Protocol.WebAudio.NodeParamDisconnectedEvent): void;
Jack Franklin82978692020-03-12 14:06:423237 }
3238
3239 export interface WebAuthnApi {
3240 /**
3241 * Enable the WebAuthn domain and start intercepting credential storage and
3242 * retrieval with a virtual authenticator.
3243 */
Tim van der Lippe48335362020-05-12 14:34:153244 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423245
3246 /**
3247 * Disable the WebAuthn domain.
3248 */
Tim van der Lippe48335362020-05-12 14:34:153249 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423250
3251 /**
3252 * Creates and adds a virtual authenticator.
3253 */
Tim van der Lippe96de6062020-04-27 16:30:503254 invoke_addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest):
Jack Franklin82978692020-03-12 14:06:423255 Promise<Protocol.WebAuthn.AddVirtualAuthenticatorResponse>;
3256
3257 /**
3258 * Removes the given authenticator.
3259 */
Tim van der Lippe48335362020-05-12 14:34:153260 invoke_removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest):
3261 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423262
3263 /**
3264 * Adds the credential to the specified authenticator.
3265 */
Tim van der Lippe48335362020-05-12 14:34:153266 invoke_addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423267
3268 /**
3269 * Returns a single credential stored in the given virtual authenticator that
3270 * matches the credential ID.
3271 */
Tim van der Lippe96de6062020-04-27 16:30:503272 invoke_getCredential(params: Protocol.WebAuthn.GetCredentialRequest):
3273 Promise<Protocol.WebAuthn.GetCredentialResponse>;
Jack Franklin82978692020-03-12 14:06:423274
3275 /**
3276 * Returns all the credentials stored in the given virtual authenticator.
3277 */
Tim van der Lippe96de6062020-04-27 16:30:503278 invoke_getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest):
3279 Promise<Protocol.WebAuthn.GetCredentialsResponse>;
Jack Franklin82978692020-03-12 14:06:423280
3281 /**
3282 * Removes a credential from the authenticator.
3283 */
Tim van der Lippe48335362020-05-12 14:34:153284 invoke_removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest):
3285 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423286
3287 /**
3288 * Clears all the credentials from the specified device.
3289 */
Tim van der Lippe48335362020-05-12 14:34:153290 invoke_clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest):
3291 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423292
3293 /**
3294 * Sets whether User Verification succeeds or fails for an authenticator.
3295 * The default is true.
3296 */
Tim van der Lippe48335362020-05-12 14:34:153297 invoke_setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest):
3298 Promise<Protocol.ProtocolResponseWithError>;
Alex Rudenkoef4cb582020-07-13 06:08:333299
3300 /**
3301 * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
3302 * The default is true.
3303 */
3304 invoke_setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest):
3305 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423306 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593307 export interface WebAuthnDispatcher {}
Jack Franklin82978692020-03-12 14:06:423308
3309 export interface MediaApi {
3310 /**
3311 * Enables the Media domain
3312 */
Tim van der Lippe48335362020-05-12 14:34:153313 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423314
3315 /**
3316 * Disables the Media domain.
3317 */
Tim van der Lippe48335362020-05-12 14:34:153318 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283319 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593320 export interface MediaDispatcher {
Jack Franklin82978692020-03-12 14:06:423321 /**
3322 * This can be called multiple times, and can be used to set / override /
3323 * remove player properties. A null propValue indicates removal.
3324 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283325 playerPropertiesChanged(params: Protocol.Media.PlayerPropertiesChangedEvent): void;
Jack Franklin82978692020-03-12 14:06:423326
3327 /**
3328 * Send events as a list, allowing them to be batched on the browser for less
3329 * congestion. If batched, events must ALWAYS be in chronological order.
3330 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283331 playerEventsAdded(params: Protocol.Media.PlayerEventsAddedEvent): void;
Jack Franklin82978692020-03-12 14:06:423332
3333 /**
Ted Meyer71337f62020-04-28 23:35:553334 * Send a list of any messages that need to be delivered.
3335 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283336 playerMessagesLogged(params: Protocol.Media.PlayerMessagesLoggedEvent): void;
Ted Meyer71337f62020-04-28 23:35:553337
3338 /**
3339 * Send a list of any errors that need to be delivered.
3340 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283341 playerErrorsRaised(params: Protocol.Media.PlayerErrorsRaisedEvent): void;
Ted Meyer71337f62020-04-28 23:35:553342
3343 /**
Simon Zünddc192602021-04-29 06:20:313344 * Called whenever a player is created, or when a new agent joins and receives
3345 * a list of active players. If an agent is restored, it will receive the full
Jack Franklin82978692020-03-12 14:06:423346 * list of player ids and all events again.
3347 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283348 playersCreated(params: Protocol.Media.PlayersCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423349
Jack Franklin82978692020-03-12 14:06:423350 }
3351
3352 export interface DebuggerApi {
3353 /**
3354 * Continues execution until specific location is reached.
3355 */
Tim van der Lippe48335362020-05-12 14:34:153356 invoke_continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest):
3357 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423358
3359 /**
3360 * Disables debugger for given page.
3361 */
Tim van der Lippe48335362020-05-12 14:34:153362 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423363
3364 /**
3365 * Enables debugger for the given page. Clients should not assume that the debugging has been
3366 * enabled until the result for this command is received.
3367 */
Tim van der Lippe96de6062020-04-27 16:30:503368 invoke_enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
Jack Franklin82978692020-03-12 14:06:423369
3370 /**
3371 * Evaluates expression on a given call frame.
3372 */
Tim van der Lippe96de6062020-04-27 16:30:503373 invoke_evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest):
Jack Franklin82978692020-03-12 14:06:423374 Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
3375
3376 /**
3377 * Returns possible locations for breakpoint. scriptId in start and end range locations should be
3378 * the same.
3379 */
Tim van der Lippe96de6062020-04-27 16:30:503380 invoke_getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest):
Jack Franklin82978692020-03-12 14:06:423381 Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
3382
3383 /**
3384 * Returns source for the script with given id.
3385 */
Tim van der Lippe96de6062020-04-27 16:30:503386 invoke_getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest):
Jack Franklin82978692020-03-12 14:06:423387 Promise<Protocol.Debugger.GetScriptSourceResponse>;
3388
3389 /**
3390 * This command is deprecated. Use getScriptSource instead.
3391 */
Tim van der Lippe96de6062020-04-27 16:30:503392 invoke_getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest):
Jack Franklin82978692020-03-12 14:06:423393 Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
3394
3395 /**
3396 * Returns stack trace with given `stackTraceId`.
3397 */
Tim van der Lippe96de6062020-04-27 16:30:503398 invoke_getStackTrace(params: Protocol.Debugger.GetStackTraceRequest):
3399 Promise<Protocol.Debugger.GetStackTraceResponse>;
Jack Franklin82978692020-03-12 14:06:423400
3401 /**
3402 * Stops on the next JavaScript statement.
3403 */
Tim van der Lippe48335362020-05-12 14:34:153404 invoke_pause(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423405
Tim van der Lippe48335362020-05-12 14:34:153406 invoke_pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest):
3407 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423408
3409 /**
3410 * Removes JavaScript breakpoint.
3411 */
Tim van der Lippe48335362020-05-12 14:34:153412 invoke_removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest):
3413 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423414
3415 /**
3416 * Restarts particular call frame from the beginning.
3417 */
Tim van der Lippe96de6062020-04-27 16:30:503418 invoke_restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
Jack Franklin82978692020-03-12 14:06:423419
3420 /**
3421 * Resumes JavaScript execution.
3422 */
Tim van der Lippe48335362020-05-12 14:34:153423 invoke_resume(params: Protocol.Debugger.ResumeRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423424
3425 /**
3426 * Searches for given string in script content.
3427 */
Tim van der Lippe96de6062020-04-27 16:30:503428 invoke_searchInContent(params: Protocol.Debugger.SearchInContentRequest):
Jack Franklin82978692020-03-12 14:06:423429 Promise<Protocol.Debugger.SearchInContentResponse>;
3430
3431 /**
3432 * Enables or disables async call stacks tracking.
3433 */
Tim van der Lippe48335362020-05-12 14:34:153434 invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest):
3435 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423436
3437 /**
3438 * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
3439 * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
3440 * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
3441 */
Tim van der Lippe48335362020-05-12 14:34:153442 invoke_setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest):
3443 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423444
3445 /**
3446 * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
3447 * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
3448 * Positions array contains positions where blackbox state is changed. First interval isn't
3449 * blackboxed. Array should be sorted.
3450 */
Tim van der Lippe48335362020-05-12 14:34:153451 invoke_setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest):
3452 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423453
3454 /**
3455 * Sets JavaScript breakpoint at a given location.
3456 */
Tim van der Lippe96de6062020-04-27 16:30:503457 invoke_setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest):
3458 Promise<Protocol.Debugger.SetBreakpointResponse>;
Jack Franklin82978692020-03-12 14:06:423459
3460 /**
3461 * Sets instrumentation breakpoint.
3462 */
Tim van der Lippe96de6062020-04-27 16:30:503463 invoke_setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest):
Jack Franklin82978692020-03-12 14:06:423464 Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
3465
3466 /**
3467 * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
3468 * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
3469 * `locations` property. Further matching script parsing will result in subsequent
3470 * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
3471 */
Tim van der Lippe96de6062020-04-27 16:30:503472 invoke_setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest):
Jack Franklin82978692020-03-12 14:06:423473 Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
3474
3475 /**
3476 * Sets JavaScript breakpoint before each call to the given function.
3477 * If another function was created from the same source as a given one,
3478 * calling it will also trigger the breakpoint.
3479 */
Tim van der Lippe96de6062020-04-27 16:30:503480 invoke_setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest):
Jack Franklin82978692020-03-12 14:06:423481 Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
3482
3483 /**
3484 * Activates / deactivates all breakpoints on the page.
3485 */
Tim van der Lippe48335362020-05-12 14:34:153486 invoke_setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest):
3487 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423488
3489 /**
3490 * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
3491 * no exceptions. Initial pause on exceptions state is `none`.
3492 */
Tim van der Lippe48335362020-05-12 14:34:153493 invoke_setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest):
3494 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423495
3496 /**
3497 * Changes return value in top frame. Available only at return break position.
3498 */
Tim van der Lippe48335362020-05-12 14:34:153499 invoke_setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423500
3501 /**
3502 * Edits JavaScript source live.
3503 */
Tim van der Lippe96de6062020-04-27 16:30:503504 invoke_setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest):
Jack Franklin82978692020-03-12 14:06:423505 Promise<Protocol.Debugger.SetScriptSourceResponse>;
3506
3507 /**
3508 * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
3509 */
Tim van der Lippe48335362020-05-12 14:34:153510 invoke_setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest):
3511 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423512
3513 /**
3514 * Changes value of variable in a callframe. Object-based scopes are not supported and must be
3515 * mutated manually.
3516 */
Tim van der Lippe48335362020-05-12 14:34:153517 invoke_setVariableValue(params: Protocol.Debugger.SetVariableValueRequest):
3518 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423519
3520 /**
3521 * Steps into the function call.
3522 */
Tim van der Lippe48335362020-05-12 14:34:153523 invoke_stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423524
3525 /**
3526 * Steps out of the function call.
3527 */
Tim van der Lippe48335362020-05-12 14:34:153528 invoke_stepOut(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423529
3530 /**
3531 * Steps over the statement.
3532 */
Kim-Anh Tran523c8982020-08-05 06:14:113533 invoke_stepOver(params: Protocol.Debugger.StepOverRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283534 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593535 export interface DebuggerDispatcher {
Jack Franklin82978692020-03-12 14:06:423536 /**
3537 * Fired when breakpoint is resolved to an actual script and location.
3538 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283539 breakpointResolved(params: Protocol.Debugger.BreakpointResolvedEvent): void;
Jack Franklin82978692020-03-12 14:06:423540
3541 /**
3542 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
3543 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283544 paused(params: Protocol.Debugger.PausedEvent): void;
Jack Franklin82978692020-03-12 14:06:423545
3546 /**
3547 * Fired when the virtual machine resumed execution.
3548 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283549 resumed(): void;
Jack Franklin82978692020-03-12 14:06:423550
3551 /**
3552 * Fired when virtual machine fails to parse the script.
3553 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283554 scriptFailedToParse(params: Protocol.Debugger.ScriptFailedToParseEvent): void;
Jack Franklin82978692020-03-12 14:06:423555
3556 /**
3557 * Fired when virtual machine parses script. This event is also fired for all known and uncollected
3558 * scripts upon enabling debugger.
3559 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283560 scriptParsed(params: Protocol.Debugger.ScriptParsedEvent): void;
Jack Franklin82978692020-03-12 14:06:423561 }
3562
3563 export interface HeapProfilerApi {
3564 /**
3565 * Enables console to refer to the node with given id via $x (see Command Line API for more details
3566 * $x functions).
3567 */
Tim van der Lippe48335362020-05-12 14:34:153568 invoke_addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest):
3569 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423570
Tim van der Lippe48335362020-05-12 14:34:153571 invoke_collectGarbage(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423572
Tim van der Lippe48335362020-05-12 14:34:153573 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423574
Tim van der Lippe48335362020-05-12 14:34:153575 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423576
Tim van der Lippe96de6062020-04-27 16:30:503577 invoke_getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest):
Jack Franklin82978692020-03-12 14:06:423578 Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
3579
Tim van der Lippe96de6062020-04-27 16:30:503580 invoke_getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest):
Jack Franklin82978692020-03-12 14:06:423581 Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
3582
Tim van der Lippe96de6062020-04-27 16:30:503583 invoke_getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
Jack Franklin82978692020-03-12 14:06:423584
Tim van der Lippe48335362020-05-12 14:34:153585 invoke_startSampling(params: Protocol.HeapProfiler.StartSamplingRequest):
3586 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423587
Tim van der Lippe48335362020-05-12 14:34:153588 invoke_startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest):
3589 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423590
Tim van der Lippe96de6062020-04-27 16:30:503591 invoke_stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
Jack Franklin82978692020-03-12 14:06:423592
Tim van der Lippe48335362020-05-12 14:34:153593 invoke_stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest):
3594 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423595
Tim van der Lippe48335362020-05-12 14:34:153596 invoke_takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest):
3597 Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283598 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593599 export interface HeapProfilerDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:283600 addHeapSnapshotChunk(params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent): void;
Jack Franklin82978692020-03-12 14:06:423601
3602 /**
3603 * If heap objects tracking has been started then backend may send update for one or more fragments
3604 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283605 heapStatsUpdate(params: Protocol.HeapProfiler.HeapStatsUpdateEvent): void;
Jack Franklin82978692020-03-12 14:06:423606
3607 /**
3608 * If heap objects tracking has been started then backend regularly sends a current value for last
3609 * seen object id and corresponding timestamp. If the were changes in the heap since last event
3610 * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
3611 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283612 lastSeenObjectId(params: Protocol.HeapProfiler.LastSeenObjectIdEvent): void;
Jack Franklin82978692020-03-12 14:06:423613
Tim van der Lipped1c8d6c2020-05-12 13:56:283614 reportHeapSnapshotProgress(params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent): void;
Jack Franklin82978692020-03-12 14:06:423615
Tim van der Lipped1c8d6c2020-05-12 13:56:283616 resetProfiles(): void;
Jack Franklin82978692020-03-12 14:06:423617 }
3618
3619 export interface ProfilerApi {
Tim van der Lippe48335362020-05-12 14:34:153620 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423621
Tim van der Lippe48335362020-05-12 14:34:153622 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423623
3624 /**
3625 * Collect coverage data for the current isolate. The coverage data may be incomplete due to
3626 * garbage collection.
3627 */
Tim van der Lippe96de6062020-04-27 16:30:503628 invoke_getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
Jack Franklin82978692020-03-12 14:06:423629
3630 /**
3631 * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
3632 */
Tim van der Lippe48335362020-05-12 14:34:153633 invoke_setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest):
3634 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423635
Tim van der Lippe48335362020-05-12 14:34:153636 invoke_start(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423637
3638 /**
3639 * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
3640 * coverage may be incomplete. Enabling prevents running optimized code and resets execution
3641 * counters.
3642 */
Tim van der Lippe96de6062020-04-27 16:30:503643 invoke_startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest):
Jack Franklin82978692020-03-12 14:06:423644 Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
3645
3646 /**
3647 * Enable type profile.
3648 */
Tim van der Lippe48335362020-05-12 14:34:153649 invoke_startTypeProfile(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423650
Tim van der Lippe96de6062020-04-27 16:30:503651 invoke_stop(): Promise<Protocol.Profiler.StopResponse>;
Jack Franklin82978692020-03-12 14:06:423652
3653 /**
3654 * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
3655 * executing optimized code.
3656 */
Tim van der Lippe48335362020-05-12 14:34:153657 invoke_stopPreciseCoverage(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423658
3659 /**
3660 * Disable type profile. Disabling releases type profile data collected so far.
3661 */
Tim van der Lippe48335362020-05-12 14:34:153662 invoke_stopTypeProfile(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423663
3664 /**
3665 * Collect coverage data for the current isolate, and resets execution counters. Precise code
3666 * coverage needs to have started.
3667 */
Tim van der Lippe96de6062020-04-27 16:30:503668 invoke_takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
Jack Franklin82978692020-03-12 14:06:423669
3670 /**
3671 * Collect type profile.
3672 */
Tim van der Lippe96de6062020-04-27 16:30:503673 invoke_takeTypeProfile(): Promise<Protocol.Profiler.TakeTypeProfileResponse>;
Jack Franklin82978692020-03-12 14:06:423674
3675 /**
Patrick Brosset6f3b86e2020-09-16 14:55:533676 * Enable counters collection.
3677 */
3678 invoke_enableCounters(): Promise<Protocol.ProtocolResponseWithError>;
3679
3680 /**
3681 * Disable counters collection.
3682 */
3683 invoke_disableCounters(): Promise<Protocol.ProtocolResponseWithError>;
3684
3685 /**
3686 * Retrieve counters.
3687 */
3688 invoke_getCounters(): Promise<Protocol.Profiler.GetCountersResponse>;
3689
3690 /**
Jack Franklin82978692020-03-12 14:06:423691 * Enable run time call stats collection.
3692 */
Tim van der Lippe48335362020-05-12 14:34:153693 invoke_enableRuntimeCallStats(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423694
3695 /**
3696 * Disable run time call stats collection.
3697 */
Tim van der Lippe48335362020-05-12 14:34:153698 invoke_disableRuntimeCallStats(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423699
3700 /**
3701 * Retrieve run time call stats.
3702 */
Tim van der Lippe96de6062020-04-27 16:30:503703 invoke_getRuntimeCallStats(): Promise<Protocol.Profiler.GetRuntimeCallStatsResponse>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283704 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593705 export interface ProfilerDispatcher {
Tim van der Lipped1c8d6c2020-05-12 13:56:283706 consoleProfileFinished(params: Protocol.Profiler.ConsoleProfileFinishedEvent): void;
Jack Franklin82978692020-03-12 14:06:423707
3708 /**
3709 * Sent when new profile recording is started using console.profile() call.
3710 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283711 consoleProfileStarted(params: Protocol.Profiler.ConsoleProfileStartedEvent): void;
Jack Franklin82978692020-03-12 14:06:423712
3713 /**
3714 * Reports coverage delta since the last poll (either from an event like this, or from
3715 * `takePreciseCoverage` for the current isolate. May only be sent if precise code
3716 * coverage has been started. This event can be trigged by the embedder to, for example,
3717 * trigger collection of coverage data immediatelly at a certain point in time.
3718 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283719 preciseCoverageDeltaUpdate(params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent): void;
Jack Franklin82978692020-03-12 14:06:423720 }
3721
3722 export interface RuntimeApi {
3723 /**
3724 * Add handler to promise with given promise object id.
3725 */
Tim van der Lippe96de6062020-04-27 16:30:503726 invoke_awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
Jack Franklin82978692020-03-12 14:06:423727
3728 /**
3729 * Calls function with given declaration on the given object. Object group of the result is
3730 * inherited from the target object.
3731 */
Tim van der Lippe96de6062020-04-27 16:30:503732 invoke_callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest):
3733 Promise<Protocol.Runtime.CallFunctionOnResponse>;
Jack Franklin82978692020-03-12 14:06:423734
3735 /**
3736 * Compiles expression.
3737 */
Tim van der Lippe96de6062020-04-27 16:30:503738 invoke_compileScript(params: Protocol.Runtime.CompileScriptRequest):
3739 Promise<Protocol.Runtime.CompileScriptResponse>;
Jack Franklin82978692020-03-12 14:06:423740
3741 /**
3742 * Disables reporting of execution contexts creation.
3743 */
Tim van der Lippe48335362020-05-12 14:34:153744 invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423745
3746 /**
3747 * Discards collected exceptions and console API calls.
3748 */
Tim van der Lippe48335362020-05-12 14:34:153749 invoke_discardConsoleEntries(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423750
3751 /**
3752 * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
3753 * When the reporting gets enabled the event will be sent immediately for each existing execution
3754 * context.
3755 */
Tim van der Lippe48335362020-05-12 14:34:153756 invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423757
3758 /**
3759 * Evaluates expression on global object.
3760 */
Tim van der Lippe96de6062020-04-27 16:30:503761 invoke_evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
Jack Franklin82978692020-03-12 14:06:423762
3763 /**
3764 * Returns the isolate id.
3765 */
Tim van der Lippe96de6062020-04-27 16:30:503766 invoke_getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
Jack Franklin82978692020-03-12 14:06:423767
3768 /**
3769 * Returns the JavaScript heap usage.
3770 * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
3771 */
Tim van der Lippe96de6062020-04-27 16:30:503772 invoke_getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
Jack Franklin82978692020-03-12 14:06:423773
3774 /**
3775 * Returns properties of a given object. Object group of the result is inherited from the target
3776 * object.
3777 */
Tim van der Lippe96de6062020-04-27 16:30:503778 invoke_getProperties(params: Protocol.Runtime.GetPropertiesRequest):
3779 Promise<Protocol.Runtime.GetPropertiesResponse>;
Jack Franklin82978692020-03-12 14:06:423780
3781 /**
3782 * Returns all let, const and class variables from global scope.
3783 */
Tim van der Lippe96de6062020-04-27 16:30:503784 invoke_globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest):
Jack Franklin82978692020-03-12 14:06:423785 Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
3786
Tim van der Lippe96de6062020-04-27 16:30:503787 invoke_queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
Jack Franklin82978692020-03-12 14:06:423788
3789 /**
3790 * Releases remote object with given id.
3791 */
Tim van der Lippe48335362020-05-12 14:34:153792 invoke_releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423793
3794 /**
3795 * Releases all remote objects that belong to a given group.
3796 */
Tim van der Lippe48335362020-05-12 14:34:153797 invoke_releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest):
3798 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423799
3800 /**
3801 * Tells inspected instance to run if it was waiting for debugger to attach.
3802 */
Tim van der Lippe48335362020-05-12 14:34:153803 invoke_runIfWaitingForDebugger(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423804
3805 /**
3806 * Runs script with given id in a given context.
3807 */
Tim van der Lippe96de6062020-04-27 16:30:503808 invoke_runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
Jack Franklin82978692020-03-12 14:06:423809
3810 /**
3811 * Enables or disables async call stacks tracking.
3812 */
Tim van der Lippe48335362020-05-12 14:34:153813 invoke_setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest):
3814 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423815
Tim van der Lippe96de6062020-04-27 16:30:503816 invoke_setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest):
Tim van der Lippe48335362020-05-12 14:34:153817 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423818
Tim van der Lippe48335362020-05-12 14:34:153819 invoke_setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest):
3820 Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423821
3822 /**
3823 * Terminate current or next JavaScript execution.
3824 * Will cancel the termination when the outer-most script execution ends.
3825 */
Tim van der Lippe48335362020-05-12 14:34:153826 invoke_terminateExecution(): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423827
3828 /**
3829 * If executionContextId is empty, adds binding with the given name on the
3830 * global objects of all inspected contexts, including those created later,
3831 * bindings survive reloads.
Jack Franklin82978692020-03-12 14:06:423832 * Binding function takes exactly one argument, this argument should be string,
3833 * in case of any other input, function throws an exception.
3834 * Each binding function call produces Runtime.bindingCalled notification.
3835 */
Tim van der Lippe48335362020-05-12 14:34:153836 invoke_addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
Jack Franklin82978692020-03-12 14:06:423837
3838 /**
3839 * This method does not remove binding function from global object but
3840 * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
3841 */
Tim van der Lippe48335362020-05-12 14:34:153842 invoke_removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
Tim van der Lipped1c8d6c2020-05-12 13:56:283843 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593844 export interface RuntimeDispatcher {
Jack Franklin82978692020-03-12 14:06:423845 /**
3846 * Notification is issued every time when binding is called.
3847 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283848 bindingCalled(params: Protocol.Runtime.BindingCalledEvent): void;
Jack Franklin82978692020-03-12 14:06:423849
3850 /**
3851 * Issued when console API was called.
3852 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283853 consoleAPICalled(params: Protocol.Runtime.ConsoleAPICalledEvent): void;
Jack Franklin82978692020-03-12 14:06:423854
3855 /**
3856 * Issued when unhandled exception was revoked.
3857 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283858 exceptionRevoked(params: Protocol.Runtime.ExceptionRevokedEvent): void;
Jack Franklin82978692020-03-12 14:06:423859
3860 /**
3861 * Issued when exception was thrown and unhandled.
3862 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283863 exceptionThrown(params: Protocol.Runtime.ExceptionThrownEvent): void;
Jack Franklin82978692020-03-12 14:06:423864
3865 /**
3866 * Issued when new execution context is created.
3867 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283868 executionContextCreated(params: Protocol.Runtime.ExecutionContextCreatedEvent): void;
Jack Franklin82978692020-03-12 14:06:423869
3870 /**
3871 * Issued when execution context is destroyed.
3872 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283873 executionContextDestroyed(params: Protocol.Runtime.ExecutionContextDestroyedEvent): void;
Jack Franklin82978692020-03-12 14:06:423874
3875 /**
3876 * Issued when all executionContexts were cleared in browser
3877 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283878 executionContextsCleared(): void;
Jack Franklin82978692020-03-12 14:06:423879
3880 /**
3881 * Issued when object should be inspected (for example, as a result of inspect() command line API
3882 * call).
3883 */
Tim van der Lipped1c8d6c2020-05-12 13:56:283884 inspectRequested(params: Protocol.Runtime.InspectRequestedEvent): void;
Jack Franklin82978692020-03-12 14:06:423885 }
3886
3887 export interface SchemaApi {
3888 /**
3889 * Returns supported domains.
3890 */
Tim van der Lippe96de6062020-04-27 16:30:503891 invoke_getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
Jack Franklin82978692020-03-12 14:06:423892 }
Tim van der Lippe3c7eedc2020-10-20 10:21:593893 export interface SchemaDispatcher {}
Jack Franklin82978692020-03-12 14:06:423894}
Tim van der Lippe719446c2020-05-19 13:13:563895