1// 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 {
15  export interface ProtocolApi {
16    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
72    Security: SecurityApi;
73
74    ServiceWorker: ServiceWorkerApi;
75
76    Storage: StorageApi;
77
78    SystemInfo: SystemInfoApi;
79
80    Target: TargetApi;
81
82    Tethering: TetheringApi;
83
84    Tracing: TracingApi;
85
86    Fetch: FetchApi;
87
88    WebAudio: WebAudioApi;
89
90    WebAuthn: WebAuthnApi;
91
92    Media: MediaApi;
93
94    Console: ConsoleApi;
95
96    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     */
112    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
113
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     */
118    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
119
120    /**
121     * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
122     */
123    invoke_getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest):
124        Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
125
126    /**
127     * Fetches the entire accessibility tree
128     */
129    invoke_getFullAXTree(): Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
130
131    /**
132     * Query a DOM node's accessibility subtree for accessible name and role.
133     * This command computes the name and role for all nodes in the subtree, including those that are
134     * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
135     * node is specified, or the DOM node does not exist, the command returns an error. If neither
136     * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
137     */
138    invoke_queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest):
139        Promise<Protocol.Accessibility.QueryAXTreeResponse>;
140  }
141  export interface AccessibilityDispatcher {}
142
143  export interface AnimationApi {
144    /**
145     * Disables animation domain notifications.
146     */
147    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
148
149    /**
150     * Enables animation domain notifications.
151     */
152    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
153
154    /**
155     * Returns the current time of the an animation.
156     */
157    invoke_getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest):
158        Promise<Protocol.Animation.GetCurrentTimeResponse>;
159
160    /**
161     * Gets the playback rate of the document timeline.
162     */
163    invoke_getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
164
165    /**
166     * Releases a set of animations to no longer be manipulated.
167     */
168    invoke_releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest):
169        Promise<Protocol.ProtocolResponseWithError>;
170
171    /**
172     * Gets the remote object of the Animation.
173     */
174    invoke_resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest):
175        Promise<Protocol.Animation.ResolveAnimationResponse>;
176
177    /**
178     * Seek a set of animations to a particular time within each animation.
179     */
180    invoke_seekAnimations(params: Protocol.Animation.SeekAnimationsRequest):
181        Promise<Protocol.ProtocolResponseWithError>;
182
183    /**
184     * Sets the paused state of a set of animations.
185     */
186    invoke_setPaused(params: Protocol.Animation.SetPausedRequest): Promise<Protocol.ProtocolResponseWithError>;
187
188    /**
189     * Sets the playback rate of the document timeline.
190     */
191    invoke_setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest):
192        Promise<Protocol.ProtocolResponseWithError>;
193
194    /**
195     * Sets the timing of an animation node.
196     */
197    invoke_setTiming(params: Protocol.Animation.SetTimingRequest): Promise<Protocol.ProtocolResponseWithError>;
198  }
199  export interface AnimationDispatcher {
200    /**
201     * Event for when an animation has been cancelled.
202     */
203    animationCanceled(params: Protocol.Animation.AnimationCanceledEvent): void;
204
205    /**
206     * Event for each animation that has been created.
207     */
208    animationCreated(params: Protocol.Animation.AnimationCreatedEvent): void;
209
210    /**
211     * Event for animation that has been started.
212     */
213    animationStarted(params: Protocol.Animation.AnimationStartedEvent): void;
214  }
215
216  export interface ApplicationCacheApi {
217    /**
218     * Enables application cache domain notifications.
219     */
220    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
221
222    /**
223     * Returns relevant application cache data for the document in given frame.
224     */
225    invoke_getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest):
226        Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
227
228    /**
229     * Returns array of frame identifiers with manifest urls for each frame containing a document
230     * associated with some application cache.
231     */
232    invoke_getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
233
234    /**
235     * Returns manifest URL for document in the given frame.
236     */
237    invoke_getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest):
238        Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
239  }
240  export interface ApplicationCacheDispatcher {
241    applicationCacheStatusUpdated(params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent): void;
242
243    networkStateUpdated(params: Protocol.ApplicationCache.NetworkStateUpdatedEvent): void;
244  }
245
246  export interface AuditsApi {
247    /**
248     * Returns the response body and size if it were re-encoded with the specified settings. Only
249     * applies to images.
250     */
251    invoke_getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest):
252        Promise<Protocol.Audits.GetEncodedResponseResponse>;
253
254    /**
255     * Disables issues domain, prevents further issues from being reported to the client.
256     */
257    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
258
259    /**
260     * Enables issues domain, sends the issues collected so far to the client by means of the
261     * `issueAdded` event.
262     */
263    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
264  }
265  export interface AuditsDispatcher {
266    issueAdded(params: Protocol.Audits.IssueAddedEvent): void;
267  }
268
269  export interface BackgroundServiceApi {
270    /**
271     * Enables event updates for the service.
272     */
273    invoke_startObserving(params: Protocol.BackgroundService.StartObservingRequest):
274        Promise<Protocol.ProtocolResponseWithError>;
275
276    /**
277     * Disables event updates for the service.
278     */
279    invoke_stopObserving(params: Protocol.BackgroundService.StopObservingRequest):
280        Promise<Protocol.ProtocolResponseWithError>;
281
282    /**
283     * Set the recording state for the service.
284     */
285    invoke_setRecording(params: Protocol.BackgroundService.SetRecordingRequest):
286        Promise<Protocol.ProtocolResponseWithError>;
287
288    /**
289     * Clears all stored data for the service.
290     */
291    invoke_clearEvents(params: Protocol.BackgroundService.ClearEventsRequest):
292        Promise<Protocol.ProtocolResponseWithError>;
293  }
294  export interface BackgroundServiceDispatcher {
295    /**
296     * Called when the recording state for the service has been updated.
297     */
298    recordingStateChanged(params: Protocol.BackgroundService.RecordingStateChangedEvent): void;
299
300    /**
301     * Called with all existing backgroundServiceEvents when enabled, and all new
302     * events afterwards if enabled and recording.
303     */
304    backgroundServiceEventReceived(params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent): void;
305  }
306
307  export interface BrowserApi {
308    /**
309     * Set permission settings for given origin.
310     */
311    invoke_setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<Protocol.ProtocolResponseWithError>;
312
313    /**
314     * Grant specific permissions to the given origin and reject all others.
315     */
316    invoke_grantPermissions(params: Protocol.Browser.GrantPermissionsRequest):
317        Promise<Protocol.ProtocolResponseWithError>;
318
319    /**
320     * Reset all permission management for all origins.
321     */
322    invoke_resetPermissions(params: Protocol.Browser.ResetPermissionsRequest):
323        Promise<Protocol.ProtocolResponseWithError>;
324
325    /**
326     * Set the behavior when downloading a file.
327     */
328    invoke_setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest):
329        Promise<Protocol.ProtocolResponseWithError>;
330
331    /**
332     * Close browser gracefully.
333     */
334    invoke_close(): Promise<Protocol.ProtocolResponseWithError>;
335
336    /**
337     * Crashes browser on the main thread.
338     */
339    invoke_crash(): Promise<Protocol.ProtocolResponseWithError>;
340
341    /**
342     * Crashes GPU process.
343     */
344    invoke_crashGpuProcess(): Promise<Protocol.ProtocolResponseWithError>;
345
346    /**
347     * Returns version information.
348     */
349    invoke_getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
350
351    /**
352     * Returns the command line switches for the browser process if, and only if
353     * --enable-automation is on the commandline.
354     */
355    invoke_getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
356
357    /**
358     * Get Chrome histograms.
359     */
360    invoke_getHistograms(params: Protocol.Browser.GetHistogramsRequest):
361        Promise<Protocol.Browser.GetHistogramsResponse>;
362
363    /**
364     * Get a Chrome histogram by name.
365     */
366    invoke_getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
367
368    /**
369     * Get position and size of the browser window.
370     */
371    invoke_getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest):
372        Promise<Protocol.Browser.GetWindowBoundsResponse>;
373
374    /**
375     * Get the browser window that contains the devtools target.
376     */
377    invoke_getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest):
378        Promise<Protocol.Browser.GetWindowForTargetResponse>;
379
380    /**
381     * Set position and/or size of the browser window.
382     */
383    invoke_setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest):
384        Promise<Protocol.ProtocolResponseWithError>;
385
386    /**
387     * Set dock tile details, platform-specific.
388     */
389    invoke_setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<Protocol.ProtocolResponseWithError>;
390
391    /**
392     * Invoke custom browser commands used by telemetry.
393     */
394    invoke_executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest):
395        Promise<Protocol.ProtocolResponseWithError>;
396  }
397  export interface BrowserDispatcher {}
398
399  export interface CSSApi {
400    /**
401     * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
402     * position specified by `location`.
403     */
404    invoke_addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
405
406    /**
407     * Returns all class names from specified stylesheet.
408     */
409    invoke_collectClassNames(params: Protocol.CSS.CollectClassNamesRequest):
410        Promise<Protocol.CSS.CollectClassNamesResponse>;
411
412    /**
413     * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
414     */
415    invoke_createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest):
416        Promise<Protocol.CSS.CreateStyleSheetResponse>;
417
418    /**
419     * Disables the CSS agent for the given page.
420     */
421    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
422
423    /**
424     * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
425     * enabled until the result of this command is received.
426     */
427    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
428
429    /**
430     * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
431     * the browser.
432     */
433    invoke_forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<Protocol.ProtocolResponseWithError>;
434
435    invoke_getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest):
436        Promise<Protocol.CSS.GetBackgroundColorsResponse>;
437
438    /**
439     * Returns the computed style for a DOM node identified by `nodeId`.
440     */
441    invoke_getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest):
442        Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
443
444    /**
445     * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
446     * attributes) for a DOM node identified by `nodeId`.
447     */
448    invoke_getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest):
449        Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
450
451    /**
452     * Returns requested styles for a DOM node identified by `nodeId`.
453     */
454    invoke_getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest):
455        Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
456
457    /**
458     * Returns all media queries parsed by the rendering engine.
459     */
460    invoke_getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
461
462    /**
463     * Requests information about platform fonts which we used to render child TextNodes in the given
464     * node.
465     */
466    invoke_getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest):
467        Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
468
469    /**
470     * Returns the current textual content for a stylesheet.
471     */
472    invoke_getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest):
473        Promise<Protocol.CSS.GetStyleSheetTextResponse>;
474
475    /**
476     * Starts tracking the given computed styles for updates. The specified array of properties
477     * replaces the one previously specified. Pass empty array to disable tracking.
478     * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
479     * The changes to computed style properties are only tracked for nodes pushed to the front-end
480     * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
481     * to the front-end, no updates will be issued for the node.
482     */
483    invoke_trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest):
484        Promise<Protocol.ProtocolResponseWithError>;
485
486    /**
487     * Polls the next batch of computed style updates.
488     */
489    invoke_takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
490
491    /**
492     * Find a rule with the given active property for the given node and set the new value for this
493     * property
494     */
495    invoke_setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest):
496        Promise<Protocol.ProtocolResponseWithError>;
497
498    /**
499     * Modifies the keyframe rule key text.
500     */
501    invoke_setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
502
503    /**
504     * Modifies the rule selector.
505     */
506    invoke_setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
507
508    /**
509     * Modifies the rule selector.
510     */
511    invoke_setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
512
513    /**
514     * Sets the new stylesheet text.
515     */
516    invoke_setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest):
517        Promise<Protocol.CSS.SetStyleSheetTextResponse>;
518
519    /**
520     * Applies specified style edits one after another in the given order.
521     */
522    invoke_setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
523
524    /**
525     * Enables the selector recording.
526     */
527    invoke_startRuleUsageTracking(): Promise<Protocol.ProtocolResponseWithError>;
528
529    /**
530     * Stop tracking rule usage and return the list of rules that were used since last call to
531     * `takeCoverageDelta` (or since start of coverage instrumentation)
532     */
533    invoke_stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
534
535    /**
536     * Obtain list of rules that became used since last call to this method (or since start of coverage
537     * instrumentation)
538     */
539    invoke_takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
540
541    /**
542     * Enables/disables rendering of local CSS fonts (enabled by default).
543     */
544    invoke_setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest):
545        Promise<Protocol.ProtocolResponseWithError>;
546  }
547  export interface CSSDispatcher {
548    /**
549     * Fires whenever a web font is updated.  A non-empty font parameter indicates a successfully loaded
550     * web font
551     */
552    fontsUpdated(params: Protocol.CSS.FontsUpdatedEvent): void;
553
554    /**
555     * Fires whenever a MediaQuery result changes (for example, after a browser window has been
556     * resized.) The current implementation considers only viewport-dependent media features.
557     */
558    mediaQueryResultChanged(): void;
559
560    /**
561     * Fired whenever an active document stylesheet is added.
562     */
563    styleSheetAdded(params: Protocol.CSS.StyleSheetAddedEvent): void;
564
565    /**
566     * Fired whenever a stylesheet is changed as a result of the client operation.
567     */
568    styleSheetChanged(params: Protocol.CSS.StyleSheetChangedEvent): void;
569
570    /**
571     * Fired whenever an active document stylesheet is removed.
572     */
573    styleSheetRemoved(params: Protocol.CSS.StyleSheetRemovedEvent): void;
574  }
575
576  export interface CacheStorageApi {
577    /**
578     * Deletes a cache.
579     */
580    invoke_deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<Protocol.ProtocolResponseWithError>;
581
582    /**
583     * Deletes a cache entry.
584     */
585    invoke_deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<Protocol.ProtocolResponseWithError>;
586
587    /**
588     * Requests cache names.
589     */
590    invoke_requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest):
591        Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
592
593    /**
594     * Fetches cache entry.
595     */
596    invoke_requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest):
597        Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
598
599    /**
600     * Requests data from cache.
601     */
602    invoke_requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest):
603        Promise<Protocol.CacheStorage.RequestEntriesResponse>;
604  }
605  export interface CacheStorageDispatcher {}
606
607  export interface CastApi {
608    /**
609     * Starts observing for sinks that can be used for tab mirroring, and if set,
610     * sinks compatible with |presentationUrl| as well. When sinks are found, a
611     * |sinksUpdated| event is fired.
612     * Also starts observing for issue messages. When an issue is added or removed,
613     * an |issueUpdated| event is fired.
614     */
615    invoke_enable(params: Protocol.Cast.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
616
617    /**
618     * Stops observing for sinks and issues.
619     */
620    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
621
622    /**
623     * Sets a sink to be used when the web page requests the browser to choose a
624     * sink via Presentation API, Remote Playback API, or Cast SDK.
625     */
626    invoke_setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<Protocol.ProtocolResponseWithError>;
627
628    /**
629     * Starts mirroring the tab to the sink.
630     */
631    invoke_startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest):
632        Promise<Protocol.ProtocolResponseWithError>;
633
634    /**
635     * Stops the active Cast session on the sink.
636     */
637    invoke_stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<Protocol.ProtocolResponseWithError>;
638  }
639  export interface CastDispatcher {
640    /**
641     * This is fired whenever the list of available sinks changes. A sink is a
642     * device or a software surface that you can cast to.
643     */
644    sinksUpdated(params: Protocol.Cast.SinksUpdatedEvent): void;
645
646    /**
647     * This is fired whenever the outstanding issue/error message changes.
648     * |issueMessage| is empty if there is no issue.
649     */
650    issueUpdated(params: Protocol.Cast.IssueUpdatedEvent): void;
651  }
652
653  export interface DOMApi {
654    /**
655     * Collects class names for the node with given id and all of it's child nodes.
656     */
657    invoke_collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest):
658        Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
659
660    /**
661     * Creates a deep copy of the specified node and places it into the target container before the
662     * given anchor.
663     */
664    invoke_copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
665
666    /**
667     * Describes node given its id, does not require domain to be enabled. Does not start tracking any
668     * objects, can be used for automation.
669     */
670    invoke_describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
671
672    /**
673     * Scrolls the specified rect of the given node into view if not already visible.
674     * Note: exactly one between nodeId, backendNodeId and objectId should be passed
675     * to identify the node.
676     */
677    invoke_scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest):
678        Promise<Protocol.ProtocolResponseWithError>;
679
680    /**
681     * Disables DOM agent for the given page.
682     */
683    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
684
685    /**
686     * Discards search results from the session with the given id. `getSearchResults` should no longer
687     * be called for that search.
688     */
689    invoke_discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest):
690        Promise<Protocol.ProtocolResponseWithError>;
691
692    /**
693     * Enables DOM agent for the given page.
694     */
695    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
696
697    /**
698     * Focuses the given element.
699     */
700    invoke_focus(params: Protocol.DOM.FocusRequest): Promise<Protocol.ProtocolResponseWithError>;
701
702    /**
703     * Returns attributes for the specified node.
704     */
705    invoke_getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
706
707    /**
708     * Returns boxes for the given node.
709     */
710    invoke_getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
711
712    /**
713     * Returns quads that describe node position on the page. This method
714     * might return multiple quads for inline nodes.
715     */
716    invoke_getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
717
718    /**
719     * Returns the root DOM node (and optionally the subtree) to the caller.
720     */
721    invoke_getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
722
723    /**
724     * Returns the root DOM node (and optionally the subtree) to the caller.
725     * Deprecated, as it is not designed to work well with the rest of the DOM agent.
726     * Use DOMSnapshot.captureSnapshot instead.
727     */
728    invoke_getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest):
729        Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
730
731    /**
732     * Finds nodes with a given computed style in a subtree.
733     */
734    invoke_getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest):
735        Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
736
737    /**
738     * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
739     * either returned or not.
740     */
741    invoke_getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest):
742        Promise<Protocol.DOM.GetNodeForLocationResponse>;
743
744    /**
745     * Returns node's HTML markup.
746     */
747    invoke_getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
748
749    /**
750     * Returns the id of the nearest ancestor that is a relayout boundary.
751     */
752    invoke_getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest):
753        Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
754
755    /**
756     * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
757     * identifier.
758     */
759    invoke_getSearchResults(params: Protocol.DOM.GetSearchResultsRequest):
760        Promise<Protocol.DOM.GetSearchResultsResponse>;
761
762    /**
763     * Hides any highlight.
764     */
765    invoke_hideHighlight(): Promise<Protocol.ProtocolResponseWithError>;
766
767    /**
768     * Highlights DOM node.
769     */
770    invoke_highlightNode(): Promise<Protocol.ProtocolResponseWithError>;
771
772    /**
773     * Highlights given rectangle.
774     */
775    invoke_highlightRect(): Promise<Protocol.ProtocolResponseWithError>;
776
777    /**
778     * Marks last undoable state.
779     */
780    invoke_markUndoableState(): Promise<Protocol.ProtocolResponseWithError>;
781
782    /**
783     * Moves node into the new container, places it before the given anchor.
784     */
785    invoke_moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
786
787    /**
788     * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
789     * `cancelSearch` to end this search session.
790     */
791    invoke_performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
792
793    /**
794     * Requests that the node is sent to the caller given its path. // FIXME, use XPath
795     */
796    invoke_pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest):
797        Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
798
799    /**
800     * Requests that a batch of nodes is sent to the caller given their backend node ids.
801     */
802    invoke_pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest):
803        Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
804
805    /**
806     * Executes `querySelector` on a given node.
807     */
808    invoke_querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
809
810    /**
811     * Executes `querySelectorAll` on a given node.
812     */
813    invoke_querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest):
814        Promise<Protocol.DOM.QuerySelectorAllResponse>;
815
816    /**
817     * Re-does the last undone action.
818     */
819    invoke_redo(): Promise<Protocol.ProtocolResponseWithError>;
820
821    /**
822     * Removes attribute with given name from an element with given id.
823     */
824    invoke_removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<Protocol.ProtocolResponseWithError>;
825
826    /**
827     * Removes node with given id.
828     */
829    invoke_removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
830
831    /**
832     * Requests that children of the node with given id are returned to the caller in form of
833     * `setChildNodes` events where not only immediate children are retrieved, but all children down to
834     * the specified depth.
835     */
836    invoke_requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest):
837        Promise<Protocol.ProtocolResponseWithError>;
838
839    /**
840     * Requests that the node is sent to the caller given the JavaScript node object reference. All
841     * nodes that form the path from the node to the root are also sent to the client as a series of
842     * `setChildNodes` notifications.
843     */
844    invoke_requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
845
846    /**
847     * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
848     */
849    invoke_resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
850
851    /**
852     * Sets attribute for an element with given id.
853     */
854    invoke_setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest):
855        Promise<Protocol.ProtocolResponseWithError>;
856
857    /**
858     * Sets attributes on element with given id. This method is useful when user edits some existing
859     * attribute value and types in several attribute name/value pairs.
860     */
861    invoke_setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest):
862        Promise<Protocol.ProtocolResponseWithError>;
863
864    /**
865     * Sets files for the given file input element.
866     */
867    invoke_setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest):
868        Promise<Protocol.ProtocolResponseWithError>;
869
870    /**
871     * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
872     */
873    invoke_setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest):
874        Promise<Protocol.ProtocolResponseWithError>;
875
876    /**
877     * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
878     */
879    invoke_getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest):
880        Promise<Protocol.DOM.GetNodeStackTracesResponse>;
881
882    /**
883     * Returns file information for the given
884     * File wrapper.
885     */
886    invoke_getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>;
887
888    /**
889     * Enables console to refer to the node with given id via $x (see Command Line API for more details
890     * $x functions).
891     */
892    invoke_setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
893
894    /**
895     * Sets node name for a node with given id.
896     */
897    invoke_setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>;
898
899    /**
900     * Sets node value for a node with given id.
901     */
902    invoke_setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<Protocol.ProtocolResponseWithError>;
903
904    /**
905     * Sets node HTML markup, returns new node id.
906     */
907    invoke_setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<Protocol.ProtocolResponseWithError>;
908
909    /**
910     * Undoes the last performed action.
911     */
912    invoke_undo(): Promise<Protocol.ProtocolResponseWithError>;
913
914    /**
915     * Returns iframe node that owns iframe with the given domain.
916     */
917    invoke_getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>;
918  }
919  export interface DOMDispatcher {
920    /**
921     * Fired when `Element`'s attribute is modified.
922     */
923    attributeModified(params: Protocol.DOM.AttributeModifiedEvent): void;
924
925    /**
926     * Fired when `Element`'s attribute is removed.
927     */
928    attributeRemoved(params: Protocol.DOM.AttributeRemovedEvent): void;
929
930    /**
931     * Mirrors `DOMCharacterDataModified` event.
932     */
933    characterDataModified(params: Protocol.DOM.CharacterDataModifiedEvent): void;
934
935    /**
936     * Fired when `Container`'s child node count has changed.
937     */
938    childNodeCountUpdated(params: Protocol.DOM.ChildNodeCountUpdatedEvent): void;
939
940    /**
941     * Mirrors `DOMNodeInserted` event.
942     */
943    childNodeInserted(params: Protocol.DOM.ChildNodeInsertedEvent): void;
944
945    /**
946     * Mirrors `DOMNodeRemoved` event.
947     */
948    childNodeRemoved(params: Protocol.DOM.ChildNodeRemovedEvent): void;
949
950    /**
951     * Called when distrubution is changed.
952     */
953    distributedNodesUpdated(params: Protocol.DOM.DistributedNodesUpdatedEvent): void;
954
955    /**
956     * Fired when `Document` has been totally updated. Node ids are no longer valid.
957     */
958    documentUpdated(): void;
959
960    /**
961     * Fired when `Element`'s inline style is modified via a CSS property modification.
962     */
963    inlineStyleInvalidated(params: Protocol.DOM.InlineStyleInvalidatedEvent): void;
964
965    /**
966     * Called when a pseudo element is added to an element.
967     */
968    pseudoElementAdded(params: Protocol.DOM.PseudoElementAddedEvent): void;
969
970    /**
971     * Called when a pseudo element is removed from an element.
972     */
973    pseudoElementRemoved(params: Protocol.DOM.PseudoElementRemovedEvent): void;
974
975    /**
976     * Fired when backend wants to provide client with the missing DOM structure. This happens upon
977     * most of the calls requesting node ids.
978     */
979    setChildNodes(params: Protocol.DOM.SetChildNodesEvent): void;
980
981    /**
982     * Called when shadow root is popped from the element.
983     */
984    shadowRootPopped(params: Protocol.DOM.ShadowRootPoppedEvent): void;
985
986    /**
987     * Called when shadow root is pushed into the element.
988     */
989    shadowRootPushed(params: Protocol.DOM.ShadowRootPushedEvent): void;
990  }
991
992  export interface DOMDebuggerApi {
993    /**
994     * Returns event listeners of the given object.
995     */
996    invoke_getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest):
997        Promise<Protocol.DOMDebugger.GetEventListenersResponse>;
998
999    /**
1000     * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
1001     */
1002    invoke_removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest):
1003        Promise<Protocol.ProtocolResponseWithError>;
1004
1005    /**
1006     * Removes breakpoint on particular DOM event.
1007     */
1008    invoke_removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest):
1009        Promise<Protocol.ProtocolResponseWithError>;
1010
1011    /**
1012     * Removes breakpoint on particular native event.
1013     */
1014    invoke_removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest):
1015        Promise<Protocol.ProtocolResponseWithError>;
1016
1017    /**
1018     * Removes breakpoint from XMLHttpRequest.
1019     */
1020    invoke_removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest):
1021        Promise<Protocol.ProtocolResponseWithError>;
1022
1023    /**
1024     * Sets breakpoint on particular operation with DOM.
1025     */
1026    invoke_setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest):
1027        Promise<Protocol.ProtocolResponseWithError>;
1028
1029    /**
1030     * Sets breakpoint on particular DOM event.
1031     */
1032    invoke_setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest):
1033        Promise<Protocol.ProtocolResponseWithError>;
1034
1035    /**
1036     * Sets breakpoint on particular native event.
1037     */
1038    invoke_setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest):
1039        Promise<Protocol.ProtocolResponseWithError>;
1040
1041    /**
1042     * Sets breakpoint on XMLHttpRequest.
1043     */
1044    invoke_setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest):
1045        Promise<Protocol.ProtocolResponseWithError>;
1046  }
1047  export interface DOMDebuggerDispatcher {}
1048
1049  export interface DOMSnapshotApi {
1050    /**
1051     * Disables DOM snapshot agent for the given page.
1052     */
1053    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1054
1055    /**
1056     * Enables DOM snapshot agent for the given page.
1057     */
1058    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1059
1060    /**
1061     * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
1062     * template contents, and imported documents) in a flattened array, as well as layout and
1063     * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
1064     * flattened.
1065     */
1066    invoke_getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest):
1067        Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
1068
1069    /**
1070     * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
1071     * template contents, and imported documents) in a flattened array, as well as layout and
1072     * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
1073     * flattened.
1074     */
1075    invoke_captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest):
1076        Promise<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
1077  }
1078  export interface DOMSnapshotDispatcher {}
1079
1080  export interface DOMStorageApi {
1081    invoke_clear(params: Protocol.DOMStorage.ClearRequest): Promise<Protocol.ProtocolResponseWithError>;
1082
1083    /**
1084     * Disables storage tracking, prevents storage events from being sent to the client.
1085     */
1086    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1087
1088    /**
1089     * Enables storage tracking, storage events will now be delivered to the client.
1090     */
1091    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1092
1093    invoke_getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest):
1094        Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
1095
1096    invoke_removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest):
1097        Promise<Protocol.ProtocolResponseWithError>;
1098
1099    invoke_setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest):
1100        Promise<Protocol.ProtocolResponseWithError>;
1101  }
1102  export interface DOMStorageDispatcher {
1103    domStorageItemAdded(params: Protocol.DOMStorage.DomStorageItemAddedEvent): void;
1104
1105    domStorageItemRemoved(params: Protocol.DOMStorage.DomStorageItemRemovedEvent): void;
1106
1107    domStorageItemUpdated(params: Protocol.DOMStorage.DomStorageItemUpdatedEvent): void;
1108
1109    domStorageItemsCleared(params: Protocol.DOMStorage.DomStorageItemsClearedEvent): void;
1110  }
1111
1112  export interface DatabaseApi {
1113    /**
1114     * Disables database tracking, prevents database events from being sent to the client.
1115     */
1116    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1117
1118    /**
1119     * Enables database tracking, database events will now be delivered to the client.
1120     */
1121    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1122
1123    invoke_executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
1124
1125    invoke_getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest):
1126        Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
1127  }
1128  export interface DatabaseDispatcher {
1129    addDatabase(params: Protocol.Database.AddDatabaseEvent): void;
1130  }
1131
1132  export interface DeviceOrientationApi {
1133    /**
1134     * Clears the overridden Device Orientation.
1135     */
1136    invoke_clearDeviceOrientationOverride(): Promise<Protocol.ProtocolResponseWithError>;
1137
1138    /**
1139     * Overrides the Device Orientation.
1140     */
1141    invoke_setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest):
1142        Promise<Protocol.ProtocolResponseWithError>;
1143  }
1144  export interface DeviceOrientationDispatcher {}
1145
1146  export interface EmulationApi {
1147    /**
1148     * Tells whether emulation is supported.
1149     */
1150    invoke_canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
1151
1152    /**
1153     * Clears the overriden device metrics.
1154     */
1155    invoke_clearDeviceMetricsOverride(): Promise<Protocol.ProtocolResponseWithError>;
1156
1157    /**
1158     * Clears the overriden Geolocation Position and Error.
1159     */
1160    invoke_clearGeolocationOverride(): Promise<Protocol.ProtocolResponseWithError>;
1161
1162    /**
1163     * Requests that page scale factor is reset to initial values.
1164     */
1165    invoke_resetPageScaleFactor(): Promise<Protocol.ProtocolResponseWithError>;
1166
1167    /**
1168     * Enables or disables simulating a focused and active page.
1169     */
1170    invoke_setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest):
1171        Promise<Protocol.ProtocolResponseWithError>;
1172
1173    /**
1174     * Enables CPU throttling to emulate slow CPUs.
1175     */
1176    invoke_setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest):
1177        Promise<Protocol.ProtocolResponseWithError>;
1178
1179    /**
1180     * Sets or clears an override of the default background color of the frame. This override is used
1181     * if the content does not specify one.
1182     */
1183    invoke_setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest):
1184        Promise<Protocol.ProtocolResponseWithError>;
1185
1186    /**
1187     * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
1188     * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
1189     * query results).
1190     */
1191    invoke_setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest):
1192        Promise<Protocol.ProtocolResponseWithError>;
1193
1194    invoke_setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest):
1195        Promise<Protocol.ProtocolResponseWithError>;
1196
1197    invoke_setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest):
1198        Promise<Protocol.ProtocolResponseWithError>;
1199
1200    invoke_setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest):
1201        Promise<Protocol.ProtocolResponseWithError>;
1202
1203    /**
1204     * Emulates the given media type or media feature for CSS media queries.
1205     */
1206    invoke_setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest):
1207        Promise<Protocol.ProtocolResponseWithError>;
1208
1209    /**
1210     * Emulates the given vision deficiency.
1211     */
1212    invoke_setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest):
1213        Promise<Protocol.ProtocolResponseWithError>;
1214
1215    /**
1216     * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
1217     * unavailable.
1218     */
1219    invoke_setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest):
1220        Promise<Protocol.ProtocolResponseWithError>;
1221
1222    /**
1223     * Overrides the Idle state.
1224     */
1225    invoke_setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest):
1226        Promise<Protocol.ProtocolResponseWithError>;
1227
1228    /**
1229     * Clears Idle state overrides.
1230     */
1231    invoke_clearIdleOverride(): Promise<Protocol.ProtocolResponseWithError>;
1232
1233    /**
1234     * Overrides value returned by the javascript navigator object.
1235     */
1236    invoke_setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest):
1237        Promise<Protocol.ProtocolResponseWithError>;
1238
1239    /**
1240     * Sets a specified page scale factor.
1241     */
1242    invoke_setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest):
1243        Promise<Protocol.ProtocolResponseWithError>;
1244
1245    /**
1246     * Switches script execution in the page.
1247     */
1248    invoke_setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest):
1249        Promise<Protocol.ProtocolResponseWithError>;
1250
1251    /**
1252     * Enables touch on platforms which do not support them.
1253     */
1254    invoke_setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest):
1255        Promise<Protocol.ProtocolResponseWithError>;
1256
1257    /**
1258     * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
1259     * the current virtual time policy.  Note this supersedes any previous time budget.
1260     */
1261    invoke_setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest):
1262        Promise<Protocol.Emulation.SetVirtualTimePolicyResponse>;
1263
1264    /**
1265     * Overrides default host system locale with the specified one.
1266     */
1267    invoke_setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest):
1268        Promise<Protocol.ProtocolResponseWithError>;
1269
1270    /**
1271     * Overrides default host system timezone with the specified one.
1272     */
1273    invoke_setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest):
1274        Promise<Protocol.ProtocolResponseWithError>;
1275
1276    /**
1277     * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
1278     * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
1279     * on Android.
1280     */
1281    invoke_setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest):
1282        Promise<Protocol.ProtocolResponseWithError>;
1283
1284    invoke_setDisabledImageTypes(params: Protocol.Emulation.SetDisabledImageTypesRequest):
1285        Promise<Protocol.ProtocolResponseWithError>;
1286
1287    /**
1288     * Allows overriding user agent with the given string.
1289     */
1290    invoke_setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest):
1291        Promise<Protocol.ProtocolResponseWithError>;
1292  }
1293  export interface EmulationDispatcher {
1294    /**
1295     * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
1296     */
1297    virtualTimeBudgetExpired(): void;
1298  }
1299
1300  export interface HeadlessExperimentalApi {
1301    /**
1302     * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
1303     * screenshot from the resulting frame. Requires that the target was created with enabled
1304     * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
1305     * https://goo.gl/3zHXhB for more background.
1306     */
1307    invoke_beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest):
1308        Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
1309
1310    /**
1311     * Disables headless events for the target.
1312     */
1313    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1314
1315    /**
1316     * Enables headless events for the target.
1317     */
1318    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1319  }
1320  export interface HeadlessExperimentalDispatcher {
1321    /**
1322     * Issued when the target starts or stops needing BeginFrames.
1323     * Deprecated. Issue beginFrame unconditionally instead and use result from
1324     * beginFrame to detect whether the frames were suppressed.
1325     */
1326    needsBeginFramesChanged(params: Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent): void;
1327  }
1328
1329  // eslint thinks this is us prefixing our interfaces but it's not!
1330  // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1331  export interface IOApi {
1332    /**
1333     * Close the stream, discard any temporary backing storage.
1334     */
1335    invoke_close(params: Protocol.IO.CloseRequest): Promise<Protocol.ProtocolResponseWithError>;
1336
1337    /**
1338     * Read a chunk of the stream
1339     */
1340    invoke_read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
1341
1342    /**
1343     * Return UUID of Blob object specified by a remote object id.
1344     */
1345    invoke_resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
1346  }
1347  export interface IODispatcher {}
1348
1349  // eslint thinks this is us prefixing our interfaces but it's not!
1350  // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1351  export interface IndexedDBApi {
1352    /**
1353     * Clears all entries from an object store.
1354     */
1355    invoke_clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest):
1356        Promise<Protocol.ProtocolResponseWithError>;
1357
1358    /**
1359     * Deletes a database.
1360     */
1361    invoke_deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest):
1362        Promise<Protocol.ProtocolResponseWithError>;
1363
1364    /**
1365     * Delete a range of entries from an object store
1366     */
1367    invoke_deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest):
1368        Promise<Protocol.ProtocolResponseWithError>;
1369
1370    /**
1371     * Disables events from backend.
1372     */
1373    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1374
1375    /**
1376     * Enables events from backend.
1377     */
1378    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1379
1380    /**
1381     * Requests data from object store or index.
1382     */
1383    invoke_requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
1384
1385    /**
1386     * Gets metadata of an object store
1387     */
1388    invoke_getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
1389
1390    /**
1391     * Requests database with given name in given frame.
1392     */
1393    invoke_requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest):
1394        Promise<Protocol.IndexedDB.RequestDatabaseResponse>;
1395
1396    /**
1397     * Requests database names for given security origin.
1398     */
1399    invoke_requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest):
1400        Promise<Protocol.IndexedDB.RequestDatabaseNamesResponse>;
1401  }
1402  export interface IndexedDBDispatcher {}
1403
1404  // eslint thinks this is us prefixing our interfaces but it's not!
1405  // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1406  export interface InputApi {
1407    /**
1408     * Dispatches a key event to the page.
1409     */
1410    invoke_dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest):
1411        Promise<Protocol.ProtocolResponseWithError>;
1412
1413    /**
1414     * This method emulates inserting text that doesn't come from a key press,
1415     * for example an emoji keyboard or an IME.
1416     */
1417    invoke_insertText(params: Protocol.Input.InsertTextRequest): Promise<Protocol.ProtocolResponseWithError>;
1418
1419    /**
1420     * Dispatches a mouse event to the page.
1421     */
1422    invoke_dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest):
1423        Promise<Protocol.ProtocolResponseWithError>;
1424
1425    /**
1426     * Dispatches a touch event to the page.
1427     */
1428    invoke_dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest):
1429        Promise<Protocol.ProtocolResponseWithError>;
1430
1431    /**
1432     * Emulates touch event from the mouse event parameters.
1433     */
1434    invoke_emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest):
1435        Promise<Protocol.ProtocolResponseWithError>;
1436
1437    /**
1438     * Ignores input events (useful while auditing page).
1439     */
1440    invoke_setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest):
1441        Promise<Protocol.ProtocolResponseWithError>;
1442
1443    /**
1444     * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
1445     */
1446    invoke_synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest):
1447        Promise<Protocol.ProtocolResponseWithError>;
1448
1449    /**
1450     * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
1451     */
1452    invoke_synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest):
1453        Promise<Protocol.ProtocolResponseWithError>;
1454
1455    /**
1456     * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
1457     */
1458    invoke_synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest):
1459        Promise<Protocol.ProtocolResponseWithError>;
1460  }
1461  export interface InputDispatcher {}
1462
1463  // eslint thinks this is us prefixing our interfaces but it's not!
1464  // eslint-disable-next-line @typescript-eslint/interface-name-prefix
1465  export interface InspectorApi {
1466    /**
1467     * Disables inspector domain notifications.
1468     */
1469    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1470
1471    /**
1472     * Enables inspector domain notifications.
1473     */
1474    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1475  }
1476  export interface InspectorDispatcher {
1477    /**
1478     * Fired when remote debugging connection is about to be terminated. Contains detach reason.
1479     */
1480    detached(params: Protocol.Inspector.DetachedEvent): void;
1481
1482    /**
1483     * Fired when debugging target has crashed
1484     */
1485    targetCrashed(): void;
1486
1487    /**
1488     * Fired when debugging target has reloaded after crash
1489     */
1490    targetReloadedAfterCrash(): void;
1491  }
1492
1493  export interface LayerTreeApi {
1494    /**
1495     * Provides the reasons why the given layer was composited.
1496     */
1497    invoke_compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest):
1498        Promise<Protocol.LayerTree.CompositingReasonsResponse>;
1499
1500    /**
1501     * Disables compositing tree inspection.
1502     */
1503    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1504
1505    /**
1506     * Enables compositing tree inspection.
1507     */
1508    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1509
1510    /**
1511     * Returns the snapshot identifier.
1512     */
1513    invoke_loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest):
1514        Promise<Protocol.LayerTree.LoadSnapshotResponse>;
1515
1516    /**
1517     * Returns the layer snapshot identifier.
1518     */
1519    invoke_makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest):
1520        Promise<Protocol.LayerTree.MakeSnapshotResponse>;
1521
1522    invoke_profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest):
1523        Promise<Protocol.LayerTree.ProfileSnapshotResponse>;
1524
1525    /**
1526     * Releases layer snapshot captured by the back-end.
1527     */
1528    invoke_releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest):
1529        Promise<Protocol.ProtocolResponseWithError>;
1530
1531    /**
1532     * Replays the layer snapshot and returns the resulting bitmap.
1533     */
1534    invoke_replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest):
1535        Promise<Protocol.LayerTree.ReplaySnapshotResponse>;
1536
1537    /**
1538     * Replays the layer snapshot and returns canvas log.
1539     */
1540    invoke_snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest):
1541        Promise<Protocol.LayerTree.SnapshotCommandLogResponse>;
1542  }
1543  export interface LayerTreeDispatcher {
1544    layerPainted(params: Protocol.LayerTree.LayerPaintedEvent): void;
1545
1546    layerTreeDidChange(params: Protocol.LayerTree.LayerTreeDidChangeEvent): void;
1547  }
1548
1549  export interface LogApi {
1550    /**
1551     * Clears the log.
1552     */
1553    invoke_clear(): Promise<Protocol.ProtocolResponseWithError>;
1554
1555    /**
1556     * Disables log domain, prevents further log entries from being reported to the client.
1557     */
1558    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1559
1560    /**
1561     * Enables log domain, sends the entries collected so far to the client by means of the
1562     * `entryAdded` notification.
1563     */
1564    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1565
1566    /**
1567     * start violation reporting.
1568     */
1569    invoke_startViolationsReport(params: Protocol.Log.StartViolationsReportRequest):
1570        Promise<Protocol.ProtocolResponseWithError>;
1571
1572    /**
1573     * Stop violation reporting.
1574     */
1575    invoke_stopViolationsReport(): Promise<Protocol.ProtocolResponseWithError>;
1576  }
1577  export interface LogDispatcher {
1578    /**
1579     * Issued when new message was logged.
1580     */
1581    entryAdded(params: Protocol.Log.EntryAddedEvent): void;
1582  }
1583
1584  export interface MemoryApi {
1585    invoke_getDOMCounters(): Promise<Protocol.Memory.GetDOMCountersResponse>;
1586
1587    invoke_prepareForLeakDetection(): Promise<Protocol.ProtocolResponseWithError>;
1588
1589    /**
1590     * Simulate OomIntervention by purging V8 memory.
1591     */
1592    invoke_forciblyPurgeJavaScriptMemory(): Promise<Protocol.ProtocolResponseWithError>;
1593
1594    /**
1595     * Enable/disable suppressing memory pressure notifications in all processes.
1596     */
1597    invoke_setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest):
1598        Promise<Protocol.ProtocolResponseWithError>;
1599
1600    /**
1601     * Simulate a memory pressure notification in all processes.
1602     */
1603    invoke_simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest):
1604        Promise<Protocol.ProtocolResponseWithError>;
1605
1606    /**
1607     * Start collecting native memory profile.
1608     */
1609    invoke_startSampling(params: Protocol.Memory.StartSamplingRequest): Promise<Protocol.ProtocolResponseWithError>;
1610
1611    /**
1612     * Stop collecting native memory profile.
1613     */
1614    invoke_stopSampling(): Promise<Protocol.ProtocolResponseWithError>;
1615
1616    /**
1617     * Retrieve native memory allocations profile
1618     * collected since renderer process startup.
1619     */
1620    invoke_getAllTimeSamplingProfile(): Promise<Protocol.Memory.GetAllTimeSamplingProfileResponse>;
1621
1622    /**
1623     * Retrieve native memory allocations profile
1624     * collected since browser process startup.
1625     */
1626    invoke_getBrowserSamplingProfile(): Promise<Protocol.Memory.GetBrowserSamplingProfileResponse>;
1627
1628    /**
1629     * Retrieve native memory allocations profile collected since last
1630     * `startSampling` call.
1631     */
1632    invoke_getSamplingProfile(): Promise<Protocol.Memory.GetSamplingProfileResponse>;
1633  }
1634  export interface MemoryDispatcher {}
1635
1636  export interface NetworkApi {
1637    /**
1638     * Tells whether clearing browser cache is supported.
1639     */
1640    invoke_canClearBrowserCache(): Promise<Protocol.Network.CanClearBrowserCacheResponse>;
1641
1642    /**
1643     * Tells whether clearing browser cookies is supported.
1644     */
1645    invoke_canClearBrowserCookies(): Promise<Protocol.Network.CanClearBrowserCookiesResponse>;
1646
1647    /**
1648     * Tells whether emulation of network conditions is supported.
1649     */
1650    invoke_canEmulateNetworkConditions(): Promise<Protocol.Network.CanEmulateNetworkConditionsResponse>;
1651
1652    /**
1653     * Clears browser cache.
1654     */
1655    invoke_clearBrowserCache(): Promise<Protocol.ProtocolResponseWithError>;
1656
1657    /**
1658     * Clears browser cookies.
1659     */
1660    invoke_clearBrowserCookies(): Promise<Protocol.ProtocolResponseWithError>;
1661
1662    /**
1663     * Response to Network.requestIntercepted which either modifies the request to continue with any
1664     * modifications, or blocks it, or completes it with the provided response bytes. If a network
1665     * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
1666     * event will be sent with the same InterceptionId.
1667     * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
1668     */
1669    invoke_continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest):
1670        Promise<Protocol.ProtocolResponseWithError>;
1671
1672    /**
1673     * Deletes browser cookies with matching name and url or domain/path pair.
1674     */
1675    invoke_deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
1676
1677    /**
1678     * Disables network tracking, prevents network events from being sent to the client.
1679     */
1680    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1681
1682    /**
1683     * Activates emulation of network conditions.
1684     */
1685    invoke_emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest):
1686        Promise<Protocol.ProtocolResponseWithError>;
1687
1688    /**
1689     * Enables network tracking, network events will now be delivered to the client.
1690     */
1691    invoke_enable(params: Protocol.Network.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
1692
1693    /**
1694     * Returns all browser cookies. Depending on the backend support, will return detailed cookie
1695     * information in the `cookies` field.
1696     */
1697    invoke_getAllCookies(): Promise<Protocol.Network.GetAllCookiesResponse>;
1698
1699    /**
1700     * Returns the DER-encoded certificate.
1701     */
1702    invoke_getCertificate(params: Protocol.Network.GetCertificateRequest):
1703        Promise<Protocol.Network.GetCertificateResponse>;
1704
1705    /**
1706     * Returns all browser cookies for the current URL. Depending on the backend support, will return
1707     * detailed cookie information in the `cookies` field.
1708     */
1709    invoke_getCookies(params: Protocol.Network.GetCookiesRequest): Promise<Protocol.Network.GetCookiesResponse>;
1710
1711    /**
1712     * Returns content served for the given request.
1713     */
1714    invoke_getResponseBody(params: Protocol.Network.GetResponseBodyRequest):
1715        Promise<Protocol.Network.GetResponseBodyResponse>;
1716
1717    /**
1718     * Returns post data sent with the request. Returns an error when no data was sent with the request.
1719     */
1720    invoke_getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest):
1721        Promise<Protocol.Network.GetRequestPostDataResponse>;
1722
1723    /**
1724     * Returns content served for the given currently intercepted request.
1725     */
1726    invoke_getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest):
1727        Promise<Protocol.Network.GetResponseBodyForInterceptionResponse>;
1728
1729    /**
1730     * Returns a handle to the stream representing the response body. Note that after this command,
1731     * the intercepted request can't be continued as is -- you either need to cancel it or to provide
1732     * the response body. The stream only supports sequential read, IO.read will fail if the position
1733     * is specified.
1734     */
1735    invoke_takeResponseBodyForInterceptionAsStream(params:
1736                                                       Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest):
1737        Promise<Protocol.Network.TakeResponseBodyForInterceptionAsStreamResponse>;
1738
1739    /**
1740     * This method sends a new XMLHttpRequest which is identical to the original one. The following
1741     * parameters should be identical: method, url, async, request body, extra headers, withCredentials
1742     * attribute, user, password.
1743     */
1744    invoke_replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise<Protocol.ProtocolResponseWithError>;
1745
1746    /**
1747     * Searches for given string in response content.
1748     */
1749    invoke_searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest):
1750        Promise<Protocol.Network.SearchInResponseBodyResponse>;
1751
1752    /**
1753     * Blocks URLs from loading.
1754     */
1755    invoke_setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise<Protocol.ProtocolResponseWithError>;
1756
1757    /**
1758     * Toggles ignoring of service worker for each request.
1759     */
1760    invoke_setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest):
1761        Promise<Protocol.ProtocolResponseWithError>;
1762
1763    /**
1764     * Toggles ignoring cache for each request. If `true`, cache will not be used.
1765     */
1766    invoke_setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest):
1767        Promise<Protocol.ProtocolResponseWithError>;
1768
1769    /**
1770     * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
1771     */
1772    invoke_setCookie(params: Protocol.Network.SetCookieRequest): Promise<Protocol.Network.SetCookieResponse>;
1773
1774    /**
1775     * Sets given cookies.
1776     */
1777    invoke_setCookies(params: Protocol.Network.SetCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
1778
1779    /**
1780     * For testing.
1781     */
1782    invoke_setDataSizeLimitsForTest(params: Protocol.Network.SetDataSizeLimitsForTestRequest):
1783        Promise<Protocol.ProtocolResponseWithError>;
1784
1785    /**
1786     * Specifies whether to always send extra HTTP headers with the requests from this page.
1787     */
1788    invoke_setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest):
1789        Promise<Protocol.ProtocolResponseWithError>;
1790
1791    /**
1792     * Specifies whether to attach a page script stack id in requests
1793     */
1794    invoke_setAttachDebugStack(params: Protocol.Network.SetAttachDebugStackRequest):
1795        Promise<Protocol.ProtocolResponseWithError>;
1796
1797    /**
1798     * Sets the requests to intercept that match the provided patterns and optionally resource types.
1799     * Deprecated, please use Fetch.enable instead.
1800     */
1801    invoke_setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest):
1802        Promise<Protocol.ProtocolResponseWithError>;
1803
1804    /**
1805     * Allows overriding user agent with the given string.
1806     */
1807    invoke_setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest):
1808        Promise<Protocol.ProtocolResponseWithError>;
1809
1810    /**
1811     * Returns information about the COEP/COOP isolation status.
1812     */
1813    invoke_getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest):
1814        Promise<Protocol.Network.GetSecurityIsolationStatusResponse>;
1815
1816    /**
1817     * Fetches the resource and returns the content.
1818     */
1819    invoke_loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest):
1820        Promise<Protocol.Network.LoadNetworkResourceResponse>;
1821  }
1822  export interface NetworkDispatcher {
1823    /**
1824     * Fired when data chunk was received over the network.
1825     */
1826    dataReceived(params: Protocol.Network.DataReceivedEvent): void;
1827
1828    /**
1829     * Fired when EventSource message is received.
1830     */
1831    eventSourceMessageReceived(params: Protocol.Network.EventSourceMessageReceivedEvent): void;
1832
1833    /**
1834     * Fired when HTTP request has failed to load.
1835     */
1836    loadingFailed(params: Protocol.Network.LoadingFailedEvent): void;
1837
1838    /**
1839     * Fired when HTTP request has finished loading.
1840     */
1841    loadingFinished(params: Protocol.Network.LoadingFinishedEvent): void;
1842
1843    /**
1844     * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
1845     * mocked.
1846     * Deprecated, use Fetch.requestPaused instead.
1847     */
1848    requestIntercepted(params: Protocol.Network.RequestInterceptedEvent): void;
1849
1850    /**
1851     * Fired if request ended up loading from cache.
1852     */
1853    requestServedFromCache(params: Protocol.Network.RequestServedFromCacheEvent): void;
1854
1855    /**
1856     * Fired when page is about to send HTTP request.
1857     */
1858    requestWillBeSent(params: Protocol.Network.RequestWillBeSentEvent): void;
1859
1860    /**
1861     * Fired when resource loading priority is changed
1862     */
1863    resourceChangedPriority(params: Protocol.Network.ResourceChangedPriorityEvent): void;
1864
1865    /**
1866     * Fired when a signed exchange was received over the network
1867     */
1868    signedExchangeReceived(params: Protocol.Network.SignedExchangeReceivedEvent): void;
1869
1870    /**
1871     * Fired when HTTP response is available.
1872     */
1873    responseReceived(params: Protocol.Network.ResponseReceivedEvent): void;
1874
1875    /**
1876     * Fired when WebSocket is closed.
1877     */
1878    webSocketClosed(params: Protocol.Network.WebSocketClosedEvent): void;
1879
1880    /**
1881     * Fired upon WebSocket creation.
1882     */
1883    webSocketCreated(params: Protocol.Network.WebSocketCreatedEvent): void;
1884
1885    /**
1886     * Fired when WebSocket message error occurs.
1887     */
1888    webSocketFrameError(params: Protocol.Network.WebSocketFrameErrorEvent): void;
1889
1890    /**
1891     * Fired when WebSocket message is received.
1892     */
1893    webSocketFrameReceived(params: Protocol.Network.WebSocketFrameReceivedEvent): void;
1894
1895    /**
1896     * Fired when WebSocket message is sent.
1897     */
1898    webSocketFrameSent(params: Protocol.Network.WebSocketFrameSentEvent): void;
1899
1900    /**
1901     * Fired when WebSocket handshake response becomes available.
1902     */
1903    webSocketHandshakeResponseReceived(params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent): void;
1904
1905    /**
1906     * Fired when WebSocket is about to initiate handshake.
1907     */
1908    webSocketWillSendHandshakeRequest(params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent): void;
1909
1910    /**
1911     * Fired when additional information about a requestWillBeSent event is available from the
1912     * network stack. Not every requestWillBeSent event will have an additional
1913     * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
1914     * or requestWillBeSentExtraInfo will be fired first for the same request.
1915     */
1916    requestWillBeSentExtraInfo(params: Protocol.Network.RequestWillBeSentExtraInfoEvent): void;
1917
1918    /**
1919     * Fired when additional information about a responseReceived event is available from the network
1920     * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
1921     * it, and responseReceivedExtraInfo may be fired before or after responseReceived.
1922     */
1923    responseReceivedExtraInfo(params: Protocol.Network.ResponseReceivedExtraInfoEvent): void;
1924  }
1925
1926  export interface OverlayApi {
1927    /**
1928     * Disables domain notifications.
1929     */
1930    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
1931
1932    /**
1933     * Enables domain notifications.
1934     */
1935    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
1936
1937    /**
1938     * For testing.
1939     */
1940    invoke_getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest):
1941        Promise<Protocol.Overlay.GetHighlightObjectForTestResponse>;
1942
1943    /**
1944     * For Persistent Grid testing.
1945     */
1946    invoke_getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest):
1947        Promise<Protocol.Overlay.GetGridHighlightObjectsForTestResponse>;
1948
1949    /**
1950     * For Source Order Viewer testing.
1951     */
1952    invoke_getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest):
1953        Promise<Protocol.Overlay.GetSourceOrderHighlightObjectForTestResponse>;
1954
1955    /**
1956     * Hides any highlight.
1957     */
1958    invoke_hideHighlight(): Promise<Protocol.ProtocolResponseWithError>;
1959
1960    /**
1961     * Highlights owner element of the frame with given id.
1962     */
1963    invoke_highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise<Protocol.ProtocolResponseWithError>;
1964
1965    /**
1966     * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
1967     * objectId must be specified.
1968     */
1969    invoke_highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise<Protocol.ProtocolResponseWithError>;
1970
1971    /**
1972     * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
1973     */
1974    invoke_highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise<Protocol.ProtocolResponseWithError>;
1975
1976    /**
1977     * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
1978     */
1979    invoke_highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise<Protocol.ProtocolResponseWithError>;
1980
1981    /**
1982     * Highlights the source order of the children of the DOM node with given id or with the given
1983     * JavaScript object wrapper. Either nodeId or objectId must be specified.
1984     */
1985    invoke_highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest):
1986        Promise<Protocol.ProtocolResponseWithError>;
1987
1988    /**
1989     * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
1990     * Backend then generates 'inspectNodeRequested' event upon element selection.
1991     */
1992    invoke_setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise<Protocol.ProtocolResponseWithError>;
1993
1994    /**
1995     * Highlights owner element of all frames detected to be ads.
1996     */
1997    invoke_setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest):
1998        Promise<Protocol.ProtocolResponseWithError>;
1999
2000    invoke_setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest):
2001        Promise<Protocol.ProtocolResponseWithError>;
2002
2003    /**
2004     * Requests that backend shows debug borders on layers
2005     */
2006    invoke_setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest):
2007        Promise<Protocol.ProtocolResponseWithError>;
2008
2009    /**
2010     * Requests that backend shows the FPS counter
2011     */
2012    invoke_setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest):
2013        Promise<Protocol.ProtocolResponseWithError>;
2014
2015    /**
2016     * Highlight multiple elements with the CSS Grid overlay.
2017     */
2018    invoke_setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest):
2019        Promise<Protocol.ProtocolResponseWithError>;
2020
2021    /**
2022     * Requests that backend shows paint rectangles
2023     */
2024    invoke_setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest):
2025        Promise<Protocol.ProtocolResponseWithError>;
2026
2027    /**
2028     * Requests that backend shows layout shift regions
2029     */
2030    invoke_setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest):
2031        Promise<Protocol.ProtocolResponseWithError>;
2032
2033    /**
2034     * Requests that backend shows scroll bottleneck rects
2035     */
2036    invoke_setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest):
2037        Promise<Protocol.ProtocolResponseWithError>;
2038
2039    /**
2040     * Requests that backend shows hit-test borders on layers
2041     */
2042    invoke_setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest):
2043        Promise<Protocol.ProtocolResponseWithError>;
2044
2045    /**
2046     * Paints viewport size upon main frame resize.
2047     */
2048    invoke_setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest):
2049        Promise<Protocol.ProtocolResponseWithError>;
2050
2051    /**
2052     * Add a dual screen device hinge
2053     */
2054    invoke_setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise<Protocol.ProtocolResponseWithError>;
2055  }
2056  export interface OverlayDispatcher {
2057    /**
2058     * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
2059     * user manually inspects an element.
2060     */
2061    inspectNodeRequested(params: Protocol.Overlay.InspectNodeRequestedEvent): void;
2062
2063    /**
2064     * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
2065     */
2066    nodeHighlightRequested(params: Protocol.Overlay.NodeHighlightRequestedEvent): void;
2067
2068    /**
2069     * Fired when user asks to capture screenshot of some area on the page.
2070     */
2071    screenshotRequested(params: Protocol.Overlay.ScreenshotRequestedEvent): void;
2072
2073    /**
2074     * Fired when user cancels the inspect mode.
2075     */
2076    inspectModeCanceled(): void;
2077  }
2078
2079  export interface PageApi {
2080    /**
2081     * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
2082     */
2083    invoke_addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest):
2084        Promise<Protocol.Page.AddScriptToEvaluateOnLoadResponse>;
2085
2086    /**
2087     * Evaluates given script in every frame upon creation (before loading frame's scripts).
2088     */
2089    invoke_addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest):
2090        Promise<Protocol.Page.AddScriptToEvaluateOnNewDocumentResponse>;
2091
2092    /**
2093     * Brings page to front (activates tab).
2094     */
2095    invoke_bringToFront(): Promise<Protocol.ProtocolResponseWithError>;
2096
2097    /**
2098     * Capture page screenshot.
2099     */
2100    invoke_captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest):
2101        Promise<Protocol.Page.CaptureScreenshotResponse>;
2102
2103    /**
2104     * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
2105     * iframes, shadow DOM, external resources, and element-inline styles.
2106     */
2107    invoke_captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest):
2108        Promise<Protocol.Page.CaptureSnapshotResponse>;
2109
2110    /**
2111     * Clears the overriden device metrics.
2112     */
2113    invoke_clearDeviceMetricsOverride(): Promise<Protocol.ProtocolResponseWithError>;
2114
2115    /**
2116     * Clears the overridden Device Orientation.
2117     */
2118    invoke_clearDeviceOrientationOverride(): Promise<Protocol.ProtocolResponseWithError>;
2119
2120    /**
2121     * Clears the overriden Geolocation Position and Error.
2122     */
2123    invoke_clearGeolocationOverride(): Promise<Protocol.ProtocolResponseWithError>;
2124
2125    /**
2126     * Creates an isolated world for the given frame.
2127     */
2128    invoke_createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest):
2129        Promise<Protocol.Page.CreateIsolatedWorldResponse>;
2130
2131    /**
2132     * Deletes browser cookie with given name, domain and path.
2133     */
2134    invoke_deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise<Protocol.ProtocolResponseWithError>;
2135
2136    /**
2137     * Disables page domain notifications.
2138     */
2139    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
2140
2141    /**
2142     * Enables page domain notifications.
2143     */
2144    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
2145
2146    invoke_getAppManifest(): Promise<Protocol.Page.GetAppManifestResponse>;
2147
2148    invoke_getInstallabilityErrors(): Promise<Protocol.Page.GetInstallabilityErrorsResponse>;
2149
2150    invoke_getManifestIcons(): Promise<Protocol.Page.GetManifestIconsResponse>;
2151
2152    /**
2153     * Returns all browser cookies. Depending on the backend support, will return detailed cookie
2154     * information in the `cookies` field.
2155     */
2156    invoke_getCookies(): Promise<Protocol.Page.GetCookiesResponse>;
2157
2158    /**
2159     * Returns present frame tree structure.
2160     */
2161    invoke_getFrameTree(): Promise<Protocol.Page.GetFrameTreeResponse>;
2162
2163    /**
2164     * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
2165     */
2166    invoke_getLayoutMetrics(): Promise<Protocol.Page.GetLayoutMetricsResponse>;
2167
2168    /**
2169     * Returns navigation history for the current page.
2170     */
2171    invoke_getNavigationHistory(): Promise<Protocol.Page.GetNavigationHistoryResponse>;
2172
2173    /**
2174     * Resets navigation history for the current page.
2175     */
2176    invoke_resetNavigationHistory(): Promise<Protocol.ProtocolResponseWithError>;
2177
2178    /**
2179     * Returns content of the given resource.
2180     */
2181    invoke_getResourceContent(params: Protocol.Page.GetResourceContentRequest):
2182        Promise<Protocol.Page.GetResourceContentResponse>;
2183
2184    /**
2185     * Returns present frame / resource tree structure.
2186     */
2187    invoke_getResourceTree(): Promise<Protocol.Page.GetResourceTreeResponse>;
2188
2189    /**
2190     * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
2191     */
2192    invoke_handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest):
2193        Promise<Protocol.ProtocolResponseWithError>;
2194
2195    /**
2196     * Navigates current page to the given URL.
2197     */
2198    invoke_navigate(params: Protocol.Page.NavigateRequest): Promise<Protocol.Page.NavigateResponse>;
2199
2200    /**
2201     * Navigates current page to the given history entry.
2202     */
2203    invoke_navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest):
2204        Promise<Protocol.ProtocolResponseWithError>;
2205
2206    /**
2207     * Print page as PDF.
2208     */
2209    invoke_printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise<Protocol.Page.PrintToPDFResponse>;
2210
2211    /**
2212     * Reloads given page optionally ignoring the cache.
2213     */
2214    invoke_reload(params: Protocol.Page.ReloadRequest): Promise<Protocol.ProtocolResponseWithError>;
2215
2216    /**
2217     * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
2218     */
2219    invoke_removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest):
2220        Promise<Protocol.ProtocolResponseWithError>;
2221
2222    /**
2223     * Removes given script from the list.
2224     */
2225    invoke_removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest):
2226        Promise<Protocol.ProtocolResponseWithError>;
2227
2228    /**
2229     * Acknowledges that a screencast frame has been received by the frontend.
2230     */
2231    invoke_screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest):
2232        Promise<Protocol.ProtocolResponseWithError>;
2233
2234    /**
2235     * Searches for given string in resource content.
2236     */
2237    invoke_searchInResource(params: Protocol.Page.SearchInResourceRequest):
2238        Promise<Protocol.Page.SearchInResourceResponse>;
2239
2240    /**
2241     * Enable Chrome's experimental ad filter on all sites.
2242     */
2243    invoke_setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest):
2244        Promise<Protocol.ProtocolResponseWithError>;
2245
2246    /**
2247     * Enable page Content Security Policy by-passing.
2248     */
2249    invoke_setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise<Protocol.ProtocolResponseWithError>;
2250
2251    /**
2252     * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
2253     * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
2254     * query results).
2255     */
2256    invoke_setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest):
2257        Promise<Protocol.ProtocolResponseWithError>;
2258
2259    /**
2260     * Overrides the Device Orientation.
2261     */
2262    invoke_setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest):
2263        Promise<Protocol.ProtocolResponseWithError>;
2264
2265    /**
2266     * Set generic font families.
2267     */
2268    invoke_setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise<Protocol.ProtocolResponseWithError>;
2269
2270    /**
2271     * Set default font sizes.
2272     */
2273    invoke_setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise<Protocol.ProtocolResponseWithError>;
2274
2275    /**
2276     * Sets given markup as the document's HTML.
2277     */
2278    invoke_setDocumentContent(params: Protocol.Page.SetDocumentContentRequest):
2279        Promise<Protocol.ProtocolResponseWithError>;
2280
2281    /**
2282     * Set the behavior when downloading a file.
2283     */
2284    invoke_setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest):
2285        Promise<Protocol.ProtocolResponseWithError>;
2286
2287    /**
2288     * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
2289     * unavailable.
2290     */
2291    invoke_setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest):
2292        Promise<Protocol.ProtocolResponseWithError>;
2293
2294    /**
2295     * Controls whether page will emit lifecycle events.
2296     */
2297    invoke_setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest):
2298        Promise<Protocol.ProtocolResponseWithError>;
2299
2300    /**
2301     * Toggles mouse event-based touch event emulation.
2302     */
2303    invoke_setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest):
2304        Promise<Protocol.ProtocolResponseWithError>;
2305
2306    /**
2307     * Starts sending each frame using the `screencastFrame` event.
2308     */
2309    invoke_startScreencast(params: Protocol.Page.StartScreencastRequest): Promise<Protocol.ProtocolResponseWithError>;
2310
2311    /**
2312     * Force the page stop all navigations and pending resource fetches.
2313     */
2314    invoke_stopLoading(): Promise<Protocol.ProtocolResponseWithError>;
2315
2316    /**
2317     * Crashes renderer on the IO thread, generates minidumps.
2318     */
2319    invoke_crash(): Promise<Protocol.ProtocolResponseWithError>;
2320
2321    /**
2322     * Tries to close page, running its beforeunload hooks, if any.
2323     */
2324    invoke_close(): Promise<Protocol.ProtocolResponseWithError>;
2325
2326    /**
2327     * Tries to update the web lifecycle state of the page.
2328     * It will transition the page to the given state according to:
2329     * https://github.com/WICG/web-lifecycle/
2330     */
2331    invoke_setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest):
2332        Promise<Protocol.ProtocolResponseWithError>;
2333
2334    /**
2335     * Stops sending each frame in the `screencastFrame`.
2336     */
2337    invoke_stopScreencast(): Promise<Protocol.ProtocolResponseWithError>;
2338
2339    /**
2340     * Forces compilation cache to be generated for every subresource script.
2341     */
2342    invoke_setProduceCompilationCache(params: Protocol.Page.SetProduceCompilationCacheRequest):
2343        Promise<Protocol.ProtocolResponseWithError>;
2344
2345    /**
2346     * Seeds compilation cache for given url. Compilation cache does not survive
2347     * cross-process navigation.
2348     */
2349    invoke_addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest):
2350        Promise<Protocol.ProtocolResponseWithError>;
2351
2352    /**
2353     * Clears seeded compilation cache.
2354     */
2355    invoke_clearCompilationCache(): Promise<Protocol.ProtocolResponseWithError>;
2356
2357    /**
2358     * Generates a report for testing.
2359     */
2360    invoke_generateTestReport(params: Protocol.Page.GenerateTestReportRequest):
2361        Promise<Protocol.ProtocolResponseWithError>;
2362
2363    /**
2364     * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
2365     */
2366    invoke_waitForDebugger(): Promise<Protocol.ProtocolResponseWithError>;
2367
2368    /**
2369     * Intercept file chooser requests and transfer control to protocol clients.
2370     * When file chooser interception is enabled, native file chooser dialog is not shown.
2371     * Instead, a protocol event `Page.fileChooserOpened` is emitted.
2372     */
2373    invoke_setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest):
2374        Promise<Protocol.ProtocolResponseWithError>;
2375  }
2376  export interface PageDispatcher {
2377    domContentEventFired(params: Protocol.Page.DomContentEventFiredEvent): void;
2378
2379    /**
2380     * Emitted only when `page.interceptFileChooser` is enabled.
2381     */
2382    fileChooserOpened(params: Protocol.Page.FileChooserOpenedEvent): void;
2383
2384    /**
2385     * Fired when frame has been attached to its parent.
2386     */
2387    frameAttached(params: Protocol.Page.FrameAttachedEvent): void;
2388
2389    /**
2390     * Fired when frame no longer has a scheduled navigation.
2391     */
2392    frameClearedScheduledNavigation(params: Protocol.Page.FrameClearedScheduledNavigationEvent): void;
2393
2394    /**
2395     * Fired when frame has been detached from its parent.
2396     */
2397    frameDetached(params: Protocol.Page.FrameDetachedEvent): void;
2398
2399    /**
2400     * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
2401     */
2402    frameNavigated(params: Protocol.Page.FrameNavigatedEvent): void;
2403
2404    frameResized(): void;
2405
2406    /**
2407     * Fired when a renderer-initiated navigation is requested.
2408     * Navigation may still be cancelled after the event is issued.
2409     */
2410    frameRequestedNavigation(params: Protocol.Page.FrameRequestedNavigationEvent): void;
2411
2412    /**
2413     * Fired when frame schedules a potential navigation.
2414     */
2415    frameScheduledNavigation(params: Protocol.Page.FrameScheduledNavigationEvent): void;
2416
2417    /**
2418     * Fired when frame has started loading.
2419     */
2420    frameStartedLoading(params: Protocol.Page.FrameStartedLoadingEvent): void;
2421
2422    /**
2423     * Fired when frame has stopped loading.
2424     */
2425    frameStoppedLoading(params: Protocol.Page.FrameStoppedLoadingEvent): void;
2426
2427    /**
2428     * Fired when page is about to start a download.
2429     */
2430    downloadWillBegin(params: Protocol.Page.DownloadWillBeginEvent): void;
2431
2432    /**
2433     * Fired when download makes progress. Last call has |done| == true.
2434     */
2435    downloadProgress(params: Protocol.Page.DownloadProgressEvent): void;
2436
2437    /**
2438     * Fired when interstitial page was hidden
2439     */
2440    interstitialHidden(): void;
2441
2442    /**
2443     * Fired when interstitial page was shown
2444     */
2445    interstitialShown(): void;
2446
2447    /**
2448     * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
2449     * closed.
2450     */
2451    javascriptDialogClosed(params: Protocol.Page.JavascriptDialogClosedEvent): void;
2452
2453    /**
2454     * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
2455     * open.
2456     */
2457    javascriptDialogOpening(params: Protocol.Page.JavascriptDialogOpeningEvent): void;
2458
2459    /**
2460     * Fired for top level page lifecycle events such as navigation, load, paint, etc.
2461     */
2462    lifecycleEvent(params: Protocol.Page.LifecycleEventEvent): void;
2463
2464    loadEventFired(params: Protocol.Page.LoadEventFiredEvent): void;
2465
2466    /**
2467     * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
2468     */
2469    navigatedWithinDocument(params: Protocol.Page.NavigatedWithinDocumentEvent): void;
2470
2471    /**
2472     * Compressed image data requested by the `startScreencast`.
2473     */
2474    screencastFrame(params: Protocol.Page.ScreencastFrameEvent): void;
2475
2476    /**
2477     * Fired when the page with currently enabled screencast was shown or hidden `.
2478     */
2479    screencastVisibilityChanged(params: Protocol.Page.ScreencastVisibilityChangedEvent): void;
2480
2481    /**
2482     * Fired when a new window is going to be opened, via window.open(), link click, form submission,
2483     * etc.
2484     */
2485    windowOpen(params: Protocol.Page.WindowOpenEvent): void;
2486
2487    /**
2488     * Issued for every compilation cache generated. Is only available
2489     * if Page.setGenerateCompilationCache is enabled.
2490     */
2491    compilationCacheProduced(params: Protocol.Page.CompilationCacheProducedEvent): void;
2492  }
2493
2494  export interface PerformanceApi {
2495    /**
2496     * Disable collecting and reporting metrics.
2497     */
2498    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
2499
2500    /**
2501     * Enable collecting and reporting metrics.
2502     */
2503    invoke_enable(params: Protocol.Performance.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
2504
2505    /**
2506     * Sets time domain to use for collecting and reporting duration metrics.
2507     * Note that this must be called before enabling metrics collection. Calling
2508     * this method while metrics collection is enabled returns an error.
2509     */
2510    invoke_setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest):
2511        Promise<Protocol.ProtocolResponseWithError>;
2512
2513    /**
2514     * Retrieve current values of run-time metrics.
2515     */
2516    invoke_getMetrics(): Promise<Protocol.Performance.GetMetricsResponse>;
2517  }
2518  export interface PerformanceDispatcher {
2519    /**
2520     * Current values of the metrics.
2521     */
2522    metrics(params: Protocol.Performance.MetricsEvent): void;
2523  }
2524
2525  export interface SecurityApi {
2526    /**
2527     * Disables tracking security state changes.
2528     */
2529    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
2530
2531    /**
2532     * Enables tracking security state changes.
2533     */
2534    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
2535
2536    /**
2537     * Enable/disable whether all certificate errors should be ignored.
2538     */
2539    invoke_setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest):
2540        Promise<Protocol.ProtocolResponseWithError>;
2541
2542    /**
2543     * Handles a certificate error that fired a certificateError event.
2544     */
2545    invoke_handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest):
2546        Promise<Protocol.ProtocolResponseWithError>;
2547
2548    /**
2549     * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
2550     * be handled by the DevTools client and should be answered with `handleCertificateError` commands.
2551     */
2552    invoke_setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest):
2553        Promise<Protocol.ProtocolResponseWithError>;
2554  }
2555  export interface SecurityDispatcher {
2556    /**
2557     * There is a certificate error. If overriding certificate errors is enabled, then it should be
2558     * handled with the `handleCertificateError` command. Note: this event does not fire if the
2559     * certificate error has been allowed internally. Only one client per target should override
2560     * certificate errors at the same time.
2561     */
2562    certificateError(params: Protocol.Security.CertificateErrorEvent): void;
2563
2564    /**
2565     * The security state of the page changed.
2566     */
2567    visibleSecurityStateChanged(params: Protocol.Security.VisibleSecurityStateChangedEvent): void;
2568
2569    /**
2570     * The security state of the page changed.
2571     */
2572    securityStateChanged(params: Protocol.Security.SecurityStateChangedEvent): void;
2573  }
2574
2575  export interface ServiceWorkerApi {
2576    invoke_deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest):
2577        Promise<Protocol.ProtocolResponseWithError>;
2578
2579    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
2580
2581    invoke_dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest):
2582        Promise<Protocol.ProtocolResponseWithError>;
2583
2584    invoke_dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest):
2585        Promise<Protocol.ProtocolResponseWithError>;
2586
2587    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
2588
2589    invoke_inspectWorker(params: Protocol.ServiceWorker.InspectWorkerRequest):
2590        Promise<Protocol.ProtocolResponseWithError>;
2591
2592    invoke_setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest):
2593        Promise<Protocol.ProtocolResponseWithError>;
2594
2595    invoke_skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise<Protocol.ProtocolResponseWithError>;
2596
2597    invoke_startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise<Protocol.ProtocolResponseWithError>;
2598
2599    invoke_stopAllWorkers(): Promise<Protocol.ProtocolResponseWithError>;
2600
2601    invoke_stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise<Protocol.ProtocolResponseWithError>;
2602
2603    invoke_unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise<Protocol.ProtocolResponseWithError>;
2604
2605    invoke_updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest):
2606        Promise<Protocol.ProtocolResponseWithError>;
2607  }
2608  export interface ServiceWorkerDispatcher {
2609    workerErrorReported(params: Protocol.ServiceWorker.WorkerErrorReportedEvent): void;
2610
2611    workerRegistrationUpdated(params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent): void;
2612
2613    workerVersionUpdated(params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent): void;
2614  }
2615
2616  export interface StorageApi {
2617    /**
2618     * Clears storage for origin.
2619     */
2620    invoke_clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest):
2621        Promise<Protocol.ProtocolResponseWithError>;
2622
2623    /**
2624     * Returns all browser cookies.
2625     */
2626    invoke_getCookies(params: Protocol.Storage.GetCookiesRequest): Promise<Protocol.Storage.GetCookiesResponse>;
2627
2628    /**
2629     * Sets given cookies.
2630     */
2631    invoke_setCookies(params: Protocol.Storage.SetCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
2632
2633    /**
2634     * Clears cookies.
2635     */
2636    invoke_clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise<Protocol.ProtocolResponseWithError>;
2637
2638    /**
2639     * Returns usage and quota in bytes.
2640     */
2641    invoke_getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest):
2642        Promise<Protocol.Storage.GetUsageAndQuotaResponse>;
2643
2644    /**
2645     * Override quota for the specified origin
2646     */
2647    invoke_overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest):
2648        Promise<Protocol.ProtocolResponseWithError>;
2649
2650    /**
2651     * Registers origin to be notified when an update occurs to its cache storage list.
2652     */
2653    invoke_trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest):
2654        Promise<Protocol.ProtocolResponseWithError>;
2655
2656    /**
2657     * Registers origin to be notified when an update occurs to its IndexedDB.
2658     */
2659    invoke_trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest):
2660        Promise<Protocol.ProtocolResponseWithError>;
2661
2662    /**
2663     * Unregisters origin from receiving notifications for cache storage.
2664     */
2665    invoke_untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest):
2666        Promise<Protocol.ProtocolResponseWithError>;
2667
2668    /**
2669     * Unregisters origin from receiving notifications for IndexedDB.
2670     */
2671    invoke_untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest):
2672        Promise<Protocol.ProtocolResponseWithError>;
2673  }
2674  export interface StorageDispatcher {
2675    /**
2676     * A cache's contents have been modified.
2677     */
2678    cacheStorageContentUpdated(params: Protocol.Storage.CacheStorageContentUpdatedEvent): void;
2679
2680    /**
2681     * A cache has been added/deleted.
2682     */
2683    cacheStorageListUpdated(params: Protocol.Storage.CacheStorageListUpdatedEvent): void;
2684
2685    /**
2686     * The origin's IndexedDB object store has been modified.
2687     */
2688    indexedDBContentUpdated(params: Protocol.Storage.IndexedDBContentUpdatedEvent): void;
2689
2690    /**
2691     * The origin's IndexedDB database list has been modified.
2692     */
2693    indexedDBListUpdated(params: Protocol.Storage.IndexedDBListUpdatedEvent): void;
2694  }
2695
2696  export interface SystemInfoApi {
2697    /**
2698     * Returns information about the system.
2699     */
2700    invoke_getInfo(): Promise<Protocol.SystemInfo.GetInfoResponse>;
2701
2702    /**
2703     * Returns information about all running processes.
2704     */
2705    invoke_getProcessInfo(): Promise<Protocol.SystemInfo.GetProcessInfoResponse>;
2706  }
2707  export interface SystemInfoDispatcher {}
2708
2709  export interface TargetApi {
2710    /**
2711     * Activates (focuses) the target.
2712     */
2713    invoke_activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise<Protocol.ProtocolResponseWithError>;
2714
2715    /**
2716     * Attaches to the target with given id.
2717     */
2718    invoke_attachToTarget(params: Protocol.Target.AttachToTargetRequest):
2719        Promise<Protocol.Target.AttachToTargetResponse>;
2720
2721    /**
2722     * Attaches to the browser target, only uses flat sessionId mode.
2723     */
2724    invoke_attachToBrowserTarget(): Promise<Protocol.Target.AttachToBrowserTargetResponse>;
2725
2726    /**
2727     * Closes the target. If the target is a page that gets closed too.
2728     */
2729    invoke_closeTarget(params: Protocol.Target.CloseTargetRequest): Promise<Protocol.Target.CloseTargetResponse>;
2730
2731    /**
2732     * Inject object to the target's main frame that provides a communication
2733     * channel with browser target.
2734     *
2735     * Injected object will be available as `window[bindingName]`.
2736     *
2737     * The object has the follwing API:
2738     * - `binding.send(json)` - a method to send messages over the remote debugging protocol
2739     * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
2740     */
2741    invoke_exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest):
2742        Promise<Protocol.ProtocolResponseWithError>;
2743
2744    /**
2745     * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
2746     * one.
2747     */
2748    invoke_createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest):
2749        Promise<Protocol.Target.CreateBrowserContextResponse>;
2750
2751    /**
2752     * Returns all browser contexts created with `Target.createBrowserContext` method.
2753     */
2754    invoke_getBrowserContexts(): Promise<Protocol.Target.GetBrowserContextsResponse>;
2755
2756    /**
2757     * Creates a new page.
2758     */
2759    invoke_createTarget(params: Protocol.Target.CreateTargetRequest): Promise<Protocol.Target.CreateTargetResponse>;
2760
2761    /**
2762     * Detaches session with given id.
2763     */
2764    invoke_detachFromTarget(params: Protocol.Target.DetachFromTargetRequest):
2765        Promise<Protocol.ProtocolResponseWithError>;
2766
2767    /**
2768     * Deletes a BrowserContext. All the belonging pages will be closed without calling their
2769     * beforeunload hooks.
2770     */
2771    invoke_disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest):
2772        Promise<Protocol.ProtocolResponseWithError>;
2773
2774    /**
2775     * Returns information about a target.
2776     */
2777    invoke_getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise<Protocol.Target.GetTargetInfoResponse>;
2778
2779    /**
2780     * Retrieves a list of available targets.
2781     */
2782    invoke_getTargets(): Promise<Protocol.Target.GetTargetsResponse>;
2783
2784    /**
2785     * Sends protocol message over session with given id.
2786     * Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
2787     * and crbug.com/991325.
2788     */
2789    invoke_sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest):
2790        Promise<Protocol.ProtocolResponseWithError>;
2791
2792    /**
2793     * Controls whether to automatically attach to new targets which are considered to be related to
2794     * this one. When turned on, attaches to all existing related targets as well. When turned off,
2795     * automatically detaches from all currently attached targets.
2796     */
2797    invoke_setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise<Protocol.ProtocolResponseWithError>;
2798
2799    /**
2800     * Controls whether to discover available targets and notify via
2801     * `targetCreated/targetInfoChanged/targetDestroyed` events.
2802     */
2803    invoke_setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest):
2804        Promise<Protocol.ProtocolResponseWithError>;
2805
2806    /**
2807     * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
2808     * `true`.
2809     */
2810    invoke_setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest):
2811        Promise<Protocol.ProtocolResponseWithError>;
2812  }
2813  export interface TargetDispatcher {
2814    /**
2815     * Issued when attached to target because of auto-attach or `attachToTarget` command.
2816     */
2817    attachedToTarget(params: Protocol.Target.AttachedToTargetEvent): void;
2818
2819    /**
2820     * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
2821     * issued multiple times per target if multiple sessions have been attached to it.
2822     */
2823    detachedFromTarget(params: Protocol.Target.DetachedFromTargetEvent): void;
2824
2825    /**
2826     * Notifies about a new protocol message received from the session (as reported in
2827     * `attachedToTarget` event).
2828     */
2829    receivedMessageFromTarget(params: Protocol.Target.ReceivedMessageFromTargetEvent): void;
2830
2831    /**
2832     * Issued when a possible inspection target is created.
2833     */
2834    targetCreated(params: Protocol.Target.TargetCreatedEvent): void;
2835
2836    /**
2837     * Issued when a target is destroyed.
2838     */
2839    targetDestroyed(params: Protocol.Target.TargetDestroyedEvent): void;
2840
2841    /**
2842     * Issued when a target has crashed.
2843     */
2844    targetCrashed(params: Protocol.Target.TargetCrashedEvent): void;
2845
2846    /**
2847     * Issued when some information about a target has changed. This only happens between
2848     * `targetCreated` and `targetDestroyed`.
2849     */
2850    targetInfoChanged(params: Protocol.Target.TargetInfoChangedEvent): void;
2851  }
2852
2853  export interface TetheringApi {
2854    /**
2855     * Request browser port binding.
2856     */
2857    invoke_bind(params: Protocol.Tethering.BindRequest): Promise<Protocol.ProtocolResponseWithError>;
2858
2859    /**
2860     * Request browser port unbinding.
2861     */
2862    invoke_unbind(params: Protocol.Tethering.UnbindRequest): Promise<Protocol.ProtocolResponseWithError>;
2863  }
2864  export interface TetheringDispatcher {
2865    /**
2866     * Informs that port was successfully bound and got a specified connection id.
2867     */
2868    accepted(params: Protocol.Tethering.AcceptedEvent): void;
2869  }
2870
2871  export interface TracingApi {
2872    /**
2873     * Stop trace events collection.
2874     */
2875    invoke_end(): Promise<Protocol.ProtocolResponseWithError>;
2876
2877    /**
2878     * Gets supported tracing categories.
2879     */
2880    invoke_getCategories(): Promise<Protocol.Tracing.GetCategoriesResponse>;
2881
2882    /**
2883     * Record a clock sync marker in the trace.
2884     */
2885    invoke_recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest):
2886        Promise<Protocol.ProtocolResponseWithError>;
2887
2888    /**
2889     * Request a global memory dump.
2890     */
2891    invoke_requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest):
2892        Promise<Protocol.Tracing.RequestMemoryDumpResponse>;
2893
2894    /**
2895     * Start trace events collection.
2896     */
2897    invoke_start(params: Protocol.Tracing.StartRequest): Promise<Protocol.ProtocolResponseWithError>;
2898  }
2899  export interface TracingDispatcher {
2900    bufferUsage(params: Protocol.Tracing.BufferUsageEvent): void;
2901
2902    /**
2903     * Contains an bucket of collected trace events. When tracing is stopped collected events will be
2904     * send as a sequence of dataCollected events followed by tracingComplete event.
2905     */
2906    dataCollected(params: Protocol.Tracing.DataCollectedEvent): void;
2907
2908    /**
2909     * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2910     * delivered via dataCollected events.
2911     */
2912    tracingComplete(params: Protocol.Tracing.TracingCompleteEvent): void;
2913  }
2914
2915  export interface FetchApi {
2916    /**
2917     * Disables the fetch domain.
2918     */
2919    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
2920
2921    /**
2922     * Enables issuing of requestPaused events. A request will be paused until client
2923     * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
2924     */
2925    invoke_enable(params: Protocol.Fetch.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
2926
2927    /**
2928     * Causes the request to fail with specified reason.
2929     */
2930    invoke_failRequest(params: Protocol.Fetch.FailRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
2931
2932    /**
2933     * Provides response to the request.
2934     */
2935    invoke_fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
2936
2937    /**
2938     * Continues the request, optionally modifying some of its parameters.
2939     */
2940    invoke_continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise<Protocol.ProtocolResponseWithError>;
2941
2942    /**
2943     * Continues a request supplying authChallengeResponse following authRequired event.
2944     */
2945    invoke_continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest):
2946        Promise<Protocol.ProtocolResponseWithError>;
2947
2948    /**
2949     * Causes the body of the response to be received from the server and
2950     * returned as a single string. May only be issued for a request that
2951     * is paused in the Response stage and is mutually exclusive with
2952     * takeResponseBodyForInterceptionAsStream. Calling other methods that
2953     * affect the request or disabling fetch domain before body is received
2954     * results in an undefined behavior.
2955     */
2956    invoke_getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest):
2957        Promise<Protocol.Fetch.GetResponseBodyResponse>;
2958
2959    /**
2960     * Returns a handle to the stream representing the response body.
2961     * The request must be paused in the HeadersReceived stage.
2962     * Note that after this command the request can't be continued
2963     * as is -- client either needs to cancel it or to provide the
2964     * response body.
2965     * The stream only supports sequential read, IO.read will fail if the position
2966     * is specified.
2967     * This method is mutually exclusive with getResponseBody.
2968     * Calling other methods that affect the request or disabling fetch
2969     * domain before body is received results in an undefined behavior.
2970     */
2971    invoke_takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest):
2972        Promise<Protocol.Fetch.TakeResponseBodyAsStreamResponse>;
2973  }
2974  export interface FetchDispatcher {
2975    /**
2976     * Issued when the domain is enabled and the request URL matches the
2977     * specified filter. The request is paused until the client responds
2978     * with one of continueRequest, failRequest or fulfillRequest.
2979     * The stage of the request can be determined by presence of responseErrorReason
2980     * and responseStatusCode -- the request is at the response stage if either
2981     * of these fields is present and in the request stage otherwise.
2982     */
2983    requestPaused(params: Protocol.Fetch.RequestPausedEvent): void;
2984
2985    /**
2986     * Issued when the domain is enabled with handleAuthRequests set to true.
2987     * The request is paused until client responds with continueWithAuth.
2988     */
2989    authRequired(params: Protocol.Fetch.AuthRequiredEvent): void;
2990  }
2991
2992  export interface WebAudioApi {
2993    /**
2994     * Enables the WebAudio domain and starts sending context lifetime events.
2995     */
2996    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
2997
2998    /**
2999     * Disables the WebAudio domain.
3000     */
3001    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3002
3003    /**
3004     * Fetch the realtime data from the registered contexts.
3005     */
3006    invoke_getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest):
3007        Promise<Protocol.WebAudio.GetRealtimeDataResponse>;
3008  }
3009  export interface WebAudioDispatcher {
3010    /**
3011     * Notifies that a new BaseAudioContext has been created.
3012     */
3013    contextCreated(params: Protocol.WebAudio.ContextCreatedEvent): void;
3014
3015    /**
3016     * Notifies that an existing BaseAudioContext will be destroyed.
3017     */
3018    contextWillBeDestroyed(params: Protocol.WebAudio.ContextWillBeDestroyedEvent): void;
3019
3020    /**
3021     * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
3022     */
3023    contextChanged(params: Protocol.WebAudio.ContextChangedEvent): void;
3024
3025    /**
3026     * Notifies that the construction of an AudioListener has finished.
3027     */
3028    audioListenerCreated(params: Protocol.WebAudio.AudioListenerCreatedEvent): void;
3029
3030    /**
3031     * Notifies that a new AudioListener has been created.
3032     */
3033    audioListenerWillBeDestroyed(params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent): void;
3034
3035    /**
3036     * Notifies that a new AudioNode has been created.
3037     */
3038    audioNodeCreated(params: Protocol.WebAudio.AudioNodeCreatedEvent): void;
3039
3040    /**
3041     * Notifies that an existing AudioNode has been destroyed.
3042     */
3043    audioNodeWillBeDestroyed(params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent): void;
3044
3045    /**
3046     * Notifies that a new AudioParam has been created.
3047     */
3048    audioParamCreated(params: Protocol.WebAudio.AudioParamCreatedEvent): void;
3049
3050    /**
3051     * Notifies that an existing AudioParam has been destroyed.
3052     */
3053    audioParamWillBeDestroyed(params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent): void;
3054
3055    /**
3056     * Notifies that two AudioNodes are connected.
3057     */
3058    nodesConnected(params: Protocol.WebAudio.NodesConnectedEvent): void;
3059
3060    /**
3061     * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
3062     */
3063    nodesDisconnected(params: Protocol.WebAudio.NodesDisconnectedEvent): void;
3064
3065    /**
3066     * Notifies that an AudioNode is connected to an AudioParam.
3067     */
3068    nodeParamConnected(params: Protocol.WebAudio.NodeParamConnectedEvent): void;
3069
3070    /**
3071     * Notifies that an AudioNode is disconnected to an AudioParam.
3072     */
3073    nodeParamDisconnected(params: Protocol.WebAudio.NodeParamDisconnectedEvent): void;
3074  }
3075
3076  export interface WebAuthnApi {
3077    /**
3078     * Enable the WebAuthn domain and start intercepting credential storage and
3079     * retrieval with a virtual authenticator.
3080     */
3081    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3082
3083    /**
3084     * Disable the WebAuthn domain.
3085     */
3086    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3087
3088    /**
3089     * Creates and adds a virtual authenticator.
3090     */
3091    invoke_addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest):
3092        Promise<Protocol.WebAuthn.AddVirtualAuthenticatorResponse>;
3093
3094    /**
3095     * Removes the given authenticator.
3096     */
3097    invoke_removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest):
3098        Promise<Protocol.ProtocolResponseWithError>;
3099
3100    /**
3101     * Adds the credential to the specified authenticator.
3102     */
3103    invoke_addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise<Protocol.ProtocolResponseWithError>;
3104
3105    /**
3106     * Returns a single credential stored in the given virtual authenticator that
3107     * matches the credential ID.
3108     */
3109    invoke_getCredential(params: Protocol.WebAuthn.GetCredentialRequest):
3110        Promise<Protocol.WebAuthn.GetCredentialResponse>;
3111
3112    /**
3113     * Returns all the credentials stored in the given virtual authenticator.
3114     */
3115    invoke_getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest):
3116        Promise<Protocol.WebAuthn.GetCredentialsResponse>;
3117
3118    /**
3119     * Removes a credential from the authenticator.
3120     */
3121    invoke_removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest):
3122        Promise<Protocol.ProtocolResponseWithError>;
3123
3124    /**
3125     * Clears all the credentials from the specified device.
3126     */
3127    invoke_clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest):
3128        Promise<Protocol.ProtocolResponseWithError>;
3129
3130    /**
3131     * Sets whether User Verification succeeds or fails for an authenticator.
3132     * The default is true.
3133     */
3134    invoke_setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest):
3135        Promise<Protocol.ProtocolResponseWithError>;
3136
3137    /**
3138     * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
3139     * The default is true.
3140     */
3141    invoke_setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest):
3142        Promise<Protocol.ProtocolResponseWithError>;
3143  }
3144  export interface WebAuthnDispatcher {}
3145
3146  export interface MediaApi {
3147    /**
3148     * Enables the Media domain
3149     */
3150    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3151
3152    /**
3153     * Disables the Media domain.
3154     */
3155    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3156  }
3157  export interface MediaDispatcher {
3158    /**
3159     * This can be called multiple times, and can be used to set / override /
3160     * remove player properties. A null propValue indicates removal.
3161     */
3162    playerPropertiesChanged(params: Protocol.Media.PlayerPropertiesChangedEvent): void;
3163
3164    /**
3165     * Send events as a list, allowing them to be batched on the browser for less
3166     * congestion. If batched, events must ALWAYS be in chronological order.
3167     */
3168    playerEventsAdded(params: Protocol.Media.PlayerEventsAddedEvent): void;
3169
3170    /**
3171     * Send a list of any messages that need to be delivered.
3172     */
3173    playerMessagesLogged(params: Protocol.Media.PlayerMessagesLoggedEvent): void;
3174
3175    /**
3176     * Send a list of any errors that need to be delivered.
3177     */
3178    playerErrorsRaised(params: Protocol.Media.PlayerErrorsRaisedEvent): void;
3179
3180    /**
3181     * Called whenever a player is created, or when a new agent joins and recieves
3182     * a list of active players. If an agent is restored, it will recieve the full
3183     * list of player ids and all events again.
3184     */
3185    playersCreated(params: Protocol.Media.PlayersCreatedEvent): void;
3186  }
3187
3188  export interface ConsoleApi {
3189    /**
3190     * Does nothing.
3191     */
3192    invoke_clearMessages(): Promise<Protocol.ProtocolResponseWithError>;
3193
3194    /**
3195     * Disables console domain, prevents further console messages from being reported to the client.
3196     */
3197    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3198
3199    /**
3200     * Enables console domain, sends the messages collected so far to the client by means of the
3201     * `messageAdded` notification.
3202     */
3203    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3204  }
3205  export interface ConsoleDispatcher {
3206    /**
3207     * Issued when new console message is added.
3208     */
3209    messageAdded(params: Protocol.Console.MessageAddedEvent): void;
3210  }
3211
3212  export interface DebuggerApi {
3213    /**
3214     * Continues execution until specific location is reached.
3215     */
3216    invoke_continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest):
3217        Promise<Protocol.ProtocolResponseWithError>;
3218
3219    /**
3220     * Disables debugger for given page.
3221     */
3222    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3223
3224    /**
3225     * Enables debugger for the given page. Clients should not assume that the debugging has been
3226     * enabled until the result for this command is received.
3227     */
3228    invoke_enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
3229
3230    /**
3231     * Evaluates expression on a given call frame.
3232     */
3233    invoke_evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest):
3234        Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
3235
3236    /**
3237     * Execute a Wasm Evaluator module on a given call frame.
3238     */
3239    invoke_executeWasmEvaluator(params: Protocol.Debugger.ExecuteWasmEvaluatorRequest):
3240        Promise<Protocol.Debugger.ExecuteWasmEvaluatorResponse>;
3241
3242    /**
3243     * Returns possible locations for breakpoint. scriptId in start and end range locations should be
3244     * the same.
3245     */
3246    invoke_getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest):
3247        Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
3248
3249    /**
3250     * Returns source for the script with given id.
3251     */
3252    invoke_getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest):
3253        Promise<Protocol.Debugger.GetScriptSourceResponse>;
3254
3255    /**
3256     * This command is deprecated. Use getScriptSource instead.
3257     */
3258    invoke_getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest):
3259        Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
3260
3261    /**
3262     * Returns stack trace with given `stackTraceId`.
3263     */
3264    invoke_getStackTrace(params: Protocol.Debugger.GetStackTraceRequest):
3265        Promise<Protocol.Debugger.GetStackTraceResponse>;
3266
3267    /**
3268     * Stops on the next JavaScript statement.
3269     */
3270    invoke_pause(): Promise<Protocol.ProtocolResponseWithError>;
3271
3272    invoke_pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest):
3273        Promise<Protocol.ProtocolResponseWithError>;
3274
3275    /**
3276     * Removes JavaScript breakpoint.
3277     */
3278    invoke_removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest):
3279        Promise<Protocol.ProtocolResponseWithError>;
3280
3281    /**
3282     * Restarts particular call frame from the beginning.
3283     */
3284    invoke_restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
3285
3286    /**
3287     * Resumes JavaScript execution.
3288     */
3289    invoke_resume(params: Protocol.Debugger.ResumeRequest): Promise<Protocol.ProtocolResponseWithError>;
3290
3291    /**
3292     * Searches for given string in script content.
3293     */
3294    invoke_searchInContent(params: Protocol.Debugger.SearchInContentRequest):
3295        Promise<Protocol.Debugger.SearchInContentResponse>;
3296
3297    /**
3298     * Enables or disables async call stacks tracking.
3299     */
3300    invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest):
3301        Promise<Protocol.ProtocolResponseWithError>;
3302
3303    /**
3304     * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
3305     * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
3306     * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
3307     */
3308    invoke_setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest):
3309        Promise<Protocol.ProtocolResponseWithError>;
3310
3311    /**
3312     * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
3313     * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
3314     * Positions array contains positions where blackbox state is changed. First interval isn't
3315     * blackboxed. Array should be sorted.
3316     */
3317    invoke_setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest):
3318        Promise<Protocol.ProtocolResponseWithError>;
3319
3320    /**
3321     * Sets JavaScript breakpoint at a given location.
3322     */
3323    invoke_setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest):
3324        Promise<Protocol.Debugger.SetBreakpointResponse>;
3325
3326    /**
3327     * Sets instrumentation breakpoint.
3328     */
3329    invoke_setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest):
3330        Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
3331
3332    /**
3333     * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
3334     * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
3335     * `locations` property. Further matching script parsing will result in subsequent
3336     * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
3337     */
3338    invoke_setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest):
3339        Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
3340
3341    /**
3342     * Sets JavaScript breakpoint before each call to the given function.
3343     * If another function was created from the same source as a given one,
3344     * calling it will also trigger the breakpoint.
3345     */
3346    invoke_setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest):
3347        Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
3348
3349    /**
3350     * Activates / deactivates all breakpoints on the page.
3351     */
3352    invoke_setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest):
3353        Promise<Protocol.ProtocolResponseWithError>;
3354
3355    /**
3356     * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
3357     * no exceptions. Initial pause on exceptions state is `none`.
3358     */
3359    invoke_setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest):
3360        Promise<Protocol.ProtocolResponseWithError>;
3361
3362    /**
3363     * Changes return value in top frame. Available only at return break position.
3364     */
3365    invoke_setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<Protocol.ProtocolResponseWithError>;
3366
3367    /**
3368     * Edits JavaScript source live.
3369     */
3370    invoke_setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest):
3371        Promise<Protocol.Debugger.SetScriptSourceResponse>;
3372
3373    /**
3374     * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
3375     */
3376    invoke_setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest):
3377        Promise<Protocol.ProtocolResponseWithError>;
3378
3379    /**
3380     * Changes value of variable in a callframe. Object-based scopes are not supported and must be
3381     * mutated manually.
3382     */
3383    invoke_setVariableValue(params: Protocol.Debugger.SetVariableValueRequest):
3384        Promise<Protocol.ProtocolResponseWithError>;
3385
3386    /**
3387     * Steps into the function call.
3388     */
3389    invoke_stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<Protocol.ProtocolResponseWithError>;
3390
3391    /**
3392     * Steps out of the function call.
3393     */
3394    invoke_stepOut(): Promise<Protocol.ProtocolResponseWithError>;
3395
3396    /**
3397     * Steps over the statement.
3398     */
3399    invoke_stepOver(params: Protocol.Debugger.StepOverRequest): Promise<Protocol.ProtocolResponseWithError>;
3400  }
3401  export interface DebuggerDispatcher {
3402    /**
3403     * Fired when breakpoint is resolved to an actual script and location.
3404     */
3405    breakpointResolved(params: Protocol.Debugger.BreakpointResolvedEvent): void;
3406
3407    /**
3408     * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
3409     */
3410    paused(params: Protocol.Debugger.PausedEvent): void;
3411
3412    /**
3413     * Fired when the virtual machine resumed execution.
3414     */
3415    resumed(): void;
3416
3417    /**
3418     * Fired when virtual machine fails to parse the script.
3419     */
3420    scriptFailedToParse(params: Protocol.Debugger.ScriptFailedToParseEvent): void;
3421
3422    /**
3423     * Fired when virtual machine parses script. This event is also fired for all known and uncollected
3424     * scripts upon enabling debugger.
3425     */
3426    scriptParsed(params: Protocol.Debugger.ScriptParsedEvent): void;
3427  }
3428
3429  export interface HeapProfilerApi {
3430    /**
3431     * Enables console to refer to the node with given id via $x (see Command Line API for more details
3432     * $x functions).
3433     */
3434    invoke_addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest):
3435        Promise<Protocol.ProtocolResponseWithError>;
3436
3437    invoke_collectGarbage(): Promise<Protocol.ProtocolResponseWithError>;
3438
3439    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3440
3441    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3442
3443    invoke_getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest):
3444        Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
3445
3446    invoke_getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest):
3447        Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
3448
3449    invoke_getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
3450
3451    invoke_startSampling(params: Protocol.HeapProfiler.StartSamplingRequest):
3452        Promise<Protocol.ProtocolResponseWithError>;
3453
3454    invoke_startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest):
3455        Promise<Protocol.ProtocolResponseWithError>;
3456
3457    invoke_stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
3458
3459    invoke_stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest):
3460        Promise<Protocol.ProtocolResponseWithError>;
3461
3462    invoke_takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest):
3463        Promise<Protocol.ProtocolResponseWithError>;
3464  }
3465  export interface HeapProfilerDispatcher {
3466    addHeapSnapshotChunk(params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent): void;
3467
3468    /**
3469     * If heap objects tracking has been started then backend may send update for one or more fragments
3470     */
3471    heapStatsUpdate(params: Protocol.HeapProfiler.HeapStatsUpdateEvent): void;
3472
3473    /**
3474     * If heap objects tracking has been started then backend regularly sends a current value for last
3475     * seen object id and corresponding timestamp. If the were changes in the heap since last event
3476     * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
3477     */
3478    lastSeenObjectId(params: Protocol.HeapProfiler.LastSeenObjectIdEvent): void;
3479
3480    reportHeapSnapshotProgress(params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent): void;
3481
3482    resetProfiles(): void;
3483  }
3484
3485  export interface ProfilerApi {
3486    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3487
3488    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3489
3490    /**
3491     * Collect coverage data for the current isolate. The coverage data may be incomplete due to
3492     * garbage collection.
3493     */
3494    invoke_getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
3495
3496    /**
3497     * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
3498     */
3499    invoke_setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest):
3500        Promise<Protocol.ProtocolResponseWithError>;
3501
3502    invoke_start(): Promise<Protocol.ProtocolResponseWithError>;
3503
3504    /**
3505     * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
3506     * coverage may be incomplete. Enabling prevents running optimized code and resets execution
3507     * counters.
3508     */
3509    invoke_startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest):
3510        Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
3511
3512    /**
3513     * Enable type profile.
3514     */
3515    invoke_startTypeProfile(): Promise<Protocol.ProtocolResponseWithError>;
3516
3517    invoke_stop(): Promise<Protocol.Profiler.StopResponse>;
3518
3519    /**
3520     * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
3521     * executing optimized code.
3522     */
3523    invoke_stopPreciseCoverage(): Promise<Protocol.ProtocolResponseWithError>;
3524
3525    /**
3526     * Disable type profile. Disabling releases type profile data collected so far.
3527     */
3528    invoke_stopTypeProfile(): Promise<Protocol.ProtocolResponseWithError>;
3529
3530    /**
3531     * Collect coverage data for the current isolate, and resets execution counters. Precise code
3532     * coverage needs to have started.
3533     */
3534    invoke_takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
3535
3536    /**
3537     * Collect type profile.
3538     */
3539    invoke_takeTypeProfile(): Promise<Protocol.Profiler.TakeTypeProfileResponse>;
3540
3541    /**
3542     * Enable counters collection.
3543     */
3544    invoke_enableCounters(): Promise<Protocol.ProtocolResponseWithError>;
3545
3546    /**
3547     * Disable counters collection.
3548     */
3549    invoke_disableCounters(): Promise<Protocol.ProtocolResponseWithError>;
3550
3551    /**
3552     * Retrieve counters.
3553     */
3554    invoke_getCounters(): Promise<Protocol.Profiler.GetCountersResponse>;
3555
3556    /**
3557     * Enable run time call stats collection.
3558     */
3559    invoke_enableRuntimeCallStats(): Promise<Protocol.ProtocolResponseWithError>;
3560
3561    /**
3562     * Disable run time call stats collection.
3563     */
3564    invoke_disableRuntimeCallStats(): Promise<Protocol.ProtocolResponseWithError>;
3565
3566    /**
3567     * Retrieve run time call stats.
3568     */
3569    invoke_getRuntimeCallStats(): Promise<Protocol.Profiler.GetRuntimeCallStatsResponse>;
3570  }
3571  export interface ProfilerDispatcher {
3572    consoleProfileFinished(params: Protocol.Profiler.ConsoleProfileFinishedEvent): void;
3573
3574    /**
3575     * Sent when new profile recording is started using console.profile() call.
3576     */
3577    consoleProfileStarted(params: Protocol.Profiler.ConsoleProfileStartedEvent): void;
3578
3579    /**
3580     * Reports coverage delta since the last poll (either from an event like this, or from
3581     * `takePreciseCoverage` for the current isolate. May only be sent if precise code
3582     * coverage has been started. This event can be trigged by the embedder to, for example,
3583     * trigger collection of coverage data immediatelly at a certain point in time.
3584     */
3585    preciseCoverageDeltaUpdate(params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent): void;
3586  }
3587
3588  export interface RuntimeApi {
3589    /**
3590     * Add handler to promise with given promise object id.
3591     */
3592    invoke_awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
3593
3594    /**
3595     * Calls function with given declaration on the given object. Object group of the result is
3596     * inherited from the target object.
3597     */
3598    invoke_callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest):
3599        Promise<Protocol.Runtime.CallFunctionOnResponse>;
3600
3601    /**
3602     * Compiles expression.
3603     */
3604    invoke_compileScript(params: Protocol.Runtime.CompileScriptRequest):
3605        Promise<Protocol.Runtime.CompileScriptResponse>;
3606
3607    /**
3608     * Disables reporting of execution contexts creation.
3609     */
3610    invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
3611
3612    /**
3613     * Discards collected exceptions and console API calls.
3614     */
3615    invoke_discardConsoleEntries(): Promise<Protocol.ProtocolResponseWithError>;
3616
3617    /**
3618     * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
3619     * When the reporting gets enabled the event will be sent immediately for each existing execution
3620     * context.
3621     */
3622    invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
3623
3624    /**
3625     * Evaluates expression on global object.
3626     */
3627    invoke_evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
3628
3629    /**
3630     * Returns the isolate id.
3631     */
3632    invoke_getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
3633
3634    /**
3635     * Returns the JavaScript heap usage.
3636     * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
3637     */
3638    invoke_getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
3639
3640    /**
3641     * Returns properties of a given object. Object group of the result is inherited from the target
3642     * object.
3643     */
3644    invoke_getProperties(params: Protocol.Runtime.GetPropertiesRequest):
3645        Promise<Protocol.Runtime.GetPropertiesResponse>;
3646
3647    /**
3648     * Returns all let, const and class variables from global scope.
3649     */
3650    invoke_globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest):
3651        Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
3652
3653    invoke_queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
3654
3655    /**
3656     * Releases remote object with given id.
3657     */
3658    invoke_releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<Protocol.ProtocolResponseWithError>;
3659
3660    /**
3661     * Releases all remote objects that belong to a given group.
3662     */
3663    invoke_releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest):
3664        Promise<Protocol.ProtocolResponseWithError>;
3665
3666    /**
3667     * Tells inspected instance to run if it was waiting for debugger to attach.
3668     */
3669    invoke_runIfWaitingForDebugger(): Promise<Protocol.ProtocolResponseWithError>;
3670
3671    /**
3672     * Runs script with given id in a given context.
3673     */
3674    invoke_runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
3675
3676    /**
3677     * Enables or disables async call stacks tracking.
3678     */
3679    invoke_setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest):
3680        Promise<Protocol.ProtocolResponseWithError>;
3681
3682    invoke_setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest):
3683        Promise<Protocol.ProtocolResponseWithError>;
3684
3685    invoke_setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest):
3686        Promise<Protocol.ProtocolResponseWithError>;
3687
3688    /**
3689     * Terminate current or next JavaScript execution.
3690     * Will cancel the termination when the outer-most script execution ends.
3691     */
3692    invoke_terminateExecution(): Promise<Protocol.ProtocolResponseWithError>;
3693
3694    /**
3695     * If executionContextId is empty, adds binding with the given name on the
3696     * global objects of all inspected contexts, including those created later,
3697     * bindings survive reloads.
3698     * Binding function takes exactly one argument, this argument should be string,
3699     * in case of any other input, function throws an exception.
3700     * Each binding function call produces Runtime.bindingCalled notification.
3701     */
3702    invoke_addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
3703
3704    /**
3705     * This method does not remove binding function from global object but
3706     * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
3707     */
3708    invoke_removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
3709  }
3710  export interface RuntimeDispatcher {
3711    /**
3712     * Notification is issued every time when binding is called.
3713     */
3714    bindingCalled(params: Protocol.Runtime.BindingCalledEvent): void;
3715
3716    /**
3717     * Issued when console API was called.
3718     */
3719    consoleAPICalled(params: Protocol.Runtime.ConsoleAPICalledEvent): void;
3720
3721    /**
3722     * Issued when unhandled exception was revoked.
3723     */
3724    exceptionRevoked(params: Protocol.Runtime.ExceptionRevokedEvent): void;
3725
3726    /**
3727     * Issued when exception was thrown and unhandled.
3728     */
3729    exceptionThrown(params: Protocol.Runtime.ExceptionThrownEvent): void;
3730
3731    /**
3732     * Issued when new execution context is created.
3733     */
3734    executionContextCreated(params: Protocol.Runtime.ExecutionContextCreatedEvent): void;
3735
3736    /**
3737     * Issued when execution context is destroyed.
3738     */
3739    executionContextDestroyed(params: Protocol.Runtime.ExecutionContextDestroyedEvent): void;
3740
3741    /**
3742     * Issued when all executionContexts were cleared in browser
3743     */
3744    executionContextsCleared(): void;
3745
3746    /**
3747     * Issued when object should be inspected (for example, as a result of inspect() command line API
3748     * call).
3749     */
3750    inspectRequested(params: Protocol.Runtime.InspectRequestedEvent): void;
3751  }
3752
3753  export interface SchemaApi {
3754    /**
3755     * Returns supported domains.
3756     */
3757    invoke_getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
3758  }
3759  export interface SchemaDispatcher {}
3760}
3761
3762