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 10declare namespace Protocol { 11 export type integer = number 12 export type binary = string 13 14 export namespace Accessibility { 15 16 /** 17 * Unique accessibility node identifier. 18 */ 19 export type AXNodeId = string; 20 21 /** 22 * Enum of possible property types. 23 */ 24 export enum AXValueType { 25 Boolean = 'boolean', 26 Tristate = 'tristate', 27 BooleanOrUndefined = 'booleanOrUndefined', 28 Idref = 'idref', 29 IdrefList = 'idrefList', 30 Integer = 'integer', 31 Node = 'node', 32 NodeList = 'nodeList', 33 Number = 'number', 34 String = 'string', 35 ComputedString = 'computedString', 36 Token = 'token', 37 TokenList = 'tokenList', 38 DomRelation = 'domRelation', 39 Role = 'role', 40 InternalRole = 'internalRole', 41 ValueUndefined = 'valueUndefined', 42 } 43 44 /** 45 * Enum of possible property sources. 46 */ 47 export enum AXValueSourceType { 48 Attribute = 'attribute', 49 Implicit = 'implicit', 50 Style = 'style', 51 Contents = 'contents', 52 Placeholder = 'placeholder', 53 RelatedElement = 'relatedElement', 54 } 55 56 /** 57 * Enum of possible native property sources (as a subtype of a particular AXValueSourceType). 58 */ 59 export enum AXValueNativeSourceType { 60 Figcaption = 'figcaption', 61 Label = 'label', 62 Labelfor = 'labelfor', 63 Labelwrapped = 'labelwrapped', 64 Legend = 'legend', 65 Tablecaption = 'tablecaption', 66 Title = 'title', 67 Other = 'other', 68 } 69 70 /** 71 * A single source for a computed AX property. 72 */ 73 export interface AXValueSource { 74 /** 75 * What type of source this is. 76 */ 77 type: AXValueSourceType; 78 /** 79 * The value of this property source. 80 */ 81 value?: AXValue; 82 /** 83 * The name of the relevant attribute, if any. 84 */ 85 attribute?: string; 86 /** 87 * The value of the relevant attribute, if any. 88 */ 89 attributeValue?: AXValue; 90 /** 91 * Whether this source is superseded by a higher priority source. 92 */ 93 superseded?: boolean; 94 /** 95 * The native markup source for this value, e.g. a <label> element. 96 */ 97 nativeSource?: AXValueNativeSourceType; 98 /** 99 * The value, such as a node or node list, of the native source. 100 */ 101 nativeSourceValue?: AXValue; 102 /** 103 * Whether the value for this property is invalid. 104 */ 105 invalid?: boolean; 106 /** 107 * Reason for the value being invalid, if it is. 108 */ 109 invalidReason?: string; 110 } 111 112 export interface AXRelatedNode { 113 /** 114 * The BackendNodeId of the related DOM node. 115 */ 116 backendDOMNodeId: DOM.BackendNodeId; 117 /** 118 * The IDRef value provided, if any. 119 */ 120 idref?: string; 121 /** 122 * The text alternative of this node in the current context. 123 */ 124 text?: string; 125 } 126 127 export interface AXProperty { 128 /** 129 * The name of this property. 130 */ 131 name: AXPropertyName; 132 /** 133 * The value of this property. 134 */ 135 value: AXValue; 136 } 137 138 /** 139 * A single computed AX property. 140 */ 141 export interface AXValue { 142 /** 143 * The type of this value. 144 */ 145 type: AXValueType; 146 /** 147 * The computed value of this property. 148 */ 149 value?: any; 150 /** 151 * One or more related nodes, if applicable. 152 */ 153 relatedNodes?: AXRelatedNode[]; 154 /** 155 * The sources which contributed to the computation of this property. 156 */ 157 sources?: AXValueSource[]; 158 } 159 160 /** 161 * Values of AXProperty name: 162 * - from 'busy' to 'roledescription': states which apply to every AX node 163 * - from 'live' to 'root': attributes which apply to nodes in live regions 164 * - from 'autocomplete' to 'valuetext': attributes which apply to widgets 165 * - from 'checked' to 'selected': states which apply to widgets 166 * - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling. 167 */ 168 export enum AXPropertyName { 169 Busy = 'busy', 170 Disabled = 'disabled', 171 Editable = 'editable', 172 Focusable = 'focusable', 173 Focused = 'focused', 174 Hidden = 'hidden', 175 HiddenRoot = 'hiddenRoot', 176 Invalid = 'invalid', 177 Keyshortcuts = 'keyshortcuts', 178 Settable = 'settable', 179 Roledescription = 'roledescription', 180 Live = 'live', 181 Atomic = 'atomic', 182 Relevant = 'relevant', 183 Root = 'root', 184 Autocomplete = 'autocomplete', 185 HasPopup = 'hasPopup', 186 Level = 'level', 187 Multiselectable = 'multiselectable', 188 Orientation = 'orientation', 189 Multiline = 'multiline', 190 Readonly = 'readonly', 191 Required = 'required', 192 Valuemin = 'valuemin', 193 Valuemax = 'valuemax', 194 Valuetext = 'valuetext', 195 Checked = 'checked', 196 Expanded = 'expanded', 197 Modal = 'modal', 198 Pressed = 'pressed', 199 Selected = 'selected', 200 Activedescendant = 'activedescendant', 201 Controls = 'controls', 202 Describedby = 'describedby', 203 Details = 'details', 204 Errormessage = 'errormessage', 205 Flowto = 'flowto', 206 Labelledby = 'labelledby', 207 Owns = 'owns', 208 } 209 210 /** 211 * A node in the accessibility tree. 212 */ 213 export interface AXNode { 214 /** 215 * Unique identifier for this node. 216 */ 217 nodeId: AXNodeId; 218 /** 219 * Whether this node is ignored for accessibility 220 */ 221 ignored: boolean; 222 /** 223 * Collection of reasons why this node is hidden. 224 */ 225 ignoredReasons?: AXProperty[]; 226 /** 227 * This `Node`'s role, whether explicit or implicit. 228 */ 229 role?: AXValue; 230 /** 231 * The accessible name for this `Node`. 232 */ 233 name?: AXValue; 234 /** 235 * The accessible description for this `Node`. 236 */ 237 description?: AXValue; 238 /** 239 * The value for this `Node`. 240 */ 241 value?: AXValue; 242 /** 243 * All other properties 244 */ 245 properties?: AXProperty[]; 246 /** 247 * IDs for each of this node's child nodes. 248 */ 249 childIds?: AXNodeId[]; 250 /** 251 * The backend ID for the associated DOM node, if any. 252 */ 253 backendDOMNodeId?: DOM.BackendNodeId; 254 } 255 256 export interface GetPartialAXTreeRequest { 257 /** 258 * Identifier of the node to get the partial accessibility tree for. 259 */ 260 nodeId?: DOM.NodeId; 261 /** 262 * Identifier of the backend node to get the partial accessibility tree for. 263 */ 264 backendNodeId?: DOM.BackendNodeId; 265 /** 266 * JavaScript object id of the node wrapper to get the partial accessibility tree for. 267 */ 268 objectId?: Runtime.RemoteObjectId; 269 /** 270 * Whether to fetch this nodes ancestors, siblings and children. Defaults to true. 271 */ 272 fetchRelatives?: boolean; 273 } 274 275 export interface GetPartialAXTreeResponse { 276 /** 277 * The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and 278 * children, if requested. 279 */ 280 nodes: AXNode[]; 281 } 282 283 export interface GetFullAXTreeResponse { 284 nodes: AXNode[]; 285 } 286 } 287 288 export namespace Animation { 289 290 export enum AnimationType { 291 CSSTransition = 'CSSTransition', 292 CSSAnimation = 'CSSAnimation', 293 WebAnimation = 'WebAnimation', 294 } 295 296 /** 297 * Animation instance. 298 */ 299 export interface Animation { 300 /** 301 * `Animation`'s id. 302 */ 303 id: string; 304 /** 305 * `Animation`'s name. 306 */ 307 name: string; 308 /** 309 * `Animation`'s internal paused state. 310 */ 311 pausedState: boolean; 312 /** 313 * `Animation`'s play state. 314 */ 315 playState: string; 316 /** 317 * `Animation`'s playback rate. 318 */ 319 playbackRate: number; 320 /** 321 * `Animation`'s start time. 322 */ 323 startTime: number; 324 /** 325 * `Animation`'s current time. 326 */ 327 currentTime: number; 328 /** 329 * Animation type of `Animation`. 330 */ 331 type: AnimationType; 332 /** 333 * `Animation`'s source animation node. 334 */ 335 source?: AnimationEffect; 336 /** 337 * A unique ID for `Animation` representing the sources that triggered this CSS 338 * animation/transition. 339 */ 340 cssId?: string; 341 } 342 343 /** 344 * AnimationEffect instance 345 */ 346 export interface AnimationEffect { 347 /** 348 * `AnimationEffect`'s delay. 349 */ 350 delay: number; 351 /** 352 * `AnimationEffect`'s end delay. 353 */ 354 endDelay: number; 355 /** 356 * `AnimationEffect`'s iteration start. 357 */ 358 iterationStart: number; 359 /** 360 * `AnimationEffect`'s iterations. 361 */ 362 iterations: number; 363 /** 364 * `AnimationEffect`'s iteration duration. 365 */ 366 duration: number; 367 /** 368 * `AnimationEffect`'s playback direction. 369 */ 370 direction: string; 371 /** 372 * `AnimationEffect`'s fill mode. 373 */ 374 fill: string; 375 /** 376 * `AnimationEffect`'s target node. 377 */ 378 backendNodeId?: DOM.BackendNodeId; 379 /** 380 * `AnimationEffect`'s keyframes. 381 */ 382 keyframesRule?: KeyframesRule; 383 /** 384 * `AnimationEffect`'s timing function. 385 */ 386 easing: string; 387 } 388 389 /** 390 * Keyframes Rule 391 */ 392 export interface KeyframesRule { 393 /** 394 * CSS keyframed animation's name. 395 */ 396 name?: string; 397 /** 398 * List of animation keyframes. 399 */ 400 keyframes: KeyframeStyle[]; 401 } 402 403 /** 404 * Keyframe Style 405 */ 406 export interface KeyframeStyle { 407 /** 408 * Keyframe's time offset. 409 */ 410 offset: string; 411 /** 412 * `AnimationEffect`'s timing function. 413 */ 414 easing: string; 415 } 416 417 export interface GetCurrentTimeRequest { 418 /** 419 * Id of animation. 420 */ 421 id: string; 422 } 423 424 export interface GetCurrentTimeResponse { 425 /** 426 * Current time of the page. 427 */ 428 currentTime: number; 429 } 430 431 export interface GetPlaybackRateResponse { 432 /** 433 * Playback rate for animations on page. 434 */ 435 playbackRate: number; 436 } 437 438 export interface ReleaseAnimationsRequest { 439 /** 440 * List of animation ids to seek. 441 */ 442 animations: string[]; 443 } 444 445 export interface ResolveAnimationRequest { 446 /** 447 * Animation id. 448 */ 449 animationId: string; 450 } 451 452 export interface ResolveAnimationResponse { 453 /** 454 * Corresponding remote object. 455 */ 456 remoteObject: Runtime.RemoteObject; 457 } 458 459 export interface SeekAnimationsRequest { 460 /** 461 * List of animation ids to seek. 462 */ 463 animations: string[]; 464 /** 465 * Set the current time of each animation. 466 */ 467 currentTime: number; 468 } 469 470 export interface SetPausedRequest { 471 /** 472 * Animations to set the pause state of. 473 */ 474 animations: string[]; 475 /** 476 * Paused state to set to. 477 */ 478 paused: boolean; 479 } 480 481 export interface SetPlaybackRateRequest { 482 /** 483 * Playback rate for animations on page 484 */ 485 playbackRate: number; 486 } 487 488 export interface SetTimingRequest { 489 /** 490 * Animation id. 491 */ 492 animationId: string; 493 /** 494 * Duration of the animation. 495 */ 496 duration: number; 497 /** 498 * Delay of the animation. 499 */ 500 delay: number; 501 } 502 503 /** 504 * Event for when an animation has been cancelled. 505 */ 506 export interface AnimationCanceledEvent { 507 /** 508 * Id of the animation that was cancelled. 509 */ 510 id: string; 511 } 512 513 /** 514 * Event for each animation that has been created. 515 */ 516 export interface AnimationCreatedEvent { 517 /** 518 * Id of the animation that was created. 519 */ 520 id: string; 521 } 522 523 /** 524 * Event for animation that has been started. 525 */ 526 export interface AnimationStartedEvent { 527 /** 528 * Animation that was started. 529 */ 530 animation: Animation; 531 } 532 } 533 534 export namespace ApplicationCache { 535 536 /** 537 * Detailed application cache resource information. 538 */ 539 export interface ApplicationCacheResource { 540 /** 541 * Resource url. 542 */ 543 url: string; 544 /** 545 * Resource size. 546 */ 547 size: integer; 548 /** 549 * Resource type. 550 */ 551 type: string; 552 } 553 554 /** 555 * Detailed application cache information. 556 */ 557 export interface ApplicationCache { 558 /** 559 * Manifest URL. 560 */ 561 manifestURL: string; 562 /** 563 * Application cache size. 564 */ 565 size: number; 566 /** 567 * Application cache creation time. 568 */ 569 creationTime: number; 570 /** 571 * Application cache update time. 572 */ 573 updateTime: number; 574 /** 575 * Application cache resources. 576 */ 577 resources: ApplicationCacheResource[]; 578 } 579 580 /** 581 * Frame identifier - manifest URL pair. 582 */ 583 export interface FrameWithManifest { 584 /** 585 * Frame identifier. 586 */ 587 frameId: Page.FrameId; 588 /** 589 * Manifest URL. 590 */ 591 manifestURL: string; 592 /** 593 * Application cache status. 594 */ 595 status: integer; 596 } 597 598 export interface GetApplicationCacheForFrameRequest { 599 /** 600 * Identifier of the frame containing document whose application cache is retrieved. 601 */ 602 frameId: Page.FrameId; 603 } 604 605 export interface GetApplicationCacheForFrameResponse { 606 /** 607 * Relevant application cache data for the document in given frame. 608 */ 609 applicationCache: ApplicationCache; 610 } 611 612 export interface GetFramesWithManifestsResponse { 613 /** 614 * Array of frame identifiers with manifest urls for each frame containing a document 615 * associated with some application cache. 616 */ 617 frameIds: FrameWithManifest[]; 618 } 619 620 export interface GetManifestForFrameRequest { 621 /** 622 * Identifier of the frame containing document whose manifest is retrieved. 623 */ 624 frameId: Page.FrameId; 625 } 626 627 export interface GetManifestForFrameResponse { 628 /** 629 * Manifest URL for document in the given frame. 630 */ 631 manifestURL: string; 632 } 633 634 export interface ApplicationCacheStatusUpdatedEvent { 635 /** 636 * Identifier of the frame containing document whose application cache updated status. 637 */ 638 frameId: Page.FrameId; 639 /** 640 * Manifest URL. 641 */ 642 manifestURL: string; 643 /** 644 * Updated application cache status. 645 */ 646 status: integer; 647 } 648 649 export interface NetworkStateUpdatedEvent { 650 isNowOnline: boolean; 651 } 652 } 653 654 /** 655 * Audits domain allows investigation of page violations and possible improvements. 656 */ 657 export namespace Audits { 658 659 export interface Issue { 660 code: string; 661 } 662 663 export enum GetEncodedResponseRequestEncoding { 664 Webp = 'webp', 665 Jpeg = 'jpeg', 666 Png = 'png', 667 } 668 669 export interface GetEncodedResponseRequest { 670 /** 671 * Identifier of the network request to get content for. 672 */ 673 requestId: Network.RequestId; 674 /** 675 * The encoding to use. 676 */ 677 encoding: GetEncodedResponseRequestEncoding; 678 /** 679 * The quality of the encoding (0-1). (defaults to 1) 680 */ 681 quality?: number; 682 /** 683 * Whether to only return the size information (defaults to false). 684 */ 685 sizeOnly?: boolean; 686 } 687 688 export interface GetEncodedResponseResponse { 689 /** 690 * The encoded body as a base64 string. Omitted if sizeOnly is true. 691 */ 692 body?: binary; 693 /** 694 * Size before re-encoding. 695 */ 696 originalSize: integer; 697 /** 698 * Size after re-encoding. 699 */ 700 encodedSize: integer; 701 } 702 703 export interface IssueAddedEvent { 704 issue: Issue; 705 } 706 } 707 708 /** 709 * Defines events for background web platform features. 710 */ 711 export namespace BackgroundService { 712 713 /** 714 * The Background Service that will be associated with the commands/events. 715 * Every Background Service operates independently, but they share the same 716 * API. 717 */ 718 export enum ServiceName { 719 BackgroundFetch = 'backgroundFetch', 720 BackgroundSync = 'backgroundSync', 721 PushMessaging = 'pushMessaging', 722 Notifications = 'notifications', 723 PaymentHandler = 'paymentHandler', 724 PeriodicBackgroundSync = 'periodicBackgroundSync', 725 } 726 727 /** 728 * A key-value pair for additional event information to pass along. 729 */ 730 export interface EventMetadata { 731 key: string; 732 value: string; 733 } 734 735 export interface BackgroundServiceEvent { 736 /** 737 * Timestamp of the event (in seconds). 738 */ 739 timestamp: Network.TimeSinceEpoch; 740 /** 741 * The origin this event belongs to. 742 */ 743 origin: string; 744 /** 745 * The Service Worker ID that initiated the event. 746 */ 747 serviceWorkerRegistrationId: ServiceWorker.RegistrationID; 748 /** 749 * The Background Service this event belongs to. 750 */ 751 service: ServiceName; 752 /** 753 * A description of the event. 754 */ 755 eventName: string; 756 /** 757 * An identifier that groups related events together. 758 */ 759 instanceId: string; 760 /** 761 * A list of event-specific information. 762 */ 763 eventMetadata: EventMetadata[]; 764 } 765 766 export interface StartObservingRequest { 767 service: ServiceName; 768 } 769 770 export interface StopObservingRequest { 771 service: ServiceName; 772 } 773 774 export interface SetRecordingRequest { 775 shouldRecord: boolean; 776 service: ServiceName; 777 } 778 779 export interface ClearEventsRequest { 780 service: ServiceName; 781 } 782 783 /** 784 * Called when the recording state for the service has been updated. 785 */ 786 export interface RecordingStateChangedEvent { 787 isRecording: boolean; 788 service: ServiceName; 789 } 790 791 /** 792 * Called with all existing backgroundServiceEvents when enabled, and all new 793 * events afterwards if enabled and recording. 794 */ 795 export interface BackgroundServiceEventReceivedEvent { 796 backgroundServiceEvent: BackgroundServiceEvent; 797 } 798 } 799 800 /** 801 * The Browser domain defines methods and events for browser managing. 802 */ 803 export namespace Browser { 804 805 export type BrowserContextID = string; 806 807 export type WindowID = integer; 808 809 /** 810 * The state of the browser window. 811 */ 812 export enum WindowState { 813 Normal = 'normal', 814 Minimized = 'minimized', 815 Maximized = 'maximized', 816 Fullscreen = 'fullscreen', 817 } 818 819 /** 820 * Browser window bounds information 821 */ 822 export interface Bounds { 823 /** 824 * The offset from the left edge of the screen to the window in pixels. 825 */ 826 left?: integer; 827 /** 828 * The offset from the top edge of the screen to the window in pixels. 829 */ 830 top?: integer; 831 /** 832 * The window width in pixels. 833 */ 834 width?: integer; 835 /** 836 * The window height in pixels. 837 */ 838 height?: integer; 839 /** 840 * The window state. Default to normal. 841 */ 842 windowState?: WindowState; 843 } 844 845 export enum PermissionType { 846 AccessibilityEvents = 'accessibilityEvents', 847 AudioCapture = 'audioCapture', 848 BackgroundSync = 'backgroundSync', 849 BackgroundFetch = 'backgroundFetch', 850 ClipboardReadWrite = 'clipboardReadWrite', 851 ClipboardSanitizedWrite = 'clipboardSanitizedWrite', 852 DurableStorage = 'durableStorage', 853 Flash = 'flash', 854 Geolocation = 'geolocation', 855 Midi = 'midi', 856 MidiSysex = 'midiSysex', 857 Nfc = 'nfc', 858 Notifications = 'notifications', 859 PaymentHandler = 'paymentHandler', 860 PeriodicBackgroundSync = 'periodicBackgroundSync', 861 ProtectedMediaIdentifier = 'protectedMediaIdentifier', 862 Sensors = 'sensors', 863 VideoCapture = 'videoCapture', 864 IdleDetection = 'idleDetection', 865 WakeLockScreen = 'wakeLockScreen', 866 WakeLockSystem = 'wakeLockSystem', 867 } 868 869 export enum PermissionSetting { 870 Granted = 'granted', 871 Denied = 'denied', 872 Prompt = 'prompt', 873 } 874 875 /** 876 * Definition of PermissionDescriptor defined in the Permissions API: 877 * https://w3c.github.io/permissions/#dictdef-permissiondescriptor. 878 */ 879 export interface PermissionDescriptor { 880 /** 881 * Name of permission. 882 * See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names. 883 */ 884 name: string; 885 /** 886 * For "midi" permission, may also specify sysex control. 887 */ 888 sysex?: boolean; 889 /** 890 * For "push" permission, may specify userVisibleOnly. 891 * Note that userVisibleOnly = true is the only currently supported type. 892 */ 893 userVisibleOnly?: boolean; 894 /** 895 * For "wake-lock" permission, must specify type as either "screen" or "system". 896 */ 897 type?: string; 898 /** 899 * For "clipboard" permission, may specify allowWithoutSanitization. 900 */ 901 allowWithoutSanitization?: boolean; 902 } 903 904 /** 905 * Chrome histogram bucket. 906 */ 907 export interface Bucket { 908 /** 909 * Minimum value (inclusive). 910 */ 911 low: integer; 912 /** 913 * Maximum value (exclusive). 914 */ 915 high: integer; 916 /** 917 * Number of samples. 918 */ 919 count: integer; 920 } 921 922 /** 923 * Chrome histogram. 924 */ 925 export interface Histogram { 926 /** 927 * Name. 928 */ 929 name: string; 930 /** 931 * Sum of sample values. 932 */ 933 sum: integer; 934 /** 935 * Total number of samples. 936 */ 937 count: integer; 938 /** 939 * Buckets. 940 */ 941 buckets: Bucket[]; 942 } 943 944 export interface SetPermissionRequest { 945 /** 946 * Origin the permission applies to. 947 */ 948 origin: string; 949 /** 950 * Descriptor of permission to override. 951 */ 952 permission: PermissionDescriptor; 953 /** 954 * Setting of the permission. 955 */ 956 setting: PermissionSetting; 957 /** 958 * Context to override. When omitted, default browser context is used. 959 */ 960 browserContextId?: BrowserContextID; 961 } 962 963 export interface GrantPermissionsRequest { 964 origin: string; 965 permissions: PermissionType[]; 966 /** 967 * BrowserContext to override permissions. When omitted, default browser context is used. 968 */ 969 browserContextId?: BrowserContextID; 970 } 971 972 export interface ResetPermissionsRequest { 973 /** 974 * BrowserContext to reset permissions. When omitted, default browser context is used. 975 */ 976 browserContextId?: BrowserContextID; 977 } 978 979 export interface GetVersionResponse { 980 /** 981 * Protocol version. 982 */ 983 protocolVersion: string; 984 /** 985 * Product name. 986 */ 987 product: string; 988 /** 989 * Product revision. 990 */ 991 revision: string; 992 /** 993 * User-Agent. 994 */ 995 userAgent: string; 996 /** 997 * V8 version. 998 */ 999 jsVersion: string; 1000 } 1001 1002 export interface GetBrowserCommandLineResponse { 1003 /** 1004 * Commandline parameters 1005 */ 1006 arguments: string[]; 1007 } 1008 1009 export interface GetHistogramsRequest { 1010 /** 1011 * Requested substring in name. Only histograms which have query as a 1012 * substring in their name are extracted. An empty or absent query returns 1013 * all histograms. 1014 */ 1015 query?: string; 1016 /** 1017 * If true, retrieve delta since last call. 1018 */ 1019 delta?: boolean; 1020 } 1021 1022 export interface GetHistogramsResponse { 1023 /** 1024 * Histograms. 1025 */ 1026 histograms: Histogram[]; 1027 } 1028 1029 export interface GetHistogramRequest { 1030 /** 1031 * Requested histogram name. 1032 */ 1033 name: string; 1034 /** 1035 * If true, retrieve delta since last call. 1036 */ 1037 delta?: boolean; 1038 } 1039 1040 export interface GetHistogramResponse { 1041 /** 1042 * Histogram. 1043 */ 1044 histogram: Histogram; 1045 } 1046 1047 export interface GetWindowBoundsRequest { 1048 /** 1049 * Browser window id. 1050 */ 1051 windowId: WindowID; 1052 } 1053 1054 export interface GetWindowBoundsResponse { 1055 /** 1056 * Bounds information of the window. When window state is 'minimized', the restored window 1057 * position and size are returned. 1058 */ 1059 bounds: Bounds; 1060 } 1061 1062 export interface GetWindowForTargetRequest { 1063 /** 1064 * Devtools agent host id. If called as a part of the session, associated targetId is used. 1065 */ 1066 targetId?: Target.TargetID; 1067 } 1068 1069 export interface GetWindowForTargetResponse { 1070 /** 1071 * Browser window id. 1072 */ 1073 windowId: WindowID; 1074 /** 1075 * Bounds information of the window. When window state is 'minimized', the restored window 1076 * position and size are returned. 1077 */ 1078 bounds: Bounds; 1079 } 1080 1081 export interface SetWindowBoundsRequest { 1082 /** 1083 * Browser window id. 1084 */ 1085 windowId: WindowID; 1086 /** 1087 * New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined 1088 * with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. 1089 */ 1090 bounds: Bounds; 1091 } 1092 1093 export interface SetDockTileRequest { 1094 badgeLabel?: string; 1095 /** 1096 * Png encoded image. 1097 */ 1098 image?: binary; 1099 } 1100 } 1101 1102 /** 1103 * This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) 1104 * have an associated `id` used in subsequent operations on the related object. Each object type has 1105 * a specific `id` structure, and those are not interchangeable between objects of different kinds. 1106 * CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client 1107 * can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and 1108 * subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods. 1109 */ 1110 export namespace CSS { 1111 1112 export type StyleSheetId = string; 1113 1114 /** 1115 * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent 1116 * stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via 1117 * inspector" rules), "regular" for regular stylesheets. 1118 */ 1119 export enum StyleSheetOrigin { 1120 Injected = 'injected', 1121 UserAgent = 'user-agent', 1122 Inspector = 'inspector', 1123 Regular = 'regular', 1124 } 1125 1126 /** 1127 * CSS rule collection for a single pseudo style. 1128 */ 1129 export interface PseudoElementMatches { 1130 /** 1131 * Pseudo element type. 1132 */ 1133 pseudoType: DOM.PseudoType; 1134 /** 1135 * Matches of CSS rules applicable to the pseudo style. 1136 */ 1137 matches: RuleMatch[]; 1138 } 1139 1140 /** 1141 * Inherited CSS rule collection from ancestor node. 1142 */ 1143 export interface InheritedStyleEntry { 1144 /** 1145 * The ancestor node's inline style, if any, in the style inheritance chain. 1146 */ 1147 inlineStyle?: CSSStyle; 1148 /** 1149 * Matches of CSS rules matching the ancestor node in the style inheritance chain. 1150 */ 1151 matchedCSSRules: RuleMatch[]; 1152 } 1153 1154 /** 1155 * Match data for a CSS rule. 1156 */ 1157 export interface RuleMatch { 1158 /** 1159 * CSS rule in the match. 1160 */ 1161 rule: CSSRule; 1162 /** 1163 * Matching selector indices in the rule's selectorList selectors (0-based). 1164 */ 1165 matchingSelectors: integer[]; 1166 } 1167 1168 /** 1169 * Data for a simple selector (these are delimited by commas in a selector list). 1170 */ 1171 export interface Value { 1172 /** 1173 * Value text. 1174 */ 1175 text: string; 1176 /** 1177 * Value range in the underlying resource (if available). 1178 */ 1179 range?: SourceRange; 1180 } 1181 1182 /** 1183 * Selector list data. 1184 */ 1185 export interface SelectorList { 1186 /** 1187 * Selectors in the list. 1188 */ 1189 selectors: Value[]; 1190 /** 1191 * Rule selector text. 1192 */ 1193 text: string; 1194 } 1195 1196 /** 1197 * CSS stylesheet metainformation. 1198 */ 1199 export interface CSSStyleSheetHeader { 1200 /** 1201 * The stylesheet identifier. 1202 */ 1203 styleSheetId: StyleSheetId; 1204 /** 1205 * Owner frame identifier. 1206 */ 1207 frameId: Page.FrameId; 1208 /** 1209 * Stylesheet resource URL. 1210 */ 1211 sourceURL: string; 1212 /** 1213 * URL of source map associated with the stylesheet (if any). 1214 */ 1215 sourceMapURL?: string; 1216 /** 1217 * Stylesheet origin. 1218 */ 1219 origin: StyleSheetOrigin; 1220 /** 1221 * Stylesheet title. 1222 */ 1223 title: string; 1224 /** 1225 * The backend id for the owner node of the stylesheet. 1226 */ 1227 ownerNode?: DOM.BackendNodeId; 1228 /** 1229 * Denotes whether the stylesheet is disabled. 1230 */ 1231 disabled: boolean; 1232 /** 1233 * Whether the sourceURL field value comes from the sourceURL comment. 1234 */ 1235 hasSourceURL?: boolean; 1236 /** 1237 * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for 1238 * document.written STYLE tags. 1239 */ 1240 isInline: boolean; 1241 /** 1242 * Line offset of the stylesheet within the resource (zero based). 1243 */ 1244 startLine: number; 1245 /** 1246 * Column offset of the stylesheet within the resource (zero based). 1247 */ 1248 startColumn: number; 1249 /** 1250 * Size of the content (in characters). 1251 */ 1252 length: number; 1253 /** 1254 * Line offset of the end of the stylesheet within the resource (zero based). 1255 */ 1256 endLine: number; 1257 /** 1258 * Column offset of the end of the stylesheet within the resource (zero based). 1259 */ 1260 endColumn: number; 1261 } 1262 1263 /** 1264 * CSS rule representation. 1265 */ 1266 export interface CSSRule { 1267 /** 1268 * The css style sheet identifier (absent for user agent stylesheet and user-specified 1269 * stylesheet rules) this rule came from. 1270 */ 1271 styleSheetId?: StyleSheetId; 1272 /** 1273 * Rule selector data. 1274 */ 1275 selectorList: SelectorList; 1276 /** 1277 * Parent stylesheet's origin. 1278 */ 1279 origin: StyleSheetOrigin; 1280 /** 1281 * Associated style declaration. 1282 */ 1283 style: CSSStyle; 1284 /** 1285 * Media list array (for rules involving media queries). The array enumerates media queries 1286 * starting with the innermost one, going outwards. 1287 */ 1288 media?: CSSMedia[]; 1289 } 1290 1291 /** 1292 * CSS coverage information. 1293 */ 1294 export interface RuleUsage { 1295 /** 1296 * The css style sheet identifier (absent for user agent stylesheet and user-specified 1297 * stylesheet rules) this rule came from. 1298 */ 1299 styleSheetId: StyleSheetId; 1300 /** 1301 * Offset of the start of the rule (including selector) from the beginning of the stylesheet. 1302 */ 1303 startOffset: number; 1304 /** 1305 * Offset of the end of the rule body from the beginning of the stylesheet. 1306 */ 1307 endOffset: number; 1308 /** 1309 * Indicates whether the rule was actually used by some element in the page. 1310 */ 1311 used: boolean; 1312 } 1313 1314 /** 1315 * Text range within a resource. All numbers are zero-based. 1316 */ 1317 export interface SourceRange { 1318 /** 1319 * Start line of range. 1320 */ 1321 startLine: integer; 1322 /** 1323 * Start column of range (inclusive). 1324 */ 1325 startColumn: integer; 1326 /** 1327 * End line of range 1328 */ 1329 endLine: integer; 1330 /** 1331 * End column of range (exclusive). 1332 */ 1333 endColumn: integer; 1334 } 1335 1336 export interface ShorthandEntry { 1337 /** 1338 * Shorthand name. 1339 */ 1340 name: string; 1341 /** 1342 * Shorthand value. 1343 */ 1344 value: string; 1345 /** 1346 * Whether the property has "!important" annotation (implies `false` if absent). 1347 */ 1348 important?: boolean; 1349 } 1350 1351 export interface CSSComputedStyleProperty { 1352 /** 1353 * Computed style property name. 1354 */ 1355 name: string; 1356 /** 1357 * Computed style property value. 1358 */ 1359 value: string; 1360 } 1361 1362 /** 1363 * CSS style representation. 1364 */ 1365 export interface CSSStyle { 1366 /** 1367 * The css style sheet identifier (absent for user agent stylesheet and user-specified 1368 * stylesheet rules) this rule came from. 1369 */ 1370 styleSheetId?: StyleSheetId; 1371 /** 1372 * CSS properties in the style. 1373 */ 1374 cssProperties: CSSProperty[]; 1375 /** 1376 * Computed values for all shorthands found in the style. 1377 */ 1378 shorthandEntries: ShorthandEntry[]; 1379 /** 1380 * Style declaration text (if available). 1381 */ 1382 cssText?: string; 1383 /** 1384 * Style declaration range in the enclosing stylesheet (if available). 1385 */ 1386 range?: SourceRange; 1387 } 1388 1389 /** 1390 * CSS property declaration data. 1391 */ 1392 export interface CSSProperty { 1393 /** 1394 * The property name. 1395 */ 1396 name: string; 1397 /** 1398 * The property value. 1399 */ 1400 value: string; 1401 /** 1402 * Whether the property has "!important" annotation (implies `false` if absent). 1403 */ 1404 important?: boolean; 1405 /** 1406 * Whether the property is implicit (implies `false` if absent). 1407 */ 1408 implicit?: boolean; 1409 /** 1410 * The full property text as specified in the style. 1411 */ 1412 text?: string; 1413 /** 1414 * Whether the property is understood by the browser (implies `true` if absent). 1415 */ 1416 parsedOk?: boolean; 1417 /** 1418 * Whether the property is disabled by the user (present for source-based properties only). 1419 */ 1420 disabled?: boolean; 1421 /** 1422 * The entire property range in the enclosing style declaration (if available). 1423 */ 1424 range?: SourceRange; 1425 } 1426 1427 export enum CSSMediaSource { 1428 MediaRule = 'mediaRule', 1429 ImportRule = 'importRule', 1430 LinkedSheet = 'linkedSheet', 1431 InlineSheet = 'inlineSheet', 1432 } 1433 1434 /** 1435 * CSS media rule descriptor. 1436 */ 1437 export interface CSSMedia { 1438 /** 1439 * Media query text. 1440 */ 1441 text: string; 1442 /** 1443 * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if 1444 * specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked 1445 * stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline 1446 * stylesheet's STYLE tag. 1447 */ 1448 source: CSSMediaSource; 1449 /** 1450 * URL of the document containing the media query description. 1451 */ 1452 sourceURL?: string; 1453 /** 1454 * The associated rule (@media or @import) header range in the enclosing stylesheet (if 1455 * available). 1456 */ 1457 range?: SourceRange; 1458 /** 1459 * Identifier of the stylesheet containing this object (if exists). 1460 */ 1461 styleSheetId?: StyleSheetId; 1462 /** 1463 * Array of media queries. 1464 */ 1465 mediaList?: MediaQuery[]; 1466 } 1467 1468 /** 1469 * Media query descriptor. 1470 */ 1471 export interface MediaQuery { 1472 /** 1473 * Array of media query expressions. 1474 */ 1475 expressions: MediaQueryExpression[]; 1476 /** 1477 * Whether the media query condition is satisfied. 1478 */ 1479 active: boolean; 1480 } 1481 1482 /** 1483 * Media query expression descriptor. 1484 */ 1485 export interface MediaQueryExpression { 1486 /** 1487 * Media query expression value. 1488 */ 1489 value: number; 1490 /** 1491 * Media query expression units. 1492 */ 1493 unit: string; 1494 /** 1495 * Media query expression feature. 1496 */ 1497 feature: string; 1498 /** 1499 * The associated range of the value text in the enclosing stylesheet (if available). 1500 */ 1501 valueRange?: SourceRange; 1502 /** 1503 * Computed length of media query expression (if applicable). 1504 */ 1505 computedLength?: number; 1506 } 1507 1508 /** 1509 * Information about amount of glyphs that were rendered with given font. 1510 */ 1511 export interface PlatformFontUsage { 1512 /** 1513 * Font's family name reported by platform. 1514 */ 1515 familyName: string; 1516 /** 1517 * Indicates if the font was downloaded or resolved locally. 1518 */ 1519 isCustomFont: boolean; 1520 /** 1521 * Amount of glyphs that were rendered with this font. 1522 */ 1523 glyphCount: number; 1524 } 1525 1526 /** 1527 * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions 1528 */ 1529 export interface FontFace { 1530 /** 1531 * The font-family. 1532 */ 1533 fontFamily: string; 1534 /** 1535 * The font-style. 1536 */ 1537 fontStyle: string; 1538 /** 1539 * The font-variant. 1540 */ 1541 fontVariant: string; 1542 /** 1543 * The font-weight. 1544 */ 1545 fontWeight: string; 1546 /** 1547 * The font-stretch. 1548 */ 1549 fontStretch: string; 1550 /** 1551 * The unicode-range. 1552 */ 1553 unicodeRange: string; 1554 /** 1555 * The src. 1556 */ 1557 src: string; 1558 /** 1559 * The resolved platform font family 1560 */ 1561 platformFontFamily: string; 1562 } 1563 1564 /** 1565 * CSS keyframes rule representation. 1566 */ 1567 export interface CSSKeyframesRule { 1568 /** 1569 * Animation name. 1570 */ 1571 animationName: Value; 1572 /** 1573 * List of keyframes. 1574 */ 1575 keyframes: CSSKeyframeRule[]; 1576 } 1577 1578 /** 1579 * CSS keyframe rule representation. 1580 */ 1581 export interface CSSKeyframeRule { 1582 /** 1583 * The css style sheet identifier (absent for user agent stylesheet and user-specified 1584 * stylesheet rules) this rule came from. 1585 */ 1586 styleSheetId?: StyleSheetId; 1587 /** 1588 * Parent stylesheet's origin. 1589 */ 1590 origin: StyleSheetOrigin; 1591 /** 1592 * Associated key text. 1593 */ 1594 keyText: Value; 1595 /** 1596 * Associated style declaration. 1597 */ 1598 style: CSSStyle; 1599 } 1600 1601 /** 1602 * A descriptor of operation to mutate style declaration text. 1603 */ 1604 export interface StyleDeclarationEdit { 1605 /** 1606 * The css style sheet identifier. 1607 */ 1608 styleSheetId: StyleSheetId; 1609 /** 1610 * The range of the style text in the enclosing stylesheet. 1611 */ 1612 range: SourceRange; 1613 /** 1614 * New style text. 1615 */ 1616 text: string; 1617 } 1618 1619 export interface AddRuleRequest { 1620 /** 1621 * The css style sheet identifier where a new rule should be inserted. 1622 */ 1623 styleSheetId: StyleSheetId; 1624 /** 1625 * The text of a new rule. 1626 */ 1627 ruleText: string; 1628 /** 1629 * Text position of a new rule in the target style sheet. 1630 */ 1631 location: SourceRange; 1632 } 1633 1634 export interface AddRuleResponse { 1635 /** 1636 * The newly created rule. 1637 */ 1638 rule: CSSRule; 1639 } 1640 1641 export interface CollectClassNamesRequest { 1642 styleSheetId: StyleSheetId; 1643 } 1644 1645 export interface CollectClassNamesResponse { 1646 /** 1647 * Class name list. 1648 */ 1649 classNames: string[]; 1650 } 1651 1652 export interface CreateStyleSheetRequest { 1653 /** 1654 * Identifier of the frame where "via-inspector" stylesheet should be created. 1655 */ 1656 frameId: Page.FrameId; 1657 } 1658 1659 export interface CreateStyleSheetResponse { 1660 /** 1661 * Identifier of the created "via-inspector" stylesheet. 1662 */ 1663 styleSheetId: StyleSheetId; 1664 } 1665 1666 export interface ForcePseudoStateRequest { 1667 /** 1668 * The element id for which to force the pseudo state. 1669 */ 1670 nodeId: DOM.NodeId; 1671 /** 1672 * Element pseudo classes to force when computing the element's style. 1673 */ 1674 forcedPseudoClasses: string[]; 1675 } 1676 1677 export interface GetBackgroundColorsRequest { 1678 /** 1679 * Id of the node to get background colors for. 1680 */ 1681 nodeId: DOM.NodeId; 1682 } 1683 1684 export interface GetBackgroundColorsResponse { 1685 /** 1686 * The range of background colors behind this element, if it contains any visible text. If no 1687 * visible text is present, this will be undefined. In the case of a flat background color, 1688 * this will consist of simply that color. In the case of a gradient, this will consist of each 1689 * of the color stops. For anything more complicated, this will be an empty array. Images will 1690 * be ignored (as if the image had failed to load). 1691 */ 1692 backgroundColors?: string[]; 1693 /** 1694 * The computed font size for this node, as a CSS computed value string (e.g. '12px'). 1695 */ 1696 computedFontSize?: string; 1697 /** 1698 * The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or 1699 * '100'). 1700 */ 1701 computedFontWeight?: string; 1702 } 1703 1704 export interface GetComputedStyleForNodeRequest { 1705 nodeId: DOM.NodeId; 1706 } 1707 1708 export interface GetComputedStyleForNodeResponse { 1709 /** 1710 * Computed style for the specified DOM node. 1711 */ 1712 computedStyle: CSSComputedStyleProperty[]; 1713 } 1714 1715 export interface GetInlineStylesForNodeRequest { 1716 nodeId: DOM.NodeId; 1717 } 1718 1719 export interface GetInlineStylesForNodeResponse { 1720 /** 1721 * Inline style for the specified DOM node. 1722 */ 1723 inlineStyle?: CSSStyle; 1724 /** 1725 * Attribute-defined element style (e.g. resulting from "width=20 height=100%"). 1726 */ 1727 attributesStyle?: CSSStyle; 1728 } 1729 1730 export interface GetMatchedStylesForNodeRequest { 1731 nodeId: DOM.NodeId; 1732 } 1733 1734 export interface GetMatchedStylesForNodeResponse { 1735 /** 1736 * Inline style for the specified DOM node. 1737 */ 1738 inlineStyle?: CSSStyle; 1739 /** 1740 * Attribute-defined element style (e.g. resulting from "width=20 height=100%"). 1741 */ 1742 attributesStyle?: CSSStyle; 1743 /** 1744 * CSS rules matching this node, from all applicable stylesheets. 1745 */ 1746 matchedCSSRules?: RuleMatch[]; 1747 /** 1748 * Pseudo style matches for this node. 1749 */ 1750 pseudoElements?: PseudoElementMatches[]; 1751 /** 1752 * A chain of inherited styles (from the immediate node parent up to the DOM tree root). 1753 */ 1754 inherited?: InheritedStyleEntry[]; 1755 /** 1756 * A list of CSS keyframed animations matching this node. 1757 */ 1758 cssKeyframesRules?: CSSKeyframesRule[]; 1759 } 1760 1761 export interface GetMediaQueriesResponse { 1762 medias: CSSMedia[]; 1763 } 1764 1765 export interface GetPlatformFontsForNodeRequest { 1766 nodeId: DOM.NodeId; 1767 } 1768 1769 export interface GetPlatformFontsForNodeResponse { 1770 /** 1771 * Usage statistics for every employed platform font. 1772 */ 1773 fonts: PlatformFontUsage[]; 1774 } 1775 1776 export interface GetStyleSheetTextRequest { 1777 styleSheetId: StyleSheetId; 1778 } 1779 1780 export interface GetStyleSheetTextResponse { 1781 /** 1782 * The stylesheet text. 1783 */ 1784 text: string; 1785 } 1786 1787 export interface SetEffectivePropertyValueForNodeRequest { 1788 /** 1789 * The element id for which to set property. 1790 */ 1791 nodeId: DOM.NodeId; 1792 propertyName: string; 1793 value: string; 1794 } 1795 1796 export interface SetKeyframeKeyRequest { 1797 styleSheetId: StyleSheetId; 1798 range: SourceRange; 1799 keyText: string; 1800 } 1801 1802 export interface SetKeyframeKeyResponse { 1803 /** 1804 * The resulting key text after modification. 1805 */ 1806 keyText: Value; 1807 } 1808 1809 export interface SetMediaTextRequest { 1810 styleSheetId: StyleSheetId; 1811 range: SourceRange; 1812 text: string; 1813 } 1814 1815 export interface SetMediaTextResponse { 1816 /** 1817 * The resulting CSS media rule after modification. 1818 */ 1819 media: CSSMedia; 1820 } 1821 1822 export interface SetRuleSelectorRequest { 1823 styleSheetId: StyleSheetId; 1824 range: SourceRange; 1825 selector: string; 1826 } 1827 1828 export interface SetRuleSelectorResponse { 1829 /** 1830 * The resulting selector list after modification. 1831 */ 1832 selectorList: SelectorList; 1833 } 1834 1835 export interface SetStyleSheetTextRequest { 1836 styleSheetId: StyleSheetId; 1837 text: string; 1838 } 1839 1840 export interface SetStyleSheetTextResponse { 1841 /** 1842 * URL of source map associated with script (if any). 1843 */ 1844 sourceMapURL?: string; 1845 } 1846 1847 export interface SetStyleTextsRequest { 1848 edits: StyleDeclarationEdit[]; 1849 } 1850 1851 export interface SetStyleTextsResponse { 1852 /** 1853 * The resulting styles after modification. 1854 */ 1855 styles: CSSStyle[]; 1856 } 1857 1858 export interface StopRuleUsageTrackingResponse { 1859 ruleUsage: RuleUsage[]; 1860 } 1861 1862 export interface TakeCoverageDeltaResponse { 1863 coverage: RuleUsage[]; 1864 /** 1865 * Monotonically increasing time, in seconds. 1866 */ 1867 timestamp: number; 1868 } 1869 1870 /** 1871 * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded 1872 * web font 1873 */ 1874 export interface FontsUpdatedEvent { 1875 /** 1876 * The web font that has loaded. 1877 */ 1878 font?: FontFace; 1879 } 1880 1881 /** 1882 * Fired whenever an active document stylesheet is added. 1883 */ 1884 export interface StyleSheetAddedEvent { 1885 /** 1886 * Added stylesheet metainfo. 1887 */ 1888 header: CSSStyleSheetHeader; 1889 } 1890 1891 /** 1892 * Fired whenever a stylesheet is changed as a result of the client operation. 1893 */ 1894 export interface StyleSheetChangedEvent { 1895 styleSheetId: StyleSheetId; 1896 } 1897 1898 /** 1899 * Fired whenever an active document stylesheet is removed. 1900 */ 1901 export interface StyleSheetRemovedEvent { 1902 /** 1903 * Identifier of the removed stylesheet. 1904 */ 1905 styleSheetId: StyleSheetId; 1906 } 1907 } 1908 1909 export namespace CacheStorage { 1910 1911 /** 1912 * Unique identifier of the Cache object. 1913 */ 1914 export type CacheId = string; 1915 1916 /** 1917 * type of HTTP response cached 1918 */ 1919 export enum CachedResponseType { 1920 Basic = 'basic', 1921 Cors = 'cors', 1922 Default = 'default', 1923 Error = 'error', 1924 OpaqueResponse = 'opaqueResponse', 1925 OpaqueRedirect = 'opaqueRedirect', 1926 } 1927 1928 /** 1929 * Data entry. 1930 */ 1931 export interface DataEntry { 1932 /** 1933 * Request URL. 1934 */ 1935 requestURL: string; 1936 /** 1937 * Request method. 1938 */ 1939 requestMethod: string; 1940 /** 1941 * Request headers 1942 */ 1943 requestHeaders: Header[]; 1944 /** 1945 * Number of seconds since epoch. 1946 */ 1947 responseTime: number; 1948 /** 1949 * HTTP response status code. 1950 */ 1951 responseStatus: integer; 1952 /** 1953 * HTTP response status text. 1954 */ 1955 responseStatusText: string; 1956 /** 1957 * HTTP response type 1958 */ 1959 responseType: CachedResponseType; 1960 /** 1961 * Response headers 1962 */ 1963 responseHeaders: Header[]; 1964 } 1965 1966 /** 1967 * Cache identifier. 1968 */ 1969 export interface Cache { 1970 /** 1971 * An opaque unique id of the cache. 1972 */ 1973 cacheId: CacheId; 1974 /** 1975 * Security origin of the cache. 1976 */ 1977 securityOrigin: string; 1978 /** 1979 * The name of the cache. 1980 */ 1981 cacheName: string; 1982 } 1983 1984 export interface Header { 1985 name: string; 1986 value: string; 1987 } 1988 1989 /** 1990 * Cached response 1991 */ 1992 export interface CachedResponse { 1993 /** 1994 * Entry content, base64-encoded. 1995 */ 1996 body: binary; 1997 } 1998 1999 export interface DeleteCacheRequest { 2000 /** 2001 * Id of cache for deletion. 2002 */ 2003 cacheId: CacheId; 2004 } 2005 2006 export interface DeleteEntryRequest { 2007 /** 2008 * Id of cache where the entry will be deleted. 2009 */ 2010 cacheId: CacheId; 2011 /** 2012 * URL spec of the request. 2013 */ 2014 request: string; 2015 } 2016 2017 export interface RequestCacheNamesRequest { 2018 /** 2019 * Security origin. 2020 */ 2021 securityOrigin: string; 2022 } 2023 2024 export interface RequestCacheNamesResponse { 2025 /** 2026 * Caches for the security origin. 2027 */ 2028 caches: Cache[]; 2029 } 2030 2031 export interface RequestCachedResponseRequest { 2032 /** 2033 * Id of cache that contains the entry. 2034 */ 2035 cacheId: CacheId; 2036 /** 2037 * URL spec of the request. 2038 */ 2039 requestURL: string; 2040 /** 2041 * headers of the request. 2042 */ 2043 requestHeaders: Header[]; 2044 } 2045 2046 export interface RequestCachedResponseResponse { 2047 /** 2048 * Response read from the cache. 2049 */ 2050 response: CachedResponse; 2051 } 2052 2053 export interface RequestEntriesRequest { 2054 /** 2055 * ID of cache to get entries from. 2056 */ 2057 cacheId: CacheId; 2058 /** 2059 * Number of records to skip. 2060 */ 2061 skipCount?: integer; 2062 /** 2063 * Number of records to fetch. 2064 */ 2065 pageSize?: integer; 2066 /** 2067 * If present, only return the entries containing this substring in the path 2068 */ 2069 pathFilter?: string; 2070 } 2071 2072 export interface RequestEntriesResponse { 2073 /** 2074 * Array of object store data entries. 2075 */ 2076 cacheDataEntries: DataEntry[]; 2077 /** 2078 * Count of returned entries from this storage. If pathFilter is empty, it 2079 * is the count of all entries from this storage. 2080 */ 2081 returnCount: number; 2082 } 2083 } 2084 2085 /** 2086 * A domain for interacting with Cast, Presentation API, and Remote Playback API 2087 * functionalities. 2088 */ 2089 export namespace Cast { 2090 2091 export interface Sink { 2092 name: string; 2093 id: string; 2094 /** 2095 * Text describing the current session. Present only if there is an active 2096 * session on the sink. 2097 */ 2098 session?: string; 2099 } 2100 2101 export interface EnableRequest { 2102 presentationUrl?: string; 2103 } 2104 2105 export interface SetSinkToUseRequest { 2106 sinkName: string; 2107 } 2108 2109 export interface StartTabMirroringRequest { 2110 sinkName: string; 2111 } 2112 2113 export interface StopCastingRequest { 2114 sinkName: string; 2115 } 2116 2117 /** 2118 * This is fired whenever the list of available sinks changes. A sink is a 2119 * device or a software surface that you can cast to. 2120 */ 2121 export interface SinksUpdatedEvent { 2122 sinks: Sink[]; 2123 } 2124 2125 /** 2126 * This is fired whenever the outstanding issue/error message changes. 2127 * |issueMessage| is empty if there is no issue. 2128 */ 2129 export interface IssueUpdatedEvent { 2130 issueMessage: string; 2131 } 2132 } 2133 2134 /** 2135 * This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object 2136 * that has an `id`. This `id` can be used to get additional information on the Node, resolve it into 2137 * the JavaScript object wrapper, etc. It is important that client receives DOM events only for the 2138 * nodes that are known to the client. Backend keeps track of the nodes that were sent to the client 2139 * and never sends the same node twice. It is client's responsibility to collect information about 2140 * the nodes that were sent to the client.<p>Note that `iframe` owner elements will return 2141 * corresponding document elements as their child nodes.</p> 2142 */ 2143 export namespace DOM { 2144 2145 /** 2146 * Unique DOM node identifier. 2147 */ 2148 export type NodeId = integer; 2149 2150 /** 2151 * Unique DOM node identifier used to reference a node that may not have been pushed to the 2152 * front-end. 2153 */ 2154 export type BackendNodeId = integer; 2155 2156 /** 2157 * Backend node with a friendly name. 2158 */ 2159 export interface BackendNode { 2160 /** 2161 * `Node`'s nodeType. 2162 */ 2163 nodeType: integer; 2164 /** 2165 * `Node`'s nodeName. 2166 */ 2167 nodeName: string; 2168 backendNodeId: BackendNodeId; 2169 } 2170 2171 /** 2172 * Pseudo element type. 2173 */ 2174 export enum PseudoType { 2175 FirstLine = 'first-line', 2176 FirstLetter = 'first-letter', 2177 Before = 'before', 2178 After = 'after', 2179 Marker = 'marker', 2180 Backdrop = 'backdrop', 2181 Selection = 'selection', 2182 FirstLineInherited = 'first-line-inherited', 2183 Scrollbar = 'scrollbar', 2184 ScrollbarThumb = 'scrollbar-thumb', 2185 ScrollbarButton = 'scrollbar-button', 2186 ScrollbarTrack = 'scrollbar-track', 2187 ScrollbarTrackPiece = 'scrollbar-track-piece', 2188 ScrollbarCorner = 'scrollbar-corner', 2189 Resizer = 'resizer', 2190 InputListButton = 'input-list-button', 2191 } 2192 2193 /** 2194 * Shadow root type. 2195 */ 2196 export enum ShadowRootType { 2197 UserAgent = 'user-agent', 2198 Open = 'open', 2199 Closed = 'closed', 2200 } 2201 2202 /** 2203 * DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. 2204 * DOMNode is a base node mirror type. 2205 */ 2206 export interface Node { 2207 /** 2208 * Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend 2209 * will only push node with given `id` once. It is aware of all requested nodes and will only 2210 * fire DOM events for nodes known to the client. 2211 */ 2212 nodeId: NodeId; 2213 /** 2214 * The id of the parent node if any. 2215 */ 2216 parentId?: NodeId; 2217 /** 2218 * The BackendNodeId for this node. 2219 */ 2220 backendNodeId: BackendNodeId; 2221 /** 2222 * `Node`'s nodeType. 2223 */ 2224 nodeType: integer; 2225 /** 2226 * `Node`'s nodeName. 2227 */ 2228 nodeName: string; 2229 /** 2230 * `Node`'s localName. 2231 */ 2232 localName: string; 2233 /** 2234 * `Node`'s nodeValue. 2235 */ 2236 nodeValue: string; 2237 /** 2238 * Child count for `Container` nodes. 2239 */ 2240 childNodeCount?: integer; 2241 /** 2242 * Child nodes of this node when requested with children. 2243 */ 2244 children?: Node[]; 2245 /** 2246 * Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. 2247 */ 2248 attributes?: string[]; 2249 /** 2250 * Document URL that `Document` or `FrameOwner` node points to. 2251 */ 2252 documentURL?: string; 2253 /** 2254 * Base URL that `Document` or `FrameOwner` node uses for URL completion. 2255 */ 2256 baseURL?: string; 2257 /** 2258 * `DocumentType`'s publicId. 2259 */ 2260 publicId?: string; 2261 /** 2262 * `DocumentType`'s systemId. 2263 */ 2264 systemId?: string; 2265 /** 2266 * `DocumentType`'s internalSubset. 2267 */ 2268 internalSubset?: string; 2269 /** 2270 * `Document`'s XML version in case of XML documents. 2271 */ 2272 xmlVersion?: string; 2273 /** 2274 * `Attr`'s name. 2275 */ 2276 name?: string; 2277 /** 2278 * `Attr`'s value. 2279 */ 2280 value?: string; 2281 /** 2282 * Pseudo element type for this node. 2283 */ 2284 pseudoType?: PseudoType; 2285 /** 2286 * Shadow root type. 2287 */ 2288 shadowRootType?: ShadowRootType; 2289 /** 2290 * Frame ID for frame owner elements. 2291 */ 2292 frameId?: Page.FrameId; 2293 /** 2294 * Content document for frame owner elements. 2295 */ 2296 contentDocument?: Node; 2297 /** 2298 * Shadow root list for given element host. 2299 */ 2300 shadowRoots?: Node[]; 2301 /** 2302 * Content document fragment for template elements. 2303 */ 2304 templateContent?: Node; 2305 /** 2306 * Pseudo elements associated with this node. 2307 */ 2308 pseudoElements?: Node[]; 2309 /** 2310 * Import document for the HTMLImport links. 2311 */ 2312 importedDocument?: Node; 2313 /** 2314 * Distributed nodes for given insertion point. 2315 */ 2316 distributedNodes?: BackendNode[]; 2317 /** 2318 * Whether the node is SVG. 2319 */ 2320 isSVG?: boolean; 2321 } 2322 2323 /** 2324 * A structure holding an RGBA color. 2325 */ 2326 export interface RGBA { 2327 /** 2328 * The red component, in the [0-255] range. 2329 */ 2330 r: integer; 2331 /** 2332 * The green component, in the [0-255] range. 2333 */ 2334 g: integer; 2335 /** 2336 * The blue component, in the [0-255] range. 2337 */ 2338 b: integer; 2339 /** 2340 * The alpha component, in the [0-1] range (default: 1). 2341 */ 2342 a?: number; 2343 } 2344 2345 /** 2346 * An array of quad vertices, x immediately followed by y for each point, points clock-wise. 2347 */ 2348 export type Quad = number[]; 2349 2350 /** 2351 * Box model. 2352 */ 2353 export interface BoxModel { 2354 /** 2355 * Content box 2356 */ 2357 content: Quad; 2358 /** 2359 * Padding box 2360 */ 2361 padding: Quad; 2362 /** 2363 * Border box 2364 */ 2365 border: Quad; 2366 /** 2367 * Margin box 2368 */ 2369 margin: Quad; 2370 /** 2371 * Node width 2372 */ 2373 width: integer; 2374 /** 2375 * Node height 2376 */ 2377 height: integer; 2378 /** 2379 * Shape outside coordinates 2380 */ 2381 shapeOutside?: ShapeOutsideInfo; 2382 } 2383 2384 /** 2385 * CSS Shape Outside details. 2386 */ 2387 export interface ShapeOutsideInfo { 2388 /** 2389 * Shape bounds 2390 */ 2391 bounds: Quad; 2392 /** 2393 * Shape coordinate details 2394 */ 2395 shape: any[]; 2396 /** 2397 * Margin shape bounds 2398 */ 2399 marginShape: any[]; 2400 } 2401 2402 /** 2403 * Rectangle. 2404 */ 2405 export interface Rect { 2406 /** 2407 * X coordinate 2408 */ 2409 x: number; 2410 /** 2411 * Y coordinate 2412 */ 2413 y: number; 2414 /** 2415 * Rectangle width 2416 */ 2417 width: number; 2418 /** 2419 * Rectangle height 2420 */ 2421 height: number; 2422 } 2423 2424 export interface CollectClassNamesFromSubtreeRequest { 2425 /** 2426 * Id of the node to collect class names. 2427 */ 2428 nodeId: NodeId; 2429 } 2430 2431 export interface CollectClassNamesFromSubtreeResponse { 2432 /** 2433 * Class name list. 2434 */ 2435 classNames: string[]; 2436 } 2437 2438 export interface CopyToRequest { 2439 /** 2440 * Id of the node to copy. 2441 */ 2442 nodeId: NodeId; 2443 /** 2444 * Id of the element to drop the copy into. 2445 */ 2446 targetNodeId: NodeId; 2447 /** 2448 * Drop the copy before this node (if absent, the copy becomes the last child of 2449 * `targetNodeId`). 2450 */ 2451 insertBeforeNodeId?: NodeId; 2452 } 2453 2454 export interface CopyToResponse { 2455 /** 2456 * Id of the node clone. 2457 */ 2458 nodeId: NodeId; 2459 } 2460 2461 export interface DescribeNodeRequest { 2462 /** 2463 * Identifier of the node. 2464 */ 2465 nodeId?: NodeId; 2466 /** 2467 * Identifier of the backend node. 2468 */ 2469 backendNodeId?: BackendNodeId; 2470 /** 2471 * JavaScript object id of the node wrapper. 2472 */ 2473 objectId?: Runtime.RemoteObjectId; 2474 /** 2475 * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 2476 * entire subtree or provide an integer larger than 0. 2477 */ 2478 depth?: integer; 2479 /** 2480 * Whether or not iframes and shadow roots should be traversed when returning the subtree 2481 * (default is false). 2482 */ 2483 pierce?: boolean; 2484 } 2485 2486 export interface DescribeNodeResponse { 2487 /** 2488 * Node description. 2489 */ 2490 node: Node; 2491 } 2492 2493 export interface ScrollIntoViewIfNeededRequest { 2494 /** 2495 * Identifier of the node. 2496 */ 2497 nodeId?: NodeId; 2498 /** 2499 * Identifier of the backend node. 2500 */ 2501 backendNodeId?: BackendNodeId; 2502 /** 2503 * JavaScript object id of the node wrapper. 2504 */ 2505 objectId?: Runtime.RemoteObjectId; 2506 /** 2507 * The rect to be scrolled into view, relative to the node's border box, in CSS pixels. 2508 * When omitted, center of the node will be used, similar to Element.scrollIntoView. 2509 */ 2510 rect?: Rect; 2511 } 2512 2513 export interface DiscardSearchResultsRequest { 2514 /** 2515 * Unique search session identifier. 2516 */ 2517 searchId: string; 2518 } 2519 2520 export interface FocusRequest { 2521 /** 2522 * Identifier of the node. 2523 */ 2524 nodeId?: NodeId; 2525 /** 2526 * Identifier of the backend node. 2527 */ 2528 backendNodeId?: BackendNodeId; 2529 /** 2530 * JavaScript object id of the node wrapper. 2531 */ 2532 objectId?: Runtime.RemoteObjectId; 2533 } 2534 2535 export interface GetAttributesRequest { 2536 /** 2537 * Id of the node to retrieve attibutes for. 2538 */ 2539 nodeId: NodeId; 2540 } 2541 2542 export interface GetAttributesResponse { 2543 /** 2544 * An interleaved array of node attribute names and values. 2545 */ 2546 attributes: string[]; 2547 } 2548 2549 export interface GetBoxModelRequest { 2550 /** 2551 * Identifier of the node. 2552 */ 2553 nodeId?: NodeId; 2554 /** 2555 * Identifier of the backend node. 2556 */ 2557 backendNodeId?: BackendNodeId; 2558 /** 2559 * JavaScript object id of the node wrapper. 2560 */ 2561 objectId?: Runtime.RemoteObjectId; 2562 } 2563 2564 export interface GetBoxModelResponse { 2565 /** 2566 * Box model for the node. 2567 */ 2568 model: BoxModel; 2569 } 2570 2571 export interface GetContentQuadsRequest { 2572 /** 2573 * Identifier of the node. 2574 */ 2575 nodeId?: NodeId; 2576 /** 2577 * Identifier of the backend node. 2578 */ 2579 backendNodeId?: BackendNodeId; 2580 /** 2581 * JavaScript object id of the node wrapper. 2582 */ 2583 objectId?: Runtime.RemoteObjectId; 2584 } 2585 2586 export interface GetContentQuadsResponse { 2587 /** 2588 * Quads that describe node layout relative to viewport. 2589 */ 2590 quads: Quad[]; 2591 } 2592 2593 export interface GetDocumentRequest { 2594 /** 2595 * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 2596 * entire subtree or provide an integer larger than 0. 2597 */ 2598 depth?: integer; 2599 /** 2600 * Whether or not iframes and shadow roots should be traversed when returning the subtree 2601 * (default is false). 2602 */ 2603 pierce?: boolean; 2604 } 2605 2606 export interface GetDocumentResponse { 2607 /** 2608 * Resulting node. 2609 */ 2610 root: Node; 2611 } 2612 2613 export interface GetFlattenedDocumentRequest { 2614 /** 2615 * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 2616 * entire subtree or provide an integer larger than 0. 2617 */ 2618 depth?: integer; 2619 /** 2620 * Whether or not iframes and shadow roots should be traversed when returning the subtree 2621 * (default is false). 2622 */ 2623 pierce?: boolean; 2624 } 2625 2626 export interface GetFlattenedDocumentResponse { 2627 /** 2628 * Resulting node. 2629 */ 2630 nodes: Node[]; 2631 } 2632 2633 export interface GetNodeForLocationRequest { 2634 /** 2635 * X coordinate. 2636 */ 2637 x: integer; 2638 /** 2639 * Y coordinate. 2640 */ 2641 y: integer; 2642 /** 2643 * False to skip to the nearest non-UA shadow root ancestor (default: false). 2644 */ 2645 includeUserAgentShadowDOM?: boolean; 2646 /** 2647 * Whether to ignore pointer-events: none on elements and hit test them. 2648 */ 2649 ignorePointerEventsNone?: boolean; 2650 } 2651 2652 export interface GetNodeForLocationResponse { 2653 /** 2654 * Resulting node. 2655 */ 2656 backendNodeId: BackendNodeId; 2657 /** 2658 * Frame this node belongs to. 2659 */ 2660 frameId: Page.FrameId; 2661 /** 2662 * Id of the node at given coordinates, only when enabled and requested document. 2663 */ 2664 nodeId?: NodeId; 2665 } 2666 2667 export interface GetOuterHTMLRequest { 2668 /** 2669 * Identifier of the node. 2670 */ 2671 nodeId?: NodeId; 2672 /** 2673 * Identifier of the backend node. 2674 */ 2675 backendNodeId?: BackendNodeId; 2676 /** 2677 * JavaScript object id of the node wrapper. 2678 */ 2679 objectId?: Runtime.RemoteObjectId; 2680 } 2681 2682 export interface GetOuterHTMLResponse { 2683 /** 2684 * Outer HTML markup. 2685 */ 2686 outerHTML: string; 2687 } 2688 2689 export interface GetRelayoutBoundaryRequest { 2690 /** 2691 * Id of the node. 2692 */ 2693 nodeId: NodeId; 2694 } 2695 2696 export interface GetRelayoutBoundaryResponse { 2697 /** 2698 * Relayout boundary node id for the given node. 2699 */ 2700 nodeId: NodeId; 2701 } 2702 2703 export interface GetSearchResultsRequest { 2704 /** 2705 * Unique search session identifier. 2706 */ 2707 searchId: string; 2708 /** 2709 * Start index of the search result to be returned. 2710 */ 2711 fromIndex: integer; 2712 /** 2713 * End index of the search result to be returned. 2714 */ 2715 toIndex: integer; 2716 } 2717 2718 export interface GetSearchResultsResponse { 2719 /** 2720 * Ids of the search result nodes. 2721 */ 2722 nodeIds: NodeId[]; 2723 } 2724 2725 export interface MoveToRequest { 2726 /** 2727 * Id of the node to move. 2728 */ 2729 nodeId: NodeId; 2730 /** 2731 * Id of the element to drop the moved node into. 2732 */ 2733 targetNodeId: NodeId; 2734 /** 2735 * Drop node before this one (if absent, the moved node becomes the last child of 2736 * `targetNodeId`). 2737 */ 2738 insertBeforeNodeId?: NodeId; 2739 } 2740 2741 export interface MoveToResponse { 2742 /** 2743 * New id of the moved node. 2744 */ 2745 nodeId: NodeId; 2746 } 2747 2748 export interface PerformSearchRequest { 2749 /** 2750 * Plain text or query selector or XPath search query. 2751 */ 2752 query: string; 2753 /** 2754 * True to search in user agent shadow DOM. 2755 */ 2756 includeUserAgentShadowDOM?: boolean; 2757 } 2758 2759 export interface PerformSearchResponse { 2760 /** 2761 * Unique search session identifier. 2762 */ 2763 searchId: string; 2764 /** 2765 * Number of search results. 2766 */ 2767 resultCount: integer; 2768 } 2769 2770 export interface PushNodeByPathToFrontendRequest { 2771 /** 2772 * Path to node in the proprietary format. 2773 */ 2774 path: string; 2775 } 2776 2777 export interface PushNodeByPathToFrontendResponse { 2778 /** 2779 * Id of the node for given path. 2780 */ 2781 nodeId: NodeId; 2782 } 2783 2784 export interface PushNodesByBackendIdsToFrontendRequest { 2785 /** 2786 * The array of backend node ids. 2787 */ 2788 backendNodeIds: BackendNodeId[]; 2789 } 2790 2791 export interface PushNodesByBackendIdsToFrontendResponse { 2792 /** 2793 * The array of ids of pushed nodes that correspond to the backend ids specified in 2794 * backendNodeIds. 2795 */ 2796 nodeIds: NodeId[]; 2797 } 2798 2799 export interface QuerySelectorRequest { 2800 /** 2801 * Id of the node to query upon. 2802 */ 2803 nodeId: NodeId; 2804 /** 2805 * Selector string. 2806 */ 2807 selector: string; 2808 } 2809 2810 export interface QuerySelectorResponse { 2811 /** 2812 * Query selector result. 2813 */ 2814 nodeId: NodeId; 2815 } 2816 2817 export interface QuerySelectorAllRequest { 2818 /** 2819 * Id of the node to query upon. 2820 */ 2821 nodeId: NodeId; 2822 /** 2823 * Selector string. 2824 */ 2825 selector: string; 2826 } 2827 2828 export interface QuerySelectorAllResponse { 2829 /** 2830 * Query selector result. 2831 */ 2832 nodeIds: NodeId[]; 2833 } 2834 2835 export interface RemoveAttributeRequest { 2836 /** 2837 * Id of the element to remove attribute from. 2838 */ 2839 nodeId: NodeId; 2840 /** 2841 * Name of the attribute to remove. 2842 */ 2843 name: string; 2844 } 2845 2846 export interface RemoveNodeRequest { 2847 /** 2848 * Id of the node to remove. 2849 */ 2850 nodeId: NodeId; 2851 } 2852 2853 export interface RequestChildNodesRequest { 2854 /** 2855 * Id of the node to get children for. 2856 */ 2857 nodeId: NodeId; 2858 /** 2859 * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the 2860 * entire subtree or provide an integer larger than 0. 2861 */ 2862 depth?: integer; 2863 /** 2864 * Whether or not iframes and shadow roots should be traversed when returning the sub-tree 2865 * (default is false). 2866 */ 2867 pierce?: boolean; 2868 } 2869 2870 export interface RequestNodeRequest { 2871 /** 2872 * JavaScript object id to convert into node. 2873 */ 2874 objectId: Runtime.RemoteObjectId; 2875 } 2876 2877 export interface RequestNodeResponse { 2878 /** 2879 * Node id for given object. 2880 */ 2881 nodeId: NodeId; 2882 } 2883 2884 export interface ResolveNodeRequest { 2885 /** 2886 * Id of the node to resolve. 2887 */ 2888 nodeId?: NodeId; 2889 /** 2890 * Backend identifier of the node to resolve. 2891 */ 2892 backendNodeId?: DOM.BackendNodeId; 2893 /** 2894 * Symbolic group name that can be used to release multiple objects. 2895 */ 2896 objectGroup?: string; 2897 /** 2898 * Execution context in which to resolve the node. 2899 */ 2900 executionContextId?: Runtime.ExecutionContextId; 2901 } 2902 2903 export interface ResolveNodeResponse { 2904 /** 2905 * JavaScript object wrapper for given node. 2906 */ 2907 object: Runtime.RemoteObject; 2908 } 2909 2910 export interface SetAttributeValueRequest { 2911 /** 2912 * Id of the element to set attribute for. 2913 */ 2914 nodeId: NodeId; 2915 /** 2916 * Attribute name. 2917 */ 2918 name: string; 2919 /** 2920 * Attribute value. 2921 */ 2922 value: string; 2923 } 2924 2925 export interface SetAttributesAsTextRequest { 2926 /** 2927 * Id of the element to set attributes for. 2928 */ 2929 nodeId: NodeId; 2930 /** 2931 * Text with a number of attributes. Will parse this text using HTML parser. 2932 */ 2933 text: string; 2934 /** 2935 * Attribute name to replace with new attributes derived from text in case text parsed 2936 * successfully. 2937 */ 2938 name?: string; 2939 } 2940 2941 export interface SetFileInputFilesRequest { 2942 /** 2943 * Array of file paths to set. 2944 */ 2945 files: string[]; 2946 /** 2947 * Identifier of the node. 2948 */ 2949 nodeId?: NodeId; 2950 /** 2951 * Identifier of the backend node. 2952 */ 2953 backendNodeId?: BackendNodeId; 2954 /** 2955 * JavaScript object id of the node wrapper. 2956 */ 2957 objectId?: Runtime.RemoteObjectId; 2958 } 2959 2960 export interface SetNodeStackTracesEnabledRequest { 2961 /** 2962 * Enable or disable. 2963 */ 2964 enable: boolean; 2965 } 2966 2967 export interface GetNodeStackTracesRequest { 2968 /** 2969 * Id of the node to get stack traces for. 2970 */ 2971 nodeId: NodeId; 2972 } 2973 2974 export interface GetNodeStackTracesResponse { 2975 /** 2976 * Creation stack trace, if available. 2977 */ 2978 creation?: Runtime.StackTrace; 2979 } 2980 2981 export interface GetFileInfoRequest { 2982 /** 2983 * JavaScript object id of the node wrapper. 2984 */ 2985 objectId: Runtime.RemoteObjectId; 2986 } 2987 2988 export interface GetFileInfoResponse { 2989 path: string; 2990 } 2991 2992 export interface SetInspectedNodeRequest { 2993 /** 2994 * DOM node id to be accessible by means of $x command line API. 2995 */ 2996 nodeId: NodeId; 2997 } 2998 2999 export interface SetNodeNameRequest { 3000 /** 3001 * Id of the node to set name for. 3002 */ 3003 nodeId: NodeId; 3004 /** 3005 * New node's name. 3006 */ 3007 name: string; 3008 } 3009 3010 export interface SetNodeNameResponse { 3011 /** 3012 * New node's id. 3013 */ 3014 nodeId: NodeId; 3015 } 3016 3017 export interface SetNodeValueRequest { 3018 /** 3019 * Id of the node to set value for. 3020 */ 3021 nodeId: NodeId; 3022 /** 3023 * New node's value. 3024 */ 3025 value: string; 3026 } 3027 3028 export interface SetOuterHTMLRequest { 3029 /** 3030 * Id of the node to set markup for. 3031 */ 3032 nodeId: NodeId; 3033 /** 3034 * Outer HTML markup to set. 3035 */ 3036 outerHTML: string; 3037 } 3038 3039 export interface GetFrameOwnerRequest { 3040 frameId: Page.FrameId; 3041 } 3042 3043 export interface GetFrameOwnerResponse { 3044 /** 3045 * Resulting node. 3046 */ 3047 backendNodeId: BackendNodeId; 3048 /** 3049 * Id of the node at given coordinates, only when enabled and requested document. 3050 */ 3051 nodeId?: NodeId; 3052 } 3053 3054 /** 3055 * Fired when `Element`'s attribute is modified. 3056 */ 3057 export interface AttributeModifiedEvent { 3058 /** 3059 * Id of the node that has changed. 3060 */ 3061 nodeId: NodeId; 3062 /** 3063 * Attribute name. 3064 */ 3065 name: string; 3066 /** 3067 * Attribute value. 3068 */ 3069 value: string; 3070 } 3071 3072 /** 3073 * Fired when `Element`'s attribute is removed. 3074 */ 3075 export interface AttributeRemovedEvent { 3076 /** 3077 * Id of the node that has changed. 3078 */ 3079 nodeId: NodeId; 3080 /** 3081 * A ttribute name. 3082 */ 3083 name: string; 3084 } 3085 3086 /** 3087 * Mirrors `DOMCharacterDataModified` event. 3088 */ 3089 export interface CharacterDataModifiedEvent { 3090 /** 3091 * Id of the node that has changed. 3092 */ 3093 nodeId: NodeId; 3094 /** 3095 * New text value. 3096 */ 3097 characterData: string; 3098 } 3099 3100 /** 3101 * Fired when `Container`'s child node count has changed. 3102 */ 3103 export interface ChildNodeCountUpdatedEvent { 3104 /** 3105 * Id of the node that has changed. 3106 */ 3107 nodeId: NodeId; 3108 /** 3109 * New node count. 3110 */ 3111 childNodeCount: integer; 3112 } 3113 3114 /** 3115 * Mirrors `DOMNodeInserted` event. 3116 */ 3117 export interface ChildNodeInsertedEvent { 3118 /** 3119 * Id of the node that has changed. 3120 */ 3121 parentNodeId: NodeId; 3122 /** 3123 * If of the previous siblint. 3124 */ 3125 previousNodeId: NodeId; 3126 /** 3127 * Inserted node data. 3128 */ 3129 node: Node; 3130 } 3131 3132 /** 3133 * Mirrors `DOMNodeRemoved` event. 3134 */ 3135 export interface ChildNodeRemovedEvent { 3136 /** 3137 * Parent id. 3138 */ 3139 parentNodeId: NodeId; 3140 /** 3141 * Id of the node that has been removed. 3142 */ 3143 nodeId: NodeId; 3144 } 3145 3146 /** 3147 * Called when distrubution is changed. 3148 */ 3149 export interface DistributedNodesUpdatedEvent { 3150 /** 3151 * Insertion point where distrubuted nodes were updated. 3152 */ 3153 insertionPointId: NodeId; 3154 /** 3155 * Distributed nodes for given insertion point. 3156 */ 3157 distributedNodes: BackendNode[]; 3158 } 3159 3160 /** 3161 * Fired when `Element`'s inline style is modified via a CSS property modification. 3162 */ 3163 export interface InlineStyleInvalidatedEvent { 3164 /** 3165 * Ids of the nodes for which the inline styles have been invalidated. 3166 */ 3167 nodeIds: NodeId[]; 3168 } 3169 3170 /** 3171 * Called when a pseudo element is added to an element. 3172 */ 3173 export interface PseudoElementAddedEvent { 3174 /** 3175 * Pseudo element's parent element id. 3176 */ 3177 parentId: NodeId; 3178 /** 3179 * The added pseudo element. 3180 */ 3181 pseudoElement: Node; 3182 } 3183 3184 /** 3185 * Called when a pseudo element is removed from an element. 3186 */ 3187 export interface PseudoElementRemovedEvent { 3188 /** 3189 * Pseudo element's parent element id. 3190 */ 3191 parentId: NodeId; 3192 /** 3193 * The removed pseudo element id. 3194 */ 3195 pseudoElementId: NodeId; 3196 } 3197 3198 /** 3199 * Fired when backend wants to provide client with the missing DOM structure. This happens upon 3200 * most of the calls requesting node ids. 3201 */ 3202 export interface SetChildNodesEvent { 3203 /** 3204 * Parent node id to populate with children. 3205 */ 3206 parentId: NodeId; 3207 /** 3208 * Child nodes array. 3209 */ 3210 nodes: Node[]; 3211 } 3212 3213 /** 3214 * Called when shadow root is popped from the element. 3215 */ 3216 export interface ShadowRootPoppedEvent { 3217 /** 3218 * Host element id. 3219 */ 3220 hostId: NodeId; 3221 /** 3222 * Shadow root id. 3223 */ 3224 rootId: NodeId; 3225 } 3226 3227 /** 3228 * Called when shadow root is pushed into the element. 3229 */ 3230 export interface ShadowRootPushedEvent { 3231 /** 3232 * Host element id. 3233 */ 3234 hostId: NodeId; 3235 /** 3236 * Shadow root. 3237 */ 3238 root: Node; 3239 } 3240 } 3241 3242 /** 3243 * DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript 3244 * execution will stop on these operations as if there was a regular breakpoint set. 3245 */ 3246 export namespace DOMDebugger { 3247 3248 /** 3249 * DOM breakpoint type. 3250 */ 3251 export enum DOMBreakpointType { 3252 SubtreeModified = 'subtree-modified', 3253 AttributeModified = 'attribute-modified', 3254 NodeRemoved = 'node-removed', 3255 } 3256 3257 /** 3258 * Object event listener. 3259 */ 3260 export interface EventListener { 3261 /** 3262 * `EventListener`'s type. 3263 */ 3264 type: string; 3265 /** 3266 * `EventListener`'s useCapture. 3267 */ 3268 useCapture: boolean; 3269 /** 3270 * `EventListener`'s passive flag. 3271 */ 3272 passive: boolean; 3273 /** 3274 * `EventListener`'s once flag. 3275 */ 3276 once: boolean; 3277 /** 3278 * Script id of the handler code. 3279 */ 3280 scriptId: Runtime.ScriptId; 3281 /** 3282 * Line number in the script (0-based). 3283 */ 3284 lineNumber: integer; 3285 /** 3286 * Column number in the script (0-based). 3287 */ 3288 columnNumber: integer; 3289 /** 3290 * Event handler function value. 3291 */ 3292 handler?: Runtime.RemoteObject; 3293 /** 3294 * Event original handler function value. 3295 */ 3296 originalHandler?: Runtime.RemoteObject; 3297 /** 3298 * Node the listener is added to (if any). 3299 */ 3300 backendNodeId?: DOM.BackendNodeId; 3301 } 3302 3303 export interface GetEventListenersRequest { 3304 /** 3305 * Identifier of the object to return listeners for. 3306 */ 3307 objectId: Runtime.RemoteObjectId; 3308 /** 3309 * The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the 3310 * entire subtree or provide an integer larger than 0. 3311 */ 3312 depth?: integer; 3313 /** 3314 * Whether or not iframes and shadow roots should be traversed when returning the subtree 3315 * (default is false). Reports listeners for all contexts if pierce is enabled. 3316 */ 3317 pierce?: boolean; 3318 } 3319 3320 export interface GetEventListenersResponse { 3321 /** 3322 * Array of relevant listeners. 3323 */ 3324 listeners: EventListener[]; 3325 } 3326 3327 export interface RemoveDOMBreakpointRequest { 3328 /** 3329 * Identifier of the node to remove breakpoint from. 3330 */ 3331 nodeId: DOM.NodeId; 3332 /** 3333 * Type of the breakpoint to remove. 3334 */ 3335 type: DOMBreakpointType; 3336 } 3337 3338 export interface RemoveEventListenerBreakpointRequest { 3339 /** 3340 * Event name. 3341 */ 3342 eventName: string; 3343 /** 3344 * EventTarget interface name. 3345 */ 3346 targetName?: string; 3347 } 3348 3349 export interface RemoveInstrumentationBreakpointRequest { 3350 /** 3351 * Instrumentation name to stop on. 3352 */ 3353 eventName: string; 3354 } 3355 3356 export interface RemoveXHRBreakpointRequest { 3357 /** 3358 * Resource URL substring. 3359 */ 3360 url: string; 3361 } 3362 3363 export interface SetDOMBreakpointRequest { 3364 /** 3365 * Identifier of the node to set breakpoint on. 3366 */ 3367 nodeId: DOM.NodeId; 3368 /** 3369 * Type of the operation to stop upon. 3370 */ 3371 type: DOMBreakpointType; 3372 } 3373 3374 export interface SetEventListenerBreakpointRequest { 3375 /** 3376 * DOM Event name to stop on (any DOM event will do). 3377 */ 3378 eventName: string; 3379 /** 3380 * EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any 3381 * EventTarget. 3382 */ 3383 targetName?: string; 3384 } 3385 3386 export interface SetInstrumentationBreakpointRequest { 3387 /** 3388 * Instrumentation name to stop on. 3389 */ 3390 eventName: string; 3391 } 3392 3393 export interface SetXHRBreakpointRequest { 3394 /** 3395 * Resource URL substring. All XHRs having this substring in the URL will get stopped upon. 3396 */ 3397 url: string; 3398 } 3399 } 3400 3401 /** 3402 * This domain facilitates obtaining document snapshots with DOM, layout, and style information. 3403 */ 3404 export namespace DOMSnapshot { 3405 3406 /** 3407 * A Node in the DOM tree. 3408 */ 3409 export interface DOMNode { 3410 /** 3411 * `Node`'s nodeType. 3412 */ 3413 nodeType: integer; 3414 /** 3415 * `Node`'s nodeName. 3416 */ 3417 nodeName: string; 3418 /** 3419 * `Node`'s nodeValue. 3420 */ 3421 nodeValue: string; 3422 /** 3423 * Only set for textarea elements, contains the text value. 3424 */ 3425 textValue?: string; 3426 /** 3427 * Only set for input elements, contains the input's associated text value. 3428 */ 3429 inputValue?: string; 3430 /** 3431 * Only set for radio and checkbox input elements, indicates if the element has been checked 3432 */ 3433 inputChecked?: boolean; 3434 /** 3435 * Only set for option elements, indicates if the element has been selected 3436 */ 3437 optionSelected?: boolean; 3438 /** 3439 * `Node`'s id, corresponds to DOM.Node.backendNodeId. 3440 */ 3441 backendNodeId: DOM.BackendNodeId; 3442 /** 3443 * The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if 3444 * any. 3445 */ 3446 childNodeIndexes?: integer[]; 3447 /** 3448 * Attributes of an `Element` node. 3449 */ 3450 attributes?: NameValue[]; 3451 /** 3452 * Indexes of pseudo elements associated with this node in the `domNodes` array returned by 3453 * `getSnapshot`, if any. 3454 */ 3455 pseudoElementIndexes?: integer[]; 3456 /** 3457 * The index of the node's related layout tree node in the `layoutTreeNodes` array returned by 3458 * `getSnapshot`, if any. 3459 */ 3460 layoutNodeIndex?: integer; 3461 /** 3462 * Document URL that `Document` or `FrameOwner` node points to. 3463 */ 3464 documentURL?: string; 3465 /** 3466 * Base URL that `Document` or `FrameOwner` node uses for URL completion. 3467 */ 3468 baseURL?: string; 3469 /** 3470 * Only set for documents, contains the document's content language. 3471 */ 3472 contentLanguage?: string; 3473 /** 3474 * Only set for documents, contains the document's character set encoding. 3475 */ 3476 documentEncoding?: string; 3477 /** 3478 * `DocumentType` node's publicId. 3479 */ 3480 publicId?: string; 3481 /** 3482 * `DocumentType` node's systemId. 3483 */ 3484 systemId?: string; 3485 /** 3486 * Frame ID for frame owner elements and also for the document node. 3487 */ 3488 frameId?: Page.FrameId; 3489 /** 3490 * The index of a frame owner element's content document in the `domNodes` array returned by 3491 * `getSnapshot`, if any. 3492 */ 3493 contentDocumentIndex?: integer; 3494 /** 3495 * Type of a pseudo element node. 3496 */ 3497 pseudoType?: DOM.PseudoType; 3498 /** 3499 * Shadow root type. 3500 */ 3501 shadowRootType?: DOM.ShadowRootType; 3502 /** 3503 * Whether this DOM node responds to mouse clicks. This includes nodes that have had click 3504 * event listeners attached via JavaScript as well as anchor tags that naturally navigate when 3505 * clicked. 3506 */ 3507 isClickable?: boolean; 3508 /** 3509 * Details of the node's event listeners, if any. 3510 */ 3511 eventListeners?: DOMDebugger.EventListener[]; 3512 /** 3513 * The selected url for nodes with a srcset attribute. 3514 */ 3515 currentSourceURL?: string; 3516 /** 3517 * The url of the script (if any) that generates this node. 3518 */ 3519 originURL?: string; 3520 /** 3521 * Scroll offsets, set when this node is a Document. 3522 */ 3523 scrollOffsetX?: number; 3524 scrollOffsetY?: number; 3525 } 3526 3527 /** 3528 * Details of post layout rendered text positions. The exact layout should not be regarded as 3529 * stable and may change between versions. 3530 */ 3531 export interface InlineTextBox { 3532 /** 3533 * The bounding box in document coordinates. Note that scroll offset of the document is ignored. 3534 */ 3535 boundingBox: DOM.Rect; 3536 /** 3537 * The starting index in characters, for this post layout textbox substring. Characters that 3538 * would be represented as a surrogate pair in UTF-16 have length 2. 3539 */ 3540 startCharacterIndex: integer; 3541 /** 3542 * The number of characters in this post layout textbox substring. Characters that would be 3543 * represented as a surrogate pair in UTF-16 have length 2. 3544 */ 3545 numCharacters: integer; 3546 } 3547 3548 /** 3549 * Details of an element in the DOM tree with a LayoutObject. 3550 */ 3551 export interface LayoutTreeNode { 3552 /** 3553 * The index of the related DOM node in the `domNodes` array returned by `getSnapshot`. 3554 */ 3555 domNodeIndex: integer; 3556 /** 3557 * The bounding box in document coordinates. Note that scroll offset of the document is ignored. 3558 */ 3559 boundingBox: DOM.Rect; 3560 /** 3561 * Contents of the LayoutText, if any. 3562 */ 3563 layoutText?: string; 3564 /** 3565 * The post-layout inline text nodes, if any. 3566 */ 3567 inlineTextNodes?: InlineTextBox[]; 3568 /** 3569 * Index into the `computedStyles` array returned by `getSnapshot`. 3570 */ 3571 styleIndex?: integer; 3572 /** 3573 * Global paint order index, which is determined by the stacking order of the nodes. Nodes 3574 * that are painted together will have the same index. Only provided if includePaintOrder in 3575 * getSnapshot was true. 3576 */ 3577 paintOrder?: integer; 3578 /** 3579 * Set to true to indicate the element begins a new stacking context. 3580 */ 3581 isStackingContext?: boolean; 3582 } 3583 3584 /** 3585 * A subset of the full ComputedStyle as defined by the request whitelist. 3586 */ 3587 export interface ComputedStyle { 3588 /** 3589 * Name/value pairs of computed style properties. 3590 */ 3591 properties: NameValue[]; 3592 } 3593 3594 /** 3595 * A name/value pair. 3596 */ 3597 export interface NameValue { 3598 /** 3599 * Attribute/property name. 3600 */ 3601 name: string; 3602 /** 3603 * Attribute/property value. 3604 */ 3605 value: string; 3606 } 3607 3608 /** 3609 * Index of the string in the strings table. 3610 */ 3611 export type StringIndex = integer; 3612 3613 /** 3614 * Index of the string in the strings table. 3615 */ 3616 export type ArrayOfStrings = StringIndex[]; 3617 3618 /** 3619 * Data that is only present on rare nodes. 3620 */ 3621 export interface RareStringData { 3622 index: integer[]; 3623 value: StringIndex[]; 3624 } 3625 3626 export interface RareBooleanData { 3627 index: integer[]; 3628 } 3629 3630 export interface RareIntegerData { 3631 index: integer[]; 3632 value: integer[]; 3633 } 3634 3635 export type Rectangle = number[]; 3636 3637 /** 3638 * Document snapshot. 3639 */ 3640 export interface DocumentSnapshot { 3641 /** 3642 * Document URL that `Document` or `FrameOwner` node points to. 3643 */ 3644 documentURL: StringIndex; 3645 /** 3646 * Document title. 3647 */ 3648 title: StringIndex; 3649 /** 3650 * Base URL that `Document` or `FrameOwner` node uses for URL completion. 3651 */ 3652 baseURL: StringIndex; 3653 /** 3654 * Contains the document's content language. 3655 */ 3656 contentLanguage: StringIndex; 3657 /** 3658 * Contains the document's character set encoding. 3659 */ 3660 encodingName: StringIndex; 3661 /** 3662 * `DocumentType` node's publicId. 3663 */ 3664 publicId: StringIndex; 3665 /** 3666 * `DocumentType` node's systemId. 3667 */ 3668 systemId: StringIndex; 3669 /** 3670 * Frame ID for frame owner elements and also for the document node. 3671 */ 3672 frameId: StringIndex; 3673 /** 3674 * A table with dom nodes. 3675 */ 3676 nodes: NodeTreeSnapshot; 3677 /** 3678 * The nodes in the layout tree. 3679 */ 3680 layout: LayoutTreeSnapshot; 3681 /** 3682 * The post-layout inline text nodes. 3683 */ 3684 textBoxes: TextBoxSnapshot; 3685 /** 3686 * Horizontal scroll offset. 3687 */ 3688 scrollOffsetX?: number; 3689 /** 3690 * Vertical scroll offset. 3691 */ 3692 scrollOffsetY?: number; 3693 /** 3694 * Document content width. 3695 */ 3696 contentWidth?: number; 3697 /** 3698 * Document content height. 3699 */ 3700 contentHeight?: number; 3701 } 3702 3703 /** 3704 * Table containing nodes. 3705 */ 3706 export interface NodeTreeSnapshot { 3707 /** 3708 * Parent node index. 3709 */ 3710 parentIndex?: integer[]; 3711 /** 3712 * `Node`'s nodeType. 3713 */ 3714 nodeType?: integer[]; 3715 /** 3716 * `Node`'s nodeName. 3717 */ 3718 nodeName?: StringIndex[]; 3719 /** 3720 * `Node`'s nodeValue. 3721 */ 3722 nodeValue?: StringIndex[]; 3723 /** 3724 * `Node`'s id, corresponds to DOM.Node.backendNodeId. 3725 */ 3726 backendNodeId?: DOM.BackendNodeId[]; 3727 /** 3728 * Attributes of an `Element` node. Flatten name, value pairs. 3729 */ 3730 attributes?: ArrayOfStrings[]; 3731 /** 3732 * Only set for textarea elements, contains the text value. 3733 */ 3734 textValue?: RareStringData; 3735 /** 3736 * Only set for input elements, contains the input's associated text value. 3737 */ 3738 inputValue?: RareStringData; 3739 /** 3740 * Only set for radio and checkbox input elements, indicates if the element has been checked 3741 */ 3742 inputChecked?: RareBooleanData; 3743 /** 3744 * Only set for option elements, indicates if the element has been selected 3745 */ 3746 optionSelected?: RareBooleanData; 3747 /** 3748 * The index of the document in the list of the snapshot documents. 3749 */ 3750 contentDocumentIndex?: RareIntegerData; 3751 /** 3752 * Type of a pseudo element node. 3753 */ 3754 pseudoType?: RareStringData; 3755 /** 3756 * Whether this DOM node responds to mouse clicks. This includes nodes that have had click 3757 * event listeners attached via JavaScript as well as anchor tags that naturally navigate when 3758 * clicked. 3759 */ 3760 isClickable?: RareBooleanData; 3761 /** 3762 * The selected url for nodes with a srcset attribute. 3763 */ 3764 currentSourceURL?: RareStringData; 3765 /** 3766 * The url of the script (if any) that generates this node. 3767 */ 3768 originURL?: RareStringData; 3769 } 3770 3771 /** 3772 * Table of details of an element in the DOM tree with a LayoutObject. 3773 */ 3774 export interface LayoutTreeSnapshot { 3775 /** 3776 * Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`. 3777 */ 3778 nodeIndex: integer[]; 3779 /** 3780 * Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`. 3781 */ 3782 styles: ArrayOfStrings[]; 3783 /** 3784 * The absolute position bounding box. 3785 */ 3786 bounds: Rectangle[]; 3787 /** 3788 * Contents of the LayoutText, if any. 3789 */ 3790 text: StringIndex[]; 3791 /** 3792 * Stacking context information. 3793 */ 3794 stackingContexts: RareBooleanData; 3795 /** 3796 * Global paint order index, which is determined by the stacking order of the nodes. Nodes 3797 * that are painted together will have the same index. Only provided if includePaintOrder in 3798 * captureSnapshot was true. 3799 */ 3800 paintOrders?: integer[]; 3801 /** 3802 * The offset rect of nodes. Only available when includeDOMRects is set to true 3803 */ 3804 offsetRects?: Rectangle[]; 3805 /** 3806 * The scroll rect of nodes. Only available when includeDOMRects is set to true 3807 */ 3808 scrollRects?: Rectangle[]; 3809 /** 3810 * The client rect of nodes. Only available when includeDOMRects is set to true 3811 */ 3812 clientRects?: Rectangle[]; 3813 } 3814 3815 /** 3816 * Table of details of the post layout rendered text positions. The exact layout should not be regarded as 3817 * stable and may change between versions. 3818 */ 3819 export interface TextBoxSnapshot { 3820 /** 3821 * Index of the layout tree node that owns this box collection. 3822 */ 3823 layoutIndex: integer[]; 3824 /** 3825 * The absolute position bounding box. 3826 */ 3827 bounds: Rectangle[]; 3828 /** 3829 * The starting index in characters, for this post layout textbox substring. Characters that 3830 * would be represented as a surrogate pair in UTF-16 have length 2. 3831 */ 3832 start: integer[]; 3833 /** 3834 * The number of characters in this post layout textbox substring. Characters that would be 3835 * represented as a surrogate pair in UTF-16 have length 2. 3836 */ 3837 length: integer[]; 3838 } 3839 3840 export interface GetSnapshotRequest { 3841 /** 3842 * Whitelist of computed styles to return. 3843 */ 3844 computedStyleWhitelist: string[]; 3845 /** 3846 * Whether or not to retrieve details of DOM listeners (default false). 3847 */ 3848 includeEventListeners?: boolean; 3849 /** 3850 * Whether to determine and include the paint order index of LayoutTreeNodes (default false). 3851 */ 3852 includePaintOrder?: boolean; 3853 /** 3854 * Whether to include UA shadow tree in the snapshot (default false). 3855 */ 3856 includeUserAgentShadowTree?: boolean; 3857 } 3858 3859 export interface GetSnapshotResponse { 3860 /** 3861 * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. 3862 */ 3863 domNodes: DOMNode[]; 3864 /** 3865 * The nodes in the layout tree. 3866 */ 3867 layoutTreeNodes: LayoutTreeNode[]; 3868 /** 3869 * Whitelisted ComputedStyle properties for each node in the layout tree. 3870 */ 3871 computedStyles: ComputedStyle[]; 3872 } 3873 3874 export interface CaptureSnapshotRequest { 3875 /** 3876 * Whitelist of computed styles to return. 3877 */ 3878 computedStyles: string[]; 3879 /** 3880 * Whether to include layout object paint orders into the snapshot. 3881 */ 3882 includePaintOrder?: boolean; 3883 /** 3884 * Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot 3885 */ 3886 includeDOMRects?: boolean; 3887 } 3888 3889 export interface CaptureSnapshotResponse { 3890 /** 3891 * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. 3892 */ 3893 documents: DocumentSnapshot[]; 3894 /** 3895 * Shared string table that all string properties refer to with indexes. 3896 */ 3897 strings: string[]; 3898 } 3899 } 3900 3901 /** 3902 * Query and modify DOM storage. 3903 */ 3904 export namespace DOMStorage { 3905 3906 /** 3907 * DOM Storage identifier. 3908 */ 3909 export interface StorageId { 3910 /** 3911 * Security origin for the storage. 3912 */ 3913 securityOrigin: string; 3914 /** 3915 * Whether the storage is local storage (not session storage). 3916 */ 3917 isLocalStorage: boolean; 3918 } 3919 3920 /** 3921 * DOM Storage item. 3922 */ 3923 export type Item = string[]; 3924 3925 export interface ClearRequest { 3926 storageId: StorageId; 3927 } 3928 3929 export interface GetDOMStorageItemsRequest { 3930 storageId: StorageId; 3931 } 3932 3933 export interface GetDOMStorageItemsResponse { 3934 entries: Item[]; 3935 } 3936 3937 export interface RemoveDOMStorageItemRequest { 3938 storageId: StorageId; 3939 key: string; 3940 } 3941 3942 export interface SetDOMStorageItemRequest { 3943 storageId: StorageId; 3944 key: string; 3945 value: string; 3946 } 3947 3948 export interface DomStorageItemAddedEvent { 3949 storageId: StorageId; 3950 key: string; 3951 newValue: string; 3952 } 3953 3954 export interface DomStorageItemRemovedEvent { 3955 storageId: StorageId; 3956 key: string; 3957 } 3958 3959 export interface DomStorageItemUpdatedEvent { 3960 storageId: StorageId; 3961 key: string; 3962 oldValue: string; 3963 newValue: string; 3964 } 3965 3966 export interface DomStorageItemsClearedEvent { 3967 storageId: StorageId; 3968 } 3969 } 3970 3971 export namespace Database { 3972 3973 /** 3974 * Unique identifier of Database object. 3975 */ 3976 export type DatabaseId = string; 3977 3978 /** 3979 * Database object. 3980 */ 3981 export interface Database { 3982 /** 3983 * Database ID. 3984 */ 3985 id: DatabaseId; 3986 /** 3987 * Database domain. 3988 */ 3989 domain: string; 3990 /** 3991 * Database name. 3992 */ 3993 name: string; 3994 /** 3995 * Database version. 3996 */ 3997 version: string; 3998 } 3999 4000 /** 4001 * Database error. 4002 */ 4003 export interface Error { 4004 /** 4005 * Error message. 4006 */ 4007 message: string; 4008 /** 4009 * Error code. 4010 */ 4011 code: integer; 4012 } 4013 4014 export interface ExecuteSQLRequest { 4015 databaseId: DatabaseId; 4016 query: string; 4017 } 4018 4019 export interface ExecuteSQLResponse { 4020 columnNames?: string[]; 4021 values?: any[]; 4022 sqlError?: Error; 4023 } 4024 4025 export interface GetDatabaseTableNamesRequest { 4026 databaseId: DatabaseId; 4027 } 4028 4029 export interface GetDatabaseTableNamesResponse { 4030 tableNames: string[]; 4031 } 4032 4033 export interface AddDatabaseEvent { 4034 database: Database; 4035 } 4036 } 4037 4038 export namespace DeviceOrientation { 4039 4040 export interface SetDeviceOrientationOverrideRequest { 4041 /** 4042 * Mock alpha 4043 */ 4044 alpha: number; 4045 /** 4046 * Mock beta 4047 */ 4048 beta: number; 4049 /** 4050 * Mock gamma 4051 */ 4052 gamma: number; 4053 } 4054 } 4055 4056 /** 4057 * This domain emulates different environments for the page. 4058 */ 4059 export namespace Emulation { 4060 4061 export enum ScreenOrientationType { 4062 PortraitPrimary = 'portraitPrimary', 4063 PortraitSecondary = 'portraitSecondary', 4064 LandscapePrimary = 'landscapePrimary', 4065 LandscapeSecondary = 'landscapeSecondary', 4066 } 4067 4068 /** 4069 * Screen orientation. 4070 */ 4071 export interface ScreenOrientation { 4072 /** 4073 * Orientation type. 4074 */ 4075 type: ScreenOrientationType; 4076 /** 4077 * Orientation angle. 4078 */ 4079 angle: integer; 4080 } 4081 4082 export interface MediaFeature { 4083 name: string; 4084 value: string; 4085 } 4086 4087 /** 4088 * advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to 4089 * allow the next delayed task (if any) to run; pause: The virtual time base may not advance; 4090 * pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending 4091 * resource fetches. 4092 */ 4093 export enum VirtualTimePolicy { 4094 Advance = 'advance', 4095 Pause = 'pause', 4096 PauseIfNetworkFetchesPending = 'pauseIfNetworkFetchesPending', 4097 } 4098 4099 export interface CanEmulateResponse { 4100 /** 4101 * True if emulation is supported. 4102 */ 4103 result: boolean; 4104 } 4105 4106 export interface SetFocusEmulationEnabledRequest { 4107 /** 4108 * Whether to enable to disable focus emulation. 4109 */ 4110 enabled: boolean; 4111 } 4112 4113 export interface SetCPUThrottlingRateRequest { 4114 /** 4115 * Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). 4116 */ 4117 rate: number; 4118 } 4119 4120 export interface SetDefaultBackgroundColorOverrideRequest { 4121 /** 4122 * RGBA of the default background color. If not specified, any existing override will be 4123 * cleared. 4124 */ 4125 color?: DOM.RGBA; 4126 } 4127 4128 export interface SetDeviceMetricsOverrideRequest { 4129 /** 4130 * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. 4131 */ 4132 width: integer; 4133 /** 4134 * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. 4135 */ 4136 height: integer; 4137 /** 4138 * Overriding device scale factor value. 0 disables the override. 4139 */ 4140 deviceScaleFactor: number; 4141 /** 4142 * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text 4143 * autosizing and more. 4144 */ 4145 mobile: boolean; 4146 /** 4147 * Scale to apply to resulting view image. 4148 */ 4149 scale?: number; 4150 /** 4151 * Overriding screen width value in pixels (minimum 0, maximum 10000000). 4152 */ 4153 screenWidth?: integer; 4154 /** 4155 * Overriding screen height value in pixels (minimum 0, maximum 10000000). 4156 */ 4157 screenHeight?: integer; 4158 /** 4159 * Overriding view X position on screen in pixels (minimum 0, maximum 10000000). 4160 */ 4161 positionX?: integer; 4162 /** 4163 * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). 4164 */ 4165 positionY?: integer; 4166 /** 4167 * Do not set visible view size, rely upon explicit setVisibleSize call. 4168 */ 4169 dontSetVisibleSize?: boolean; 4170 /** 4171 * Screen orientation override. 4172 */ 4173 screenOrientation?: ScreenOrientation; 4174 /** 4175 * If set, the visible area of the page will be overridden to this viewport. This viewport 4176 * change is not observed by the page, e.g. viewport-relative elements do not change positions. 4177 */ 4178 viewport?: Page.Viewport; 4179 } 4180 4181 export interface SetScrollbarsHiddenRequest { 4182 /** 4183 * Whether scrollbars should be always hidden. 4184 */ 4185 hidden: boolean; 4186 } 4187 4188 export interface SetDocumentCookieDisabledRequest { 4189 /** 4190 * Whether document.coookie API should be disabled. 4191 */ 4192 disabled: boolean; 4193 } 4194 4195 export enum SetEmitTouchEventsForMouseRequestConfiguration { 4196 Mobile = 'mobile', 4197 Desktop = 'desktop', 4198 } 4199 4200 export interface SetEmitTouchEventsForMouseRequest { 4201 /** 4202 * Whether touch emulation based on mouse input should be enabled. 4203 */ 4204 enabled: boolean; 4205 /** 4206 * Touch/gesture events configuration. Default: current platform. 4207 */ 4208 configuration?: SetEmitTouchEventsForMouseRequestConfiguration; 4209 } 4210 4211 export interface SetEmulatedMediaRequest { 4212 /** 4213 * Media type to emulate. Empty string disables the override. 4214 */ 4215 media?: string; 4216 /** 4217 * Media features to emulate. 4218 */ 4219 features?: MediaFeature[]; 4220 } 4221 4222 export enum SetEmulatedVisionDeficiencyRequestType { 4223 None = 'none', 4224 Achromatomaly = 'achromatomaly', 4225 Achromatopsia = 'achromatopsia', 4226 BlurredVision = 'blurredVision', 4227 Deuteranomaly = 'deuteranomaly', 4228 Deuteranopia = 'deuteranopia', 4229 Protanomaly = 'protanomaly', 4230 Protanopia = 'protanopia', 4231 Tritanomaly = 'tritanomaly', 4232 Tritanopia = 'tritanopia', 4233 } 4234 4235 export interface SetEmulatedVisionDeficiencyRequest { 4236 /** 4237 * Vision deficiency to emulate. 4238 */ 4239 type: SetEmulatedVisionDeficiencyRequestType; 4240 } 4241 4242 export interface SetGeolocationOverrideRequest { 4243 /** 4244 * Mock latitude 4245 */ 4246 latitude?: number; 4247 /** 4248 * Mock longitude 4249 */ 4250 longitude?: number; 4251 /** 4252 * Mock accuracy 4253 */ 4254 accuracy?: number; 4255 } 4256 4257 export interface SetNavigatorOverridesRequest { 4258 /** 4259 * The platform navigator.platform should return. 4260 */ 4261 platform: string; 4262 } 4263 4264 export interface SetPageScaleFactorRequest { 4265 /** 4266 * Page scale factor. 4267 */ 4268 pageScaleFactor: number; 4269 } 4270 4271 export interface SetScriptExecutionDisabledRequest { 4272 /** 4273 * Whether script execution should be disabled in the page. 4274 */ 4275 value: boolean; 4276 } 4277 4278 export interface SetTouchEmulationEnabledRequest { 4279 /** 4280 * Whether the touch event emulation should be enabled. 4281 */ 4282 enabled: boolean; 4283 /** 4284 * Maximum touch points supported. Defaults to one. 4285 */ 4286 maxTouchPoints?: integer; 4287 } 4288 4289 export interface SetVirtualTimePolicyRequest { 4290 policy: VirtualTimePolicy; 4291 /** 4292 * If set, after this many virtual milliseconds have elapsed virtual time will be paused and a 4293 * virtualTimeBudgetExpired event is sent. 4294 */ 4295 budget?: number; 4296 /** 4297 * If set this specifies the maximum number of tasks that can be run before virtual is forced 4298 * forwards to prevent deadlock. 4299 */ 4300 maxVirtualTimeTaskStarvationCount?: integer; 4301 /** 4302 * If set the virtual time policy change should be deferred until any frame starts navigating. 4303 * Note any previous deferred policy change is superseded. 4304 */ 4305 waitForNavigation?: boolean; 4306 /** 4307 * If set, base::Time::Now will be overriden to initially return this value. 4308 */ 4309 initialVirtualTime?: Network.TimeSinceEpoch; 4310 } 4311 4312 export interface SetVirtualTimePolicyResponse { 4313 /** 4314 * Absolute timestamp at which virtual time was first enabled (up time in milliseconds). 4315 */ 4316 virtualTimeTicksBase: number; 4317 } 4318 4319 export interface SetLocaleOverrideRequest { 4320 /** 4321 * ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and 4322 * restores default host system locale. 4323 */ 4324 locale?: string; 4325 } 4326 4327 export interface SetTimezoneOverrideRequest { 4328 /** 4329 * The timezone identifier. If empty, disables the override and 4330 * restores default host system timezone. 4331 */ 4332 timezoneId: string; 4333 } 4334 4335 export interface SetVisibleSizeRequest { 4336 /** 4337 * Frame width (DIP). 4338 */ 4339 width: integer; 4340 /** 4341 * Frame height (DIP). 4342 */ 4343 height: integer; 4344 } 4345 4346 export interface SetUserAgentOverrideRequest { 4347 /** 4348 * User agent to use. 4349 */ 4350 userAgent: string; 4351 /** 4352 * Browser langugage to emulate. 4353 */ 4354 acceptLanguage?: string; 4355 /** 4356 * The platform navigator.platform should return. 4357 */ 4358 platform?: string; 4359 } 4360 } 4361 4362 /** 4363 * This domain provides experimental commands only supported in headless mode. 4364 */ 4365 export namespace HeadlessExperimental { 4366 4367 export enum ScreenshotParamsFormat { 4368 Jpeg = 'jpeg', 4369 Png = 'png', 4370 } 4371 4372 /** 4373 * Encoding options for a screenshot. 4374 */ 4375 export interface ScreenshotParams { 4376 /** 4377 * Image compression format (defaults to png). 4378 */ 4379 format?: ScreenshotParamsFormat; 4380 /** 4381 * Compression quality from range [0..100] (jpeg only). 4382 */ 4383 quality?: integer; 4384 } 4385 4386 export interface BeginFrameRequest { 4387 /** 4388 * Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, 4389 * the current time will be used. 4390 */ 4391 frameTimeTicks?: number; 4392 /** 4393 * The interval between BeginFrames that is reported to the compositor, in milliseconds. 4394 * Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds. 4395 */ 4396 interval?: number; 4397 /** 4398 * Whether updates should not be committed and drawn onto the display. False by default. If 4399 * true, only side effects of the BeginFrame will be run, such as layout and animations, but 4400 * any visual updates may not be visible on the display or in screenshots. 4401 */ 4402 noDisplayUpdates?: boolean; 4403 /** 4404 * If set, a screenshot of the frame will be captured and returned in the response. Otherwise, 4405 * no screenshot will be captured. Note that capturing a screenshot can fail, for example, 4406 * during renderer initialization. In such a case, no screenshot data will be returned. 4407 */ 4408 screenshot?: ScreenshotParams; 4409 } 4410 4411 export interface BeginFrameResponse { 4412 /** 4413 * Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the 4414 * display. Reported for diagnostic uses, may be removed in the future. 4415 */ 4416 hasDamage: boolean; 4417 /** 4418 * Base64-encoded image data of the screenshot, if one was requested and successfully taken. 4419 */ 4420 screenshotData?: binary; 4421 } 4422 4423 /** 4424 * Issued when the target starts or stops needing BeginFrames. 4425 * Deprecated. Issue beginFrame unconditionally instead and use result from 4426 * beginFrame to detect whether the frames were suppressed. 4427 */ 4428 export interface NeedsBeginFramesChangedEvent { 4429 /** 4430 * True if BeginFrames are needed, false otherwise. 4431 */ 4432 needsBeginFrames: boolean; 4433 } 4434 } 4435 4436 /** 4437 * Input/Output operations for streams produced by DevTools. 4438 */ 4439 export namespace IO { 4440 4441 /** 4442 * This is either obtained from another method or specifed as `blob:<uuid>` where 4443 * `<uuid>` is an UUID of a Blob. 4444 */ 4445 export type StreamHandle = string; 4446 4447 export interface CloseRequest { 4448 /** 4449 * Handle of the stream to close. 4450 */ 4451 handle: StreamHandle; 4452 } 4453 4454 export interface ReadRequest { 4455 /** 4456 * Handle of the stream to read. 4457 */ 4458 handle: StreamHandle; 4459 /** 4460 * Seek to the specified offset before reading (if not specificed, proceed with offset 4461 * following the last read). Some types of streams may only support sequential reads. 4462 */ 4463 offset?: integer; 4464 /** 4465 * Maximum number of bytes to read (left upon the agent discretion if not specified). 4466 */ 4467 size?: integer; 4468 } 4469 4470 export interface ReadResponse { 4471 /** 4472 * Set if the data is base64-encoded 4473 */ 4474 base64Encoded?: boolean; 4475 /** 4476 * Data that were read. 4477 */ 4478 data: string; 4479 /** 4480 * Set if the end-of-file condition occured while reading. 4481 */ 4482 eof: boolean; 4483 } 4484 4485 export interface ResolveBlobRequest { 4486 /** 4487 * Object id of a Blob object wrapper. 4488 */ 4489 objectId: Runtime.RemoteObjectId; 4490 } 4491 4492 export interface ResolveBlobResponse { 4493 /** 4494 * UUID of the specified Blob. 4495 */ 4496 uuid: string; 4497 } 4498 } 4499 4500 export namespace IndexedDB { 4501 4502 /** 4503 * Database with an array of object stores. 4504 */ 4505 export interface DatabaseWithObjectStores { 4506 /** 4507 * Database name. 4508 */ 4509 name: string; 4510 /** 4511 * Database version (type is not 'integer', as the standard 4512 * requires the version number to be 'unsigned long long') 4513 */ 4514 version: number; 4515 /** 4516 * Object stores in this database. 4517 */ 4518 objectStores: ObjectStore[]; 4519 } 4520 4521 /** 4522 * Object store. 4523 */ 4524 export interface ObjectStore { 4525 /** 4526 * Object store name. 4527 */ 4528 name: string; 4529 /** 4530 * Object store key path. 4531 */ 4532 keyPath: KeyPath; 4533 /** 4534 * If true, object store has auto increment flag set. 4535 */ 4536 autoIncrement: boolean; 4537 /** 4538 * Indexes in this object store. 4539 */ 4540 indexes: ObjectStoreIndex[]; 4541 } 4542 4543 /** 4544 * Object store index. 4545 */ 4546 export interface ObjectStoreIndex { 4547 /** 4548 * Index name. 4549 */ 4550 name: string; 4551 /** 4552 * Index key path. 4553 */ 4554 keyPath: KeyPath; 4555 /** 4556 * If true, index is unique. 4557 */ 4558 unique: boolean; 4559 /** 4560 * If true, index allows multiple entries for a key. 4561 */ 4562 multiEntry: boolean; 4563 } 4564 4565 export enum KeyType { 4566 Number = 'number', 4567 String = 'string', 4568 Date = 'date', 4569 Array = 'array', 4570 } 4571 4572 /** 4573 * Key. 4574 */ 4575 export interface Key { 4576 /** 4577 * Key type. 4578 */ 4579 type: KeyType; 4580 /** 4581 * Number value. 4582 */ 4583 number?: number; 4584 /** 4585 * String value. 4586 */ 4587 string?: string; 4588 /** 4589 * Date value. 4590 */ 4591 date?: number; 4592 /** 4593 * Array value. 4594 */ 4595 array?: Key[]; 4596 } 4597 4598 /** 4599 * Key range. 4600 */ 4601 export interface KeyRange { 4602 /** 4603 * Lower bound. 4604 */ 4605 lower?: Key; 4606 /** 4607 * Upper bound. 4608 */ 4609 upper?: Key; 4610 /** 4611 * If true lower bound is open. 4612 */ 4613 lowerOpen: boolean; 4614 /** 4615 * If true upper bound is open. 4616 */ 4617 upperOpen: boolean; 4618 } 4619 4620 /** 4621 * Data entry. 4622 */ 4623 export interface DataEntry { 4624 /** 4625 * Key object. 4626 */ 4627 key: Runtime.RemoteObject; 4628 /** 4629 * Primary key object. 4630 */ 4631 primaryKey: Runtime.RemoteObject; 4632 /** 4633 * Value object. 4634 */ 4635 value: Runtime.RemoteObject; 4636 } 4637 4638 export enum KeyPathType { 4639 Null = 'null', 4640 String = 'string', 4641 Array = 'array', 4642 } 4643 4644 /** 4645 * Key path. 4646 */ 4647 export interface KeyPath { 4648 /** 4649 * Key path type. 4650 */ 4651 type: KeyPathType; 4652 /** 4653 * String value. 4654 */ 4655 string?: string; 4656 /** 4657 * Array value. 4658 */ 4659 array?: string[]; 4660 } 4661 4662 export interface ClearObjectStoreRequest { 4663 /** 4664 * Security origin. 4665 */ 4666 securityOrigin: string; 4667 /** 4668 * Database name. 4669 */ 4670 databaseName: string; 4671 /** 4672 * Object store name. 4673 */ 4674 objectStoreName: string; 4675 } 4676 4677 export interface DeleteDatabaseRequest { 4678 /** 4679 * Security origin. 4680 */ 4681 securityOrigin: string; 4682 /** 4683 * Database name. 4684 */ 4685 databaseName: string; 4686 } 4687 4688 export interface DeleteObjectStoreEntriesRequest { 4689 securityOrigin: string; 4690 databaseName: string; 4691 objectStoreName: string; 4692 /** 4693 * Range of entry keys to delete 4694 */ 4695 keyRange: KeyRange; 4696 } 4697 4698 export interface RequestDataRequest { 4699 /** 4700 * Security origin. 4701 */ 4702 securityOrigin: string; 4703 /** 4704 * Database name. 4705 */ 4706 databaseName: string; 4707 /** 4708 * Object store name. 4709 */ 4710 objectStoreName: string; 4711 /** 4712 * Index name, empty string for object store data requests. 4713 */ 4714 indexName: string; 4715 /** 4716 * Number of records to skip. 4717 */ 4718 skipCount: integer; 4719 /** 4720 * Number of records to fetch. 4721 */ 4722 pageSize: integer; 4723 /** 4724 * Key range. 4725 */ 4726 keyRange?: KeyRange; 4727 } 4728 4729 export interface RequestDataResponse { 4730 /** 4731 * Array of object store data entries. 4732 */ 4733 objectStoreDataEntries: DataEntry[]; 4734 /** 4735 * If true, there are more entries to fetch in the given range. 4736 */ 4737 hasMore: boolean; 4738 } 4739 4740 export interface GetMetadataRequest { 4741 /** 4742 * Security origin. 4743 */ 4744 securityOrigin: string; 4745 /** 4746 * Database name. 4747 */ 4748 databaseName: string; 4749 /** 4750 * Object store name. 4751 */ 4752 objectStoreName: string; 4753 } 4754 4755 export interface GetMetadataResponse { 4756 /** 4757 * the entries count 4758 */ 4759 entriesCount: number; 4760 /** 4761 * the current value of key generator, to become the next inserted 4762 * key into the object store. Valid if objectStore.autoIncrement 4763 * is true. 4764 */ 4765 keyGeneratorValue: number; 4766 } 4767 4768 export interface RequestDatabaseRequest { 4769 /** 4770 * Security origin. 4771 */ 4772 securityOrigin: string; 4773 /** 4774 * Database name. 4775 */ 4776 databaseName: string; 4777 } 4778 4779 export interface RequestDatabaseResponse { 4780 /** 4781 * Database with an array of object stores. 4782 */ 4783 databaseWithObjectStores: DatabaseWithObjectStores; 4784 } 4785 4786 export interface RequestDatabaseNamesRequest { 4787 /** 4788 * Security origin. 4789 */ 4790 securityOrigin: string; 4791 } 4792 4793 export interface RequestDatabaseNamesResponse { 4794 /** 4795 * Database names for origin. 4796 */ 4797 databaseNames: string[]; 4798 } 4799 } 4800 4801 export namespace Input { 4802 4803 export interface TouchPoint { 4804 /** 4805 * X coordinate of the event relative to the main frame's viewport in CSS pixels. 4806 */ 4807 x: number; 4808 /** 4809 * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to 4810 * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. 4811 */ 4812 y: number; 4813 /** 4814 * X radius of the touch area (default: 1.0). 4815 */ 4816 radiusX?: number; 4817 /** 4818 * Y radius of the touch area (default: 1.0). 4819 */ 4820 radiusY?: number; 4821 /** 4822 * Rotation angle (default: 0.0). 4823 */ 4824 rotationAngle?: number; 4825 /** 4826 * Force (default: 1.0). 4827 */ 4828 force?: number; 4829 /** 4830 * Identifier used to track touch sources between events, must be unique within an event. 4831 */ 4832 id?: number; 4833 } 4834 4835 export enum GestureSourceType { 4836 Default = 'default', 4837 Touch = 'touch', 4838 Mouse = 'mouse', 4839 } 4840 4841 export enum MouseButton { 4842 None = 'none', 4843 Left = 'left', 4844 Middle = 'middle', 4845 Right = 'right', 4846 Back = 'back', 4847 Forward = 'forward', 4848 } 4849 4850 /** 4851 * UTC time in seconds, counted from January 1, 1970. 4852 */ 4853 export type TimeSinceEpoch = number; 4854 4855 export enum DispatchKeyEventRequestType { 4856 KeyDown = 'keyDown', 4857 KeyUp = 'keyUp', 4858 RawKeyDown = 'rawKeyDown', 4859 Char = 'char', 4860 } 4861 4862 export interface DispatchKeyEventRequest { 4863 /** 4864 * Type of the key event. 4865 */ 4866 type: DispatchKeyEventRequestType; 4867 /** 4868 * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 4869 * (default: 0). 4870 */ 4871 modifiers?: integer; 4872 /** 4873 * Time at which the event occurred. 4874 */ 4875 timestamp?: TimeSinceEpoch; 4876 /** 4877 * Text as generated by processing a virtual key code with a keyboard layout. Not needed for 4878 * for `keyUp` and `rawKeyDown` events (default: "") 4879 */ 4880 text?: string; 4881 /** 4882 * Text that would have been generated by the keyboard if no modifiers were pressed (except for 4883 * shift). Useful for shortcut (accelerator) key handling (default: ""). 4884 */ 4885 unmodifiedText?: string; 4886 /** 4887 * Unique key identifier (e.g., 'U+0041') (default: ""). 4888 */ 4889 keyIdentifier?: string; 4890 /** 4891 * Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). 4892 */ 4893 code?: string; 4894 /** 4895 * Unique DOM defined string value describing the meaning of the key in the context of active 4896 * modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). 4897 */ 4898 key?: string; 4899 /** 4900 * Windows virtual key code (default: 0). 4901 */ 4902 windowsVirtualKeyCode?: integer; 4903 /** 4904 * Native virtual key code (default: 0). 4905 */ 4906 nativeVirtualKeyCode?: integer; 4907 /** 4908 * Whether the event was generated from auto repeat (default: false). 4909 */ 4910 autoRepeat?: boolean; 4911 /** 4912 * Whether the event was generated from the keypad (default: false). 4913 */ 4914 isKeypad?: boolean; 4915 /** 4916 * Whether the event was a system key event (default: false). 4917 */ 4918 isSystemKey?: boolean; 4919 /** 4920 * Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 4921 * 0). 4922 */ 4923 location?: integer; 4924 } 4925 4926 export interface InsertTextRequest { 4927 /** 4928 * The text to insert. 4929 */ 4930 text: string; 4931 } 4932 4933 export enum DispatchMouseEventRequestType { 4934 MousePressed = 'mousePressed', 4935 MouseReleased = 'mouseReleased', 4936 MouseMoved = 'mouseMoved', 4937 MouseWheel = 'mouseWheel', 4938 } 4939 4940 export enum DispatchMouseEventRequestPointerType { 4941 Mouse = 'mouse', 4942 Pen = 'pen', 4943 } 4944 4945 export interface DispatchMouseEventRequest { 4946 /** 4947 * Type of the mouse event. 4948 */ 4949 type: DispatchMouseEventRequestType; 4950 /** 4951 * X coordinate of the event relative to the main frame's viewport in CSS pixels. 4952 */ 4953 x: number; 4954 /** 4955 * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to 4956 * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. 4957 */ 4958 y: number; 4959 /** 4960 * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 4961 * (default: 0). 4962 */ 4963 modifiers?: integer; 4964 /** 4965 * Time at which the event occurred. 4966 */ 4967 timestamp?: TimeSinceEpoch; 4968 /** 4969 * Mouse button (default: "none"). 4970 */ 4971 button?: MouseButton; 4972 /** 4973 * A number indicating which buttons are pressed on the mouse when a mouse event is triggered. 4974 * Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. 4975 */ 4976 buttons?: integer; 4977 /** 4978 * Number of times the mouse button was clicked (default: 0). 4979 */ 4980 clickCount?: integer; 4981 /** 4982 * X delta in CSS pixels for mouse wheel event (default: 0). 4983 */ 4984 deltaX?: number; 4985 /** 4986 * Y delta in CSS pixels for mouse wheel event (default: 0). 4987 */ 4988 deltaY?: number; 4989 /** 4990 * Pointer type (default: "mouse"). 4991 */ 4992 pointerType?: DispatchMouseEventRequestPointerType; 4993 } 4994 4995 export enum DispatchTouchEventRequestType { 4996 TouchStart = 'touchStart', 4997 TouchEnd = 'touchEnd', 4998 TouchMove = 'touchMove', 4999 TouchCancel = 'touchCancel', 5000 } 5001 5002 export interface DispatchTouchEventRequest { 5003 /** 5004 * Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while 5005 * TouchStart and TouchMove must contains at least one. 5006 */ 5007 type: DispatchTouchEventRequestType; 5008 /** 5009 * Active touch points on the touch device. One event per any changed point (compared to 5010 * previous touch event in a sequence) is generated, emulating pressing/moving/releasing points 5011 * one by one. 5012 */ 5013 touchPoints: TouchPoint[]; 5014 /** 5015 * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 5016 * (default: 0). 5017 */ 5018 modifiers?: integer; 5019 /** 5020 * Time at which the event occurred. 5021 */ 5022 timestamp?: TimeSinceEpoch; 5023 } 5024 5025 export enum EmulateTouchFromMouseEventRequestType { 5026 MousePressed = 'mousePressed', 5027 MouseReleased = 'mouseReleased', 5028 MouseMoved = 'mouseMoved', 5029 MouseWheel = 'mouseWheel', 5030 } 5031 5032 export interface EmulateTouchFromMouseEventRequest { 5033 /** 5034 * Type of the mouse event. 5035 */ 5036 type: EmulateTouchFromMouseEventRequestType; 5037 /** 5038 * X coordinate of the mouse pointer in DIP. 5039 */ 5040 x: integer; 5041 /** 5042 * Y coordinate of the mouse pointer in DIP. 5043 */ 5044 y: integer; 5045 /** 5046 * Mouse button. Only "none", "left", "right" are supported. 5047 */ 5048 button: MouseButton; 5049 /** 5050 * Time at which the event occurred (default: current time). 5051 */ 5052 timestamp?: TimeSinceEpoch; 5053 /** 5054 * X delta in DIP for mouse wheel event (default: 0). 5055 */ 5056 deltaX?: number; 5057 /** 5058 * Y delta in DIP for mouse wheel event (default: 0). 5059 */ 5060 deltaY?: number; 5061 /** 5062 * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 5063 * (default: 0). 5064 */ 5065 modifiers?: integer; 5066 /** 5067 * Number of times the mouse button was clicked (default: 0). 5068 */ 5069 clickCount?: integer; 5070 } 5071 5072 export interface SetIgnoreInputEventsRequest { 5073 /** 5074 * Ignores input events processing when set to true. 5075 */ 5076 ignore: boolean; 5077 } 5078 5079 export interface SynthesizePinchGestureRequest { 5080 /** 5081 * X coordinate of the start of the gesture in CSS pixels. 5082 */ 5083 x: number; 5084 /** 5085 * Y coordinate of the start of the gesture in CSS pixels. 5086 */ 5087 y: number; 5088 /** 5089 * Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). 5090 */ 5091 scaleFactor: number; 5092 /** 5093 * Relative pointer speed in pixels per second (default: 800). 5094 */ 5095 relativeSpeed?: integer; 5096 /** 5097 * Which type of input events to be generated (default: 'default', which queries the platform 5098 * for the preferred input type). 5099 */ 5100 gestureSourceType?: GestureSourceType; 5101 } 5102 5103 export interface SynthesizeScrollGestureRequest { 5104 /** 5105 * X coordinate of the start of the gesture in CSS pixels. 5106 */ 5107 x: number; 5108 /** 5109 * Y coordinate of the start of the gesture in CSS pixels. 5110 */ 5111 y: number; 5112 /** 5113 * The distance to scroll along the X axis (positive to scroll left). 5114 */ 5115 xDistance?: number; 5116 /** 5117 * The distance to scroll along the Y axis (positive to scroll up). 5118 */ 5119 yDistance?: number; 5120 /** 5121 * The number of additional pixels to scroll back along the X axis, in addition to the given 5122 * distance. 5123 */ 5124 xOverscroll?: number; 5125 /** 5126 * The number of additional pixels to scroll back along the Y axis, in addition to the given 5127 * distance. 5128 */ 5129 yOverscroll?: number; 5130 /** 5131 * Prevent fling (default: true). 5132 */ 5133 preventFling?: boolean; 5134 /** 5135 * Swipe speed in pixels per second (default: 800). 5136 */ 5137 speed?: integer; 5138 /** 5139 * Which type of input events to be generated (default: 'default', which queries the platform 5140 * for the preferred input type). 5141 */ 5142 gestureSourceType?: GestureSourceType; 5143 /** 5144 * The number of times to repeat the gesture (default: 0). 5145 */ 5146 repeatCount?: integer; 5147 /** 5148 * The number of milliseconds delay between each repeat. (default: 250). 5149 */ 5150 repeatDelayMs?: integer; 5151 /** 5152 * The name of the interaction markers to generate, if not empty (default: ""). 5153 */ 5154 interactionMarkerName?: string; 5155 } 5156 5157 export interface SynthesizeTapGestureRequest { 5158 /** 5159 * X coordinate of the start of the gesture in CSS pixels. 5160 */ 5161 x: number; 5162 /** 5163 * Y coordinate of the start of the gesture in CSS pixels. 5164 */ 5165 y: number; 5166 /** 5167 * Duration between touchdown and touchup events in ms (default: 50). 5168 */ 5169 duration?: integer; 5170 /** 5171 * Number of times to perform the tap (e.g. 2 for double tap, default: 1). 5172 */ 5173 tapCount?: integer; 5174 /** 5175 * Which type of input events to be generated (default: 'default', which queries the platform 5176 * for the preferred input type). 5177 */ 5178 gestureSourceType?: GestureSourceType; 5179 } 5180 } 5181 5182 export namespace Inspector { 5183 5184 /** 5185 * Fired when remote debugging connection is about to be terminated. Contains detach reason. 5186 */ 5187 export interface DetachedEvent { 5188 /** 5189 * The reason why connection has been terminated. 5190 */ 5191 reason: string; 5192 } 5193 } 5194 5195 export namespace LayerTree { 5196 5197 /** 5198 * Unique Layer identifier. 5199 */ 5200 export type LayerId = string; 5201 5202 /** 5203 * Unique snapshot identifier. 5204 */ 5205 export type SnapshotId = string; 5206 5207 export enum ScrollRectType { 5208 RepaintsOnScroll = 'RepaintsOnScroll', 5209 TouchEventHandler = 'TouchEventHandler', 5210 WheelEventHandler = 'WheelEventHandler', 5211 } 5212 5213 /** 5214 * Rectangle where scrolling happens on the main thread. 5215 */ 5216 export interface ScrollRect { 5217 /** 5218 * Rectangle itself. 5219 */ 5220 rect: DOM.Rect; 5221 /** 5222 * Reason for rectangle to force scrolling on the main thread 5223 */ 5224 type: ScrollRectType; 5225 } 5226 5227 /** 5228 * Sticky position constraints. 5229 */ 5230 export interface StickyPositionConstraint { 5231 /** 5232 * Layout rectangle of the sticky element before being shifted 5233 */ 5234 stickyBoxRect: DOM.Rect; 5235 /** 5236 * Layout rectangle of the containing block of the sticky element 5237 */ 5238 containingBlockRect: DOM.Rect; 5239 /** 5240 * The nearest sticky layer that shifts the sticky box 5241 */ 5242 nearestLayerShiftingStickyBox?: LayerId; 5243 /** 5244 * The nearest sticky layer that shifts the containing block 5245 */ 5246 nearestLayerShiftingContainingBlock?: LayerId; 5247 } 5248 5249 /** 5250 * Serialized fragment of layer picture along with its offset within the layer. 5251 */ 5252 export interface PictureTile { 5253 /** 5254 * Offset from owning layer left boundary 5255 */ 5256 x: number; 5257 /** 5258 * Offset from owning layer top boundary 5259 */ 5260 y: number; 5261 /** 5262 * Base64-encoded snapshot data. 5263 */ 5264 picture: binary; 5265 } 5266 5267 /** 5268 * Information about a compositing layer. 5269 */ 5270 export interface Layer { 5271 /** 5272 * The unique id for this layer. 5273 */ 5274 layerId: LayerId; 5275 /** 5276 * The id of parent (not present for root). 5277 */ 5278 parentLayerId?: LayerId; 5279 /** 5280 * The backend id for the node associated with this layer. 5281 */ 5282 backendNodeId?: DOM.BackendNodeId; 5283 /** 5284 * Offset from parent layer, X coordinate. 5285 */ 5286 offsetX: number; 5287 /** 5288 * Offset from parent layer, Y coordinate. 5289 */ 5290 offsetY: number; 5291 /** 5292 * Layer width. 5293 */ 5294 width: number; 5295 /** 5296 * Layer height. 5297 */ 5298 height: number; 5299 /** 5300 * Transformation matrix for layer, default is identity matrix 5301 */ 5302 transform?: number[]; 5303 /** 5304 * Transform anchor point X, absent if no transform specified 5305 */ 5306 anchorX?: number; 5307 /** 5308 * Transform anchor point Y, absent if no transform specified 5309 */ 5310 anchorY?: number; 5311 /** 5312 * Transform anchor point Z, absent if no transform specified 5313 */ 5314 anchorZ?: number; 5315 /** 5316 * Indicates how many time this layer has painted. 5317 */ 5318 paintCount: integer; 5319 /** 5320 * Indicates whether this layer hosts any content, rather than being used for 5321 * transform/scrolling purposes only. 5322 */ 5323 drawsContent: boolean; 5324 /** 5325 * Set if layer is not visible. 5326 */ 5327 invisible?: boolean; 5328 /** 5329 * Rectangles scrolling on main thread only. 5330 */ 5331 scrollRects?: ScrollRect[]; 5332 /** 5333 * Sticky position constraint information 5334 */ 5335 stickyPositionConstraint?: StickyPositionConstraint; 5336 } 5337 5338 /** 5339 * Array of timings, one per paint step. 5340 */ 5341 export type PaintProfile = number[]; 5342 5343 export interface CompositingReasonsRequest { 5344 /** 5345 * The id of the layer for which we want to get the reasons it was composited. 5346 */ 5347 layerId: LayerId; 5348 } 5349 5350 export interface CompositingReasonsResponse { 5351 /** 5352 * A list of strings specifying reasons for the given layer to become composited. 5353 */ 5354 compositingReasons: string[]; 5355 /** 5356 * A list of strings specifying reason IDs for the given layer to become composited. 5357 */ 5358 compositingReasonIds: string[]; 5359 } 5360 5361 export interface LoadSnapshotRequest { 5362 /** 5363 * An array of tiles composing the snapshot. 5364 */ 5365 tiles: PictureTile[]; 5366 } 5367 5368 export interface LoadSnapshotResponse { 5369 /** 5370 * The id of the snapshot. 5371 */ 5372 snapshotId: SnapshotId; 5373 } 5374 5375 export interface MakeSnapshotRequest { 5376 /** 5377 * The id of the layer. 5378 */ 5379 layerId: LayerId; 5380 } 5381 5382 export interface MakeSnapshotResponse { 5383 /** 5384 * The id of the layer snapshot. 5385 */ 5386 snapshotId: SnapshotId; 5387 } 5388 5389 export interface ProfileSnapshotRequest { 5390 /** 5391 * The id of the layer snapshot. 5392 */ 5393 snapshotId: SnapshotId; 5394 /** 5395 * The maximum number of times to replay the snapshot (1, if not specified). 5396 */ 5397 minRepeatCount?: integer; 5398 /** 5399 * The minimum duration (in seconds) to replay the snapshot. 5400 */ 5401 minDuration?: number; 5402 /** 5403 * The clip rectangle to apply when replaying the snapshot. 5404 */ 5405 clipRect?: DOM.Rect; 5406 } 5407 5408 export interface ProfileSnapshotResponse { 5409 /** 5410 * The array of paint profiles, one per run. 5411 */ 5412 timings: PaintProfile[]; 5413 } 5414 5415 export interface ReleaseSnapshotRequest { 5416 /** 5417 * The id of the layer snapshot. 5418 */ 5419 snapshotId: SnapshotId; 5420 } 5421 5422 export interface ReplaySnapshotRequest { 5423 /** 5424 * The id of the layer snapshot. 5425 */ 5426 snapshotId: SnapshotId; 5427 /** 5428 * The first step to replay from (replay from the very start if not specified). 5429 */ 5430 fromStep?: integer; 5431 /** 5432 * The last step to replay to (replay till the end if not specified). 5433 */ 5434 toStep?: integer; 5435 /** 5436 * The scale to apply while replaying (defaults to 1). 5437 */ 5438 scale?: number; 5439 } 5440 5441 export interface ReplaySnapshotResponse { 5442 /** 5443 * A data: URL for resulting image. 5444 */ 5445 dataURL: string; 5446 } 5447 5448 export interface SnapshotCommandLogRequest { 5449 /** 5450 * The id of the layer snapshot. 5451 */ 5452 snapshotId: SnapshotId; 5453 } 5454 5455 export interface SnapshotCommandLogResponse { 5456 /** 5457 * The array of canvas function calls. 5458 */ 5459 commandLog: any[]; 5460 } 5461 5462 export interface LayerPaintedEvent { 5463 /** 5464 * The id of the painted layer. 5465 */ 5466 layerId: LayerId; 5467 /** 5468 * Clip rectangle. 5469 */ 5470 clip: DOM.Rect; 5471 } 5472 5473 export interface LayerTreeDidChangeEvent { 5474 /** 5475 * Layer tree, absent if not in the comspositing mode. 5476 */ 5477 layers?: Layer[]; 5478 } 5479 } 5480 5481 /** 5482 * Provides access to log entries. 5483 */ 5484 export namespace Log { 5485 5486 export enum LogEntrySource { 5487 XML = 'xml', 5488 Javascript = 'javascript', 5489 Network = 'network', 5490 Storage = 'storage', 5491 Appcache = 'appcache', 5492 Rendering = 'rendering', 5493 Security = 'security', 5494 Deprecation = 'deprecation', 5495 Worker = 'worker', 5496 Violation = 'violation', 5497 Intervention = 'intervention', 5498 Recommendation = 'recommendation', 5499 Other = 'other', 5500 } 5501 5502 export enum LogEntryLevel { 5503 Verbose = 'verbose', 5504 Info = 'info', 5505 Warning = 'warning', 5506 Error = 'error', 5507 } 5508 5509 /** 5510 * Log entry. 5511 */ 5512 export interface LogEntry { 5513 /** 5514 * Log entry source. 5515 */ 5516 source: LogEntrySource; 5517 /** 5518 * Log entry severity. 5519 */ 5520 level: LogEntryLevel; 5521 /** 5522 * Logged text. 5523 */ 5524 text: string; 5525 /** 5526 * Timestamp when this entry was added. 5527 */ 5528 timestamp: Runtime.Timestamp; 5529 /** 5530 * URL of the resource if known. 5531 */ 5532 url?: string; 5533 /** 5534 * Line number in the resource. 5535 */ 5536 lineNumber?: integer; 5537 /** 5538 * JavaScript stack trace. 5539 */ 5540 stackTrace?: Runtime.StackTrace; 5541 /** 5542 * Identifier of the network request associated with this entry. 5543 */ 5544 networkRequestId?: Network.RequestId; 5545 /** 5546 * Identifier of the worker associated with this entry. 5547 */ 5548 workerId?: string; 5549 /** 5550 * Call arguments. 5551 */ 5552 args?: Runtime.RemoteObject[]; 5553 } 5554 5555 export enum ViolationSettingName { 5556 LongTask = 'longTask', 5557 LongLayout = 'longLayout', 5558 BlockedEvent = 'blockedEvent', 5559 BlockedParser = 'blockedParser', 5560 DiscouragedAPIUse = 'discouragedAPIUse', 5561 Handler = 'handler', 5562 RecurringHandler = 'recurringHandler', 5563 } 5564 5565 /** 5566 * Violation configuration setting. 5567 */ 5568 export interface ViolationSetting { 5569 /** 5570 * Violation type. 5571 */ 5572 name: ViolationSettingName; 5573 /** 5574 * Time threshold to trigger upon. 5575 */ 5576 threshold: number; 5577 } 5578 5579 export interface StartViolationsReportRequest { 5580 /** 5581 * Configuration for violations. 5582 */ 5583 config: ViolationSetting[]; 5584 } 5585 5586 /** 5587 * Issued when new message was logged. 5588 */ 5589 export interface EntryAddedEvent { 5590 /** 5591 * The entry. 5592 */ 5593 entry: LogEntry; 5594 } 5595 } 5596 5597 export namespace Memory { 5598 5599 /** 5600 * Memory pressure level. 5601 */ 5602 export enum PressureLevel { 5603 Moderate = 'moderate', 5604 Critical = 'critical', 5605 } 5606 5607 /** 5608 * Heap profile sample. 5609 */ 5610 export interface SamplingProfileNode { 5611 /** 5612 * Size of the sampled allocation. 5613 */ 5614 size: number; 5615 /** 5616 * Total bytes attributed to this sample. 5617 */ 5618 total: number; 5619 /** 5620 * Execution stack at the point of allocation. 5621 */ 5622 stack: string[]; 5623 } 5624 5625 /** 5626 * Array of heap profile samples. 5627 */ 5628 export interface SamplingProfile { 5629 samples: SamplingProfileNode[]; 5630 modules: Module[]; 5631 } 5632 5633 /** 5634 * Executable module information 5635 */ 5636 export interface Module { 5637 /** 5638 * Name of the module. 5639 */ 5640 name: string; 5641 /** 5642 * UUID of the module. 5643 */ 5644 uuid: string; 5645 /** 5646 * Base address where the module is loaded into memory. Encoded as a decimal 5647 * or hexadecimal (0x prefixed) string. 5648 */ 5649 baseAddress: string; 5650 /** 5651 * Size of the module in bytes. 5652 */ 5653 size: number; 5654 } 5655 5656 export interface GetDOMCountersResponse { 5657 documents: integer; 5658 nodes: integer; 5659 jsEventListeners: integer; 5660 } 5661 5662 export interface SetPressureNotificationsSuppressedRequest { 5663 /** 5664 * If true, memory pressure notifications will be suppressed. 5665 */ 5666 suppressed: boolean; 5667 } 5668 5669 export interface SimulatePressureNotificationRequest { 5670 /** 5671 * Memory pressure level of the notification. 5672 */ 5673 level: PressureLevel; 5674 } 5675 5676 export interface StartSamplingRequest { 5677 /** 5678 * Average number of bytes between samples. 5679 */ 5680 samplingInterval?: integer; 5681 /** 5682 * Do not randomize intervals between samples. 5683 */ 5684 suppressRandomness?: boolean; 5685 } 5686 5687 export interface GetAllTimeSamplingProfileResponse { 5688 profile: SamplingProfile; 5689 } 5690 5691 export interface GetBrowserSamplingProfileResponse { 5692 profile: SamplingProfile; 5693 } 5694 5695 export interface GetSamplingProfileResponse { 5696 profile: SamplingProfile; 5697 } 5698 } 5699 5700 /** 5701 * Network domain allows tracking network activities of the page. It exposes information about http, 5702 * file, data and other requests and responses, their headers, bodies, timing, etc. 5703 */ 5704 export namespace Network { 5705 5706 /** 5707 * Resource type as it was perceived by the rendering engine. 5708 */ 5709 export enum ResourceType { 5710 Document = 'Document', 5711 Stylesheet = 'Stylesheet', 5712 Image = 'Image', 5713 Media = 'Media', 5714 Font = 'Font', 5715 Script = 'Script', 5716 TextTrack = 'TextTrack', 5717 XHR = 'XHR', 5718 Fetch = 'Fetch', 5719 EventSource = 'EventSource', 5720 WebSocket = 'WebSocket', 5721 Manifest = 'Manifest', 5722 SignedExchange = 'SignedExchange', 5723 Ping = 'Ping', 5724 CSPViolationReport = 'CSPViolationReport', 5725 Other = 'Other', 5726 } 5727 5728 /** 5729 * Unique loader identifier. 5730 */ 5731 export type LoaderId = string; 5732 5733 /** 5734 * Unique request identifier. 5735 */ 5736 export type RequestId = string; 5737 5738 /** 5739 * Unique intercepted request identifier. 5740 */ 5741 export type InterceptionId = string; 5742 5743 /** 5744 * Network level fetch failure reason. 5745 */ 5746 export enum ErrorReason { 5747 Failed = 'Failed', 5748 Aborted = 'Aborted', 5749 TimedOut = 'TimedOut', 5750 AccessDenied = 'AccessDenied', 5751 ConnectionClosed = 'ConnectionClosed', 5752 ConnectionReset = 'ConnectionReset', 5753 ConnectionRefused = 'ConnectionRefused', 5754 ConnectionAborted = 'ConnectionAborted', 5755 ConnectionFailed = 'ConnectionFailed', 5756 NameNotResolved = 'NameNotResolved', 5757 InternetDisconnected = 'InternetDisconnected', 5758 AddressUnreachable = 'AddressUnreachable', 5759 BlockedByClient = 'BlockedByClient', 5760 BlockedByResponse = 'BlockedByResponse', 5761 } 5762 5763 /** 5764 * UTC time in seconds, counted from January 1, 1970. 5765 */ 5766 export type TimeSinceEpoch = number; 5767 5768 /** 5769 * Monotonically increasing time in seconds since an arbitrary point in the past. 5770 */ 5771 export type MonotonicTime = number; 5772 5773 /** 5774 * Request / response headers as keys / values of JSON object. 5775 */ 5776 export interface Headers { 5777 [key: string]: string; 5778 } 5779 5780 /** 5781 * The underlying connection technology that the browser is supposedly using. 5782 */ 5783 export enum ConnectionType { 5784 None = 'none', 5785 Cellular2g = 'cellular2g', 5786 Cellular3g = 'cellular3g', 5787 Cellular4g = 'cellular4g', 5788 Bluetooth = 'bluetooth', 5789 Ethernet = 'ethernet', 5790 Wifi = 'wifi', 5791 Wimax = 'wimax', 5792 Other = 'other', 5793 } 5794 5795 /** 5796 * Represents the cookie's 'SameSite' status: 5797 * https://tools.ietf.org/html/draft-west-first-party-cookies 5798 */ 5799 export enum CookieSameSite { 5800 Strict = 'Strict', 5801 Lax = 'Lax', 5802 None = 'None', 5803 } 5804 5805 /** 5806 * Represents the cookie's 'Priority' status: 5807 * https://tools.ietf.org/html/draft-west-cookie-priority-00 5808 */ 5809 export enum CookiePriority { 5810 Low = 'Low', 5811 Medium = 'Medium', 5812 High = 'High', 5813 } 5814 5815 /** 5816 * Timing information for the request. 5817 */ 5818 export interface ResourceTiming { 5819 /** 5820 * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in 5821 * milliseconds relatively to this requestTime. 5822 */ 5823 requestTime: number; 5824 /** 5825 * Started resolving proxy. 5826 */ 5827 proxyStart: number; 5828 /** 5829 * Finished resolving proxy. 5830 */ 5831 proxyEnd: number; 5832 /** 5833 * Started DNS address resolve. 5834 */ 5835 dnsStart: number; 5836 /** 5837 * Finished DNS address resolve. 5838 */ 5839 dnsEnd: number; 5840 /** 5841 * Started connecting to the remote host. 5842 */ 5843 connectStart: number; 5844 /** 5845 * Connected to the remote host. 5846 */ 5847 connectEnd: number; 5848 /** 5849 * Started SSL handshake. 5850 */ 5851 sslStart: number; 5852 /** 5853 * Finished SSL handshake. 5854 */ 5855 sslEnd: number; 5856 /** 5857 * Started running ServiceWorker. 5858 */ 5859 workerStart: number; 5860 /** 5861 * Finished Starting ServiceWorker. 5862 */ 5863 workerReady: number; 5864 /** 5865 * Started sending request. 5866 */ 5867 sendStart: number; 5868 /** 5869 * Finished sending request. 5870 */ 5871 sendEnd: number; 5872 /** 5873 * Time the server started pushing request. 5874 */ 5875 pushStart: number; 5876 /** 5877 * Time the server finished pushing request. 5878 */ 5879 pushEnd: number; 5880 /** 5881 * Finished receiving response headers. 5882 */ 5883 receiveHeadersEnd: number; 5884 } 5885 5886 /** 5887 * Loading priority of a resource request. 5888 */ 5889 export enum ResourcePriority { 5890 VeryLow = 'VeryLow', 5891 Low = 'Low', 5892 Medium = 'Medium', 5893 High = 'High', 5894 VeryHigh = 'VeryHigh', 5895 } 5896 5897 export enum RequestReferrerPolicy { 5898 UnsafeUrl = 'unsafe-url', 5899 NoReferrerWhenDowngrade = 'no-referrer-when-downgrade', 5900 NoReferrer = 'no-referrer', 5901 Origin = 'origin', 5902 OriginWhenCrossOrigin = 'origin-when-cross-origin', 5903 SameOrigin = 'same-origin', 5904 StrictOrigin = 'strict-origin', 5905 StrictOriginWhenCrossOrigin = 'strict-origin-when-cross-origin', 5906 } 5907 5908 /** 5909 * HTTP request data. 5910 */ 5911 export interface Request { 5912 /** 5913 * Request URL (without fragment). 5914 */ 5915 url: string; 5916 /** 5917 * Fragment of the requested URL starting with hash, if present. 5918 */ 5919 urlFragment?: string; 5920 /** 5921 * HTTP request method. 5922 */ 5923 method: string; 5924 /** 5925 * HTTP request headers. 5926 */ 5927 headers: Headers; 5928 /** 5929 * HTTP POST request data. 5930 */ 5931 postData?: string; 5932 /** 5933 * True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long. 5934 */ 5935 hasPostData?: boolean; 5936 /** 5937 * The mixed content type of the request. 5938 */ 5939 mixedContentType?: Security.MixedContentType; 5940 /** 5941 * Priority of the resource request at the time request is sent. 5942 */ 5943 initialPriority: ResourcePriority; 5944 /** 5945 * The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ 5946 */ 5947 referrerPolicy: RequestReferrerPolicy; 5948 /** 5949 * Whether is loaded via link preload. 5950 */ 5951 isLinkPreload?: boolean; 5952 } 5953 5954 /** 5955 * Details of a signed certificate timestamp (SCT). 5956 */ 5957 export interface SignedCertificateTimestamp { 5958 /** 5959 * Validation status. 5960 */ 5961 status: string; 5962 /** 5963 * Origin. 5964 */ 5965 origin: string; 5966 /** 5967 * Log name / description. 5968 */ 5969 logDescription: string; 5970 /** 5971 * Log ID. 5972 */ 5973 logId: string; 5974 /** 5975 * Issuance date. 5976 */ 5977 timestamp: TimeSinceEpoch; 5978 /** 5979 * Hash algorithm. 5980 */ 5981 hashAlgorithm: string; 5982 /** 5983 * Signature algorithm. 5984 */ 5985 signatureAlgorithm: string; 5986 /** 5987 * Signature data. 5988 */ 5989 signatureData: string; 5990 } 5991 5992 /** 5993 * Security details about a request. 5994 */ 5995 export interface SecurityDetails { 5996 /** 5997 * Protocol name (e.g. "TLS 1.2" or "QUIC"). 5998 */ 5999 protocol: string; 6000 /** 6001 * Key Exchange used by the connection, or the empty string if not applicable. 6002 */ 6003 keyExchange: string; 6004 /** 6005 * (EC)DH group used by the connection, if applicable. 6006 */ 6007 keyExchangeGroup?: string; 6008 /** 6009 * Cipher name. 6010 */ 6011 cipher: string; 6012 /** 6013 * TLS MAC. Note that AEAD ciphers do not have separate MACs. 6014 */ 6015 mac?: string; 6016 /** 6017 * Certificate ID value. 6018 */ 6019 certificateId: Security.CertificateId; 6020 /** 6021 * Certificate subject name. 6022 */ 6023 subjectName: string; 6024 /** 6025 * Subject Alternative Name (SAN) DNS names and IP addresses. 6026 */ 6027 sanList: string[]; 6028 /** 6029 * Name of the issuing CA. 6030 */ 6031 issuer: string; 6032 /** 6033 * Certificate valid from date. 6034 */ 6035 validFrom: TimeSinceEpoch; 6036 /** 6037 * Certificate valid to (expiration) date 6038 */ 6039 validTo: TimeSinceEpoch; 6040 /** 6041 * List of signed certificate timestamps (SCTs). 6042 */ 6043 signedCertificateTimestampList: SignedCertificateTimestamp[]; 6044 /** 6045 * Whether the request complied with Certificate Transparency policy 6046 */ 6047 certificateTransparencyCompliance: CertificateTransparencyCompliance; 6048 } 6049 6050 /** 6051 * Whether the request complied with Certificate Transparency policy. 6052 */ 6053 export enum CertificateTransparencyCompliance { 6054 Unknown = 'unknown', 6055 NotCompliant = 'not-compliant', 6056 Compliant = 'compliant', 6057 } 6058 6059 /** 6060 * The reason why request was blocked. 6061 */ 6062 export enum BlockedReason { 6063 Other = 'other', 6064 Csp = 'csp', 6065 MixedContent = 'mixed-content', 6066 Origin = 'origin', 6067 Inspector = 'inspector', 6068 SubresourceFilter = 'subresource-filter', 6069 ContentType = 'content-type', 6070 CollapsedByClient = 'collapsed-by-client', 6071 CoepFrameResourceNeedsCoepHeader = 'coep-frame-resource-needs-coep-header', 6072 CoopSandboxedIframeCannotNavigateToCoopPage = 'coop-sandboxed-iframe-cannot-navigate-to-coop-page', 6073 CorpNotSameOrigin = 'corp-not-same-origin', 6074 CorpNotSameOriginAfterDefaultedToSameOriginByCoep = 'corp-not-same-origin-after-defaulted-to-same-origin-by-coep', 6075 CorpNotSameSite = 'corp-not-same-site', 6076 } 6077 6078 /** 6079 * HTTP response data. 6080 */ 6081 export interface Response { 6082 /** 6083 * Response URL. This URL can be different from CachedResource.url in case of redirect. 6084 */ 6085 url: string; 6086 /** 6087 * HTTP response status code. 6088 */ 6089 status: integer; 6090 /** 6091 * HTTP response status text. 6092 */ 6093 statusText: string; 6094 /** 6095 * HTTP response headers. 6096 */ 6097 headers: Headers; 6098 /** 6099 * HTTP response headers text. 6100 */ 6101 headersText?: string; 6102 /** 6103 * Resource mimeType as determined by the browser. 6104 */ 6105 mimeType: string; 6106 /** 6107 * Refined HTTP request headers that were actually transmitted over the network. 6108 */ 6109 requestHeaders?: Headers; 6110 /** 6111 * HTTP request headers text. 6112 */ 6113 requestHeadersText?: string; 6114 /** 6115 * Specifies whether physical connection was actually reused for this request. 6116 */ 6117 connectionReused: boolean; 6118 /** 6119 * Physical connection id that was actually used for this request. 6120 */ 6121 connectionId: number; 6122 /** 6123 * Remote IP address. 6124 */ 6125 remoteIPAddress?: string; 6126 /** 6127 * Remote port. 6128 */ 6129 remotePort?: integer; 6130 /** 6131 * Specifies that the request was served from the disk cache. 6132 */ 6133 fromDiskCache?: boolean; 6134 /** 6135 * Specifies that the request was served from the ServiceWorker. 6136 */ 6137 fromServiceWorker?: boolean; 6138 /** 6139 * Specifies that the request was served from the prefetch cache. 6140 */ 6141 fromPrefetchCache?: boolean; 6142 /** 6143 * Total number of bytes received for this request so far. 6144 */ 6145 encodedDataLength: number; 6146 /** 6147 * Timing information for the given request. 6148 */ 6149 timing?: ResourceTiming; 6150 /** 6151 * Protocol used to fetch this request. 6152 */ 6153 protocol?: string; 6154 /** 6155 * Security state of the request resource. 6156 */ 6157 securityState: Security.SecurityState; 6158 /** 6159 * Security details for the request. 6160 */ 6161 securityDetails?: SecurityDetails; 6162 } 6163 6164 /** 6165 * WebSocket request data. 6166 */ 6167 export interface WebSocketRequest { 6168 /** 6169 * HTTP request headers. 6170 */ 6171 headers: Headers; 6172 } 6173 6174 /** 6175 * WebSocket response data. 6176 */ 6177 export interface WebSocketResponse { 6178 /** 6179 * HTTP response status code. 6180 */ 6181 status: integer; 6182 /** 6183 * HTTP response status text. 6184 */ 6185 statusText: string; 6186 /** 6187 * HTTP response headers. 6188 */ 6189 headers: Headers; 6190 /** 6191 * HTTP response headers text. 6192 */ 6193 headersText?: string; 6194 /** 6195 * HTTP request headers. 6196 */ 6197 requestHeaders?: Headers; 6198 /** 6199 * HTTP request headers text. 6200 */ 6201 requestHeadersText?: string; 6202 } 6203 6204 /** 6205 * WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests. 6206 */ 6207 export interface WebSocketFrame { 6208 /** 6209 * WebSocket message opcode. 6210 */ 6211 opcode: number; 6212 /** 6213 * WebSocket message mask. 6214 */ 6215 mask: boolean; 6216 /** 6217 * WebSocket message payload data. 6218 * If the opcode is 1, this is a text message and payloadData is a UTF-8 string. 6219 * If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data. 6220 */ 6221 payloadData: string; 6222 } 6223 6224 /** 6225 * Information about the cached resource. 6226 */ 6227 export interface CachedResource { 6228 /** 6229 * Resource URL. This is the url of the original network request. 6230 */ 6231 url: string; 6232 /** 6233 * Type of this resource. 6234 */ 6235 type: ResourceType; 6236 /** 6237 * Cached response data. 6238 */ 6239 response?: Response; 6240 /** 6241 * Cached response body size. 6242 */ 6243 bodySize: number; 6244 } 6245 6246 export enum InitiatorType { 6247 Parser = 'parser', 6248 Script = 'script', 6249 Preload = 'preload', 6250 SignedExchange = 'SignedExchange', 6251 Other = 'other', 6252 } 6253 6254 /** 6255 * Information about the request initiator. 6256 */ 6257 export interface Initiator { 6258 /** 6259 * Type of this initiator. 6260 */ 6261 type: InitiatorType; 6262 /** 6263 * Initiator JavaScript stack trace, set for Script only. 6264 */ 6265 stack?: Runtime.StackTrace; 6266 /** 6267 * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. 6268 */ 6269 url?: string; 6270 /** 6271 * Initiator line number, set for Parser type or for Script type (when script is importing 6272 * module) (0-based). 6273 */ 6274 lineNumber?: number; 6275 } 6276 6277 /** 6278 * Cookie object 6279 */ 6280 export interface Cookie { 6281 /** 6282 * Cookie name. 6283 */ 6284 name: string; 6285 /** 6286 * Cookie value. 6287 */ 6288 value: string; 6289 /** 6290 * Cookie domain. 6291 */ 6292 domain: string; 6293 /** 6294 * Cookie path. 6295 */ 6296 path: string; 6297 /** 6298 * Cookie expiration date as the number of seconds since the UNIX epoch. 6299 */ 6300 expires: number; 6301 /** 6302 * Cookie size. 6303 */ 6304 size: integer; 6305 /** 6306 * True if cookie is http-only. 6307 */ 6308 httpOnly: boolean; 6309 /** 6310 * True if cookie is secure. 6311 */ 6312 secure: boolean; 6313 /** 6314 * True in case of session cookie. 6315 */ 6316 session: boolean; 6317 /** 6318 * Cookie SameSite type. 6319 */ 6320 sameSite?: CookieSameSite; 6321 /** 6322 * Cookie Priority 6323 */ 6324 priority: CookiePriority; 6325 } 6326 6327 /** 6328 * Types of reasons why a cookie may not be stored from a response. 6329 */ 6330 export enum SetCookieBlockedReason { 6331 SecureOnly = 'SecureOnly', 6332 SameSiteStrict = 'SameSiteStrict', 6333 SameSiteLax = 'SameSiteLax', 6334 SameSiteUnspecifiedTreatedAsLax = 'SameSiteUnspecifiedTreatedAsLax', 6335 SameSiteNoneInsecure = 'SameSiteNoneInsecure', 6336 UserPreferences = 'UserPreferences', 6337 SyntaxError = 'SyntaxError', 6338 SchemeNotSupported = 'SchemeNotSupported', 6339 OverwriteSecure = 'OverwriteSecure', 6340 InvalidDomain = 'InvalidDomain', 6341 InvalidPrefix = 'InvalidPrefix', 6342 UnknownError = 'UnknownError', 6343 } 6344 6345 /** 6346 * Types of reasons why a cookie may not be sent with a request. 6347 */ 6348 export enum CookieBlockedReason { 6349 SecureOnly = 'SecureOnly', 6350 NotOnPath = 'NotOnPath', 6351 DomainMismatch = 'DomainMismatch', 6352 SameSiteStrict = 'SameSiteStrict', 6353 SameSiteLax = 'SameSiteLax', 6354 SameSiteUnspecifiedTreatedAsLax = 'SameSiteUnspecifiedTreatedAsLax', 6355 SameSiteNoneInsecure = 'SameSiteNoneInsecure', 6356 UserPreferences = 'UserPreferences', 6357 UnknownError = 'UnknownError', 6358 } 6359 6360 /** 6361 * A cookie which was not stored from a response with the corresponding reason. 6362 */ 6363 export interface BlockedSetCookieWithReason { 6364 /** 6365 * The reason(s) this cookie was blocked. 6366 */ 6367 blockedReasons: SetCookieBlockedReason[]; 6368 /** 6369 * The string representing this individual cookie as it would appear in the header. 6370 * This is not the entire "cookie" or "set-cookie" header which could have multiple cookies. 6371 */ 6372 cookieLine: string; 6373 /** 6374 * The cookie object which represents the cookie which was not stored. It is optional because 6375 * sometimes complete cookie information is not available, such as in the case of parsing 6376 * errors. 6377 */ 6378 cookie?: Cookie; 6379 } 6380 6381 /** 6382 * A cookie with was not sent with a request with the corresponding reason. 6383 */ 6384 export interface BlockedCookieWithReason { 6385 /** 6386 * The reason(s) the cookie was blocked. 6387 */ 6388 blockedReasons: CookieBlockedReason[]; 6389 /** 6390 * The cookie object representing the cookie which was not sent. 6391 */ 6392 cookie: Cookie; 6393 } 6394 6395 /** 6396 * Cookie parameter object 6397 */ 6398 export interface CookieParam { 6399 /** 6400 * Cookie name. 6401 */ 6402 name: string; 6403 /** 6404 * Cookie value. 6405 */ 6406 value: string; 6407 /** 6408 * The request-URI to associate with the setting of the cookie. This value can affect the 6409 * default domain and path values of the created cookie. 6410 */ 6411 url?: string; 6412 /** 6413 * Cookie domain. 6414 */ 6415 domain?: string; 6416 /** 6417 * Cookie path. 6418 */ 6419 path?: string; 6420 /** 6421 * True if cookie is secure. 6422 */ 6423 secure?: boolean; 6424 /** 6425 * True if cookie is http-only. 6426 */ 6427 httpOnly?: boolean; 6428 /** 6429 * Cookie SameSite type. 6430 */ 6431 sameSite?: CookieSameSite; 6432 /** 6433 * Cookie expiration date, session cookie if not set 6434 */ 6435 expires?: TimeSinceEpoch; 6436 /** 6437 * Cookie Priority. 6438 */ 6439 priority?: CookiePriority; 6440 } 6441 6442 export enum AuthChallengeSource { 6443 Server = 'Server', 6444 Proxy = 'Proxy', 6445 } 6446 6447 /** 6448 * Authorization challenge for HTTP status code 401 or 407. 6449 */ 6450 export interface AuthChallenge { 6451 /** 6452 * Source of the authentication challenge. 6453 */ 6454 source?: AuthChallengeSource; 6455 /** 6456 * Origin of the challenger. 6457 */ 6458 origin: string; 6459 /** 6460 * The authentication scheme used, such as basic or digest 6461 */ 6462 scheme: string; 6463 /** 6464 * The realm of the challenge. May be empty. 6465 */ 6466 realm: string; 6467 } 6468 6469 export enum AuthChallengeResponseResponse { 6470 Default = 'Default', 6471 CancelAuth = 'CancelAuth', 6472 ProvideCredentials = 'ProvideCredentials', 6473 } 6474 6475 /** 6476 * Response to an AuthChallenge. 6477 */ 6478 export interface AuthChallengeResponse { 6479 /** 6480 * The decision on what to do in response to the authorization challenge. Default means 6481 * deferring to the default behavior of the net stack, which will likely either the Cancel 6482 * authentication or display a popup dialog box. 6483 */ 6484 response: AuthChallengeResponseResponse; 6485 /** 6486 * The username to provide, possibly empty. Should only be set if response is 6487 * ProvideCredentials. 6488 */ 6489 username?: string; 6490 /** 6491 * The password to provide, possibly empty. Should only be set if response is 6492 * ProvideCredentials. 6493 */ 6494 password?: string; 6495 } 6496 6497 /** 6498 * Stages of the interception to begin intercepting. Request will intercept before the request is 6499 * sent. Response will intercept after the response is received. 6500 */ 6501 export enum InterceptionStage { 6502 Request = 'Request', 6503 HeadersReceived = 'HeadersReceived', 6504 } 6505 6506 /** 6507 * Request pattern for interception. 6508 */ 6509 export interface RequestPattern { 6510 /** 6511 * Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is 6512 * backslash. Omitting is equivalent to "*". 6513 */ 6514 urlPattern?: string; 6515 /** 6516 * If set, only requests for matching resource types will be intercepted. 6517 */ 6518 resourceType?: ResourceType; 6519 /** 6520 * Stage at wich to begin intercepting requests. Default is Request. 6521 */ 6522 interceptionStage?: InterceptionStage; 6523 } 6524 6525 /** 6526 * Information about a signed exchange signature. 6527 * https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1 6528 */ 6529 export interface SignedExchangeSignature { 6530 /** 6531 * Signed exchange signature label. 6532 */ 6533 label: string; 6534 /** 6535 * The hex string of signed exchange signature. 6536 */ 6537 signature: string; 6538 /** 6539 * Signed exchange signature integrity. 6540 */ 6541 integrity: string; 6542 /** 6543 * Signed exchange signature cert Url. 6544 */ 6545 certUrl?: string; 6546 /** 6547 * The hex string of signed exchange signature cert sha256. 6548 */ 6549 certSha256?: string; 6550 /** 6551 * Signed exchange signature validity Url. 6552 */ 6553 validityUrl: string; 6554 /** 6555 * Signed exchange signature date. 6556 */ 6557 date: integer; 6558 /** 6559 * Signed exchange signature expires. 6560 */ 6561 expires: integer; 6562 /** 6563 * The encoded certificates. 6564 */ 6565 certificates?: string[]; 6566 } 6567 6568 /** 6569 * Information about a signed exchange header. 6570 * https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation 6571 */ 6572 export interface SignedExchangeHeader { 6573 /** 6574 * Signed exchange request URL. 6575 */ 6576 requestUrl: string; 6577 /** 6578 * Signed exchange response code. 6579 */ 6580 responseCode: integer; 6581 /** 6582 * Signed exchange response headers. 6583 */ 6584 responseHeaders: Headers; 6585 /** 6586 * Signed exchange response signature. 6587 */ 6588 signatures: SignedExchangeSignature[]; 6589 /** 6590 * Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>". 6591 */ 6592 headerIntegrity: string; 6593 } 6594 6595 /** 6596 * Field type for a signed exchange related error. 6597 */ 6598 export enum SignedExchangeErrorField { 6599 SignatureSig = 'signatureSig', 6600 SignatureIntegrity = 'signatureIntegrity', 6601 SignatureCertUrl = 'signatureCertUrl', 6602 SignatureCertSha256 = 'signatureCertSha256', 6603 SignatureValidityUrl = 'signatureValidityUrl', 6604 SignatureTimestamps = 'signatureTimestamps', 6605 } 6606 6607 /** 6608 * Information about a signed exchange response. 6609 */ 6610 export interface SignedExchangeError { 6611 /** 6612 * Error message. 6613 */ 6614 message: string; 6615 /** 6616 * The index of the signature which caused the error. 6617 */ 6618 signatureIndex?: integer; 6619 /** 6620 * The field which caused the error. 6621 */ 6622 errorField?: SignedExchangeErrorField; 6623 } 6624 6625 /** 6626 * Information about a signed exchange response. 6627 */ 6628 export interface SignedExchangeInfo { 6629 /** 6630 * The outer response of signed HTTP exchange which was received from network. 6631 */ 6632 outerResponse: Response; 6633 /** 6634 * Information about the signed exchange header. 6635 */ 6636 header?: SignedExchangeHeader; 6637 /** 6638 * Security details for the signed exchange header. 6639 */ 6640 securityDetails?: SecurityDetails; 6641 /** 6642 * Errors occurred while handling the signed exchagne. 6643 */ 6644 errors?: SignedExchangeError[]; 6645 } 6646 6647 export interface CanClearBrowserCacheResponse { 6648 /** 6649 * True if browser cache can be cleared. 6650 */ 6651 result: boolean; 6652 } 6653 6654 export interface CanClearBrowserCookiesResponse { 6655 /** 6656 * True if browser cookies can be cleared. 6657 */ 6658 result: boolean; 6659 } 6660 6661 export interface CanEmulateNetworkConditionsResponse { 6662 /** 6663 * True if emulation of network conditions is supported. 6664 */ 6665 result: boolean; 6666 } 6667 6668 export interface ContinueInterceptedRequestRequest { 6669 interceptionId: InterceptionId; 6670 /** 6671 * If set this causes the request to fail with the given reason. Passing `Aborted` for requests 6672 * marked with `isNavigationRequest` also cancels the navigation. Must not be set in response 6673 * to an authChallenge. 6674 */ 6675 errorReason?: ErrorReason; 6676 /** 6677 * If set the requests completes using with the provided base64 encoded raw response, including 6678 * HTTP status line and headers etc... Must not be set in response to an authChallenge. 6679 */ 6680 rawResponse?: binary; 6681 /** 6682 * If set the request url will be modified in a way that's not observable by page. Must not be 6683 * set in response to an authChallenge. 6684 */ 6685 url?: string; 6686 /** 6687 * If set this allows the request method to be overridden. Must not be set in response to an 6688 * authChallenge. 6689 */ 6690 method?: string; 6691 /** 6692 * If set this allows postData to be set. Must not be set in response to an authChallenge. 6693 */ 6694 postData?: string; 6695 /** 6696 * If set this allows the request headers to be changed. Must not be set in response to an 6697 * authChallenge. 6698 */ 6699 headers?: Headers; 6700 /** 6701 * Response to a requestIntercepted with an authChallenge. Must not be set otherwise. 6702 */ 6703 authChallengeResponse?: AuthChallengeResponse; 6704 } 6705 6706 export interface DeleteCookiesRequest { 6707 /** 6708 * Name of the cookies to remove. 6709 */ 6710 name: string; 6711 /** 6712 * If specified, deletes all the cookies with the given name where domain and path match 6713 * provided URL. 6714 */ 6715 url?: string; 6716 /** 6717 * If specified, deletes only cookies with the exact domain. 6718 */ 6719 domain?: string; 6720 /** 6721 * If specified, deletes only cookies with the exact path. 6722 */ 6723 path?: string; 6724 } 6725 6726 export interface EmulateNetworkConditionsRequest { 6727 /** 6728 * True to emulate internet disconnection. 6729 */ 6730 offline: boolean; 6731 /** 6732 * Minimum latency from request sent to response headers received (ms). 6733 */ 6734 latency: number; 6735 /** 6736 * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. 6737 */ 6738 downloadThroughput: number; 6739 /** 6740 * Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. 6741 */ 6742 uploadThroughput: number; 6743 /** 6744 * Connection type if known. 6745 */ 6746 connectionType?: ConnectionType; 6747 } 6748 6749 export interface EnableRequest { 6750 /** 6751 * Buffer size in bytes to use when preserving network payloads (XHRs, etc). 6752 */ 6753 maxTotalBufferSize?: integer; 6754 /** 6755 * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). 6756 */ 6757 maxResourceBufferSize?: integer; 6758 /** 6759 * Longest post body size (in bytes) that would be included in requestWillBeSent notification 6760 */ 6761 maxPostDataSize?: integer; 6762 } 6763 6764 export interface GetAllCookiesResponse { 6765 /** 6766 * Array of cookie objects. 6767 */ 6768 cookies: Cookie[]; 6769 } 6770 6771 export interface GetCertificateRequest { 6772 /** 6773 * Origin to get certificate for. 6774 */ 6775 origin: string; 6776 } 6777 6778 export interface GetCertificateResponse { 6779 tableNames: string[]; 6780 } 6781 6782 export interface GetCookiesRequest { 6783 /** 6784 * The list of URLs for which applicable cookies will be fetched 6785 */ 6786 urls?: string[]; 6787 } 6788 6789 export interface GetCookiesResponse { 6790 /** 6791 * Array of cookie objects. 6792 */ 6793 cookies: Cookie[]; 6794 } 6795 6796 export interface GetResponseBodyRequest { 6797 /** 6798 * Identifier of the network request to get content for. 6799 */ 6800 requestId: RequestId; 6801 } 6802 6803 export interface GetResponseBodyResponse { 6804 /** 6805 * Response body. 6806 */ 6807 body: string; 6808 /** 6809 * True, if content was sent as base64. 6810 */ 6811 base64Encoded: boolean; 6812 } 6813 6814 export interface GetRequestPostDataRequest { 6815 /** 6816 * Identifier of the network request to get content for. 6817 */ 6818 requestId: RequestId; 6819 } 6820 6821 export interface GetRequestPostDataResponse { 6822 /** 6823 * Request body string, omitting files from multipart requests 6824 */ 6825 postData: string; 6826 } 6827 6828 export interface GetResponseBodyForInterceptionRequest { 6829 /** 6830 * Identifier for the intercepted request to get body for. 6831 */ 6832 interceptionId: InterceptionId; 6833 } 6834 6835 export interface GetResponseBodyForInterceptionResponse { 6836 /** 6837 * Response body. 6838 */ 6839 body: string; 6840 /** 6841 * True, if content was sent as base64. 6842 */ 6843 base64Encoded: boolean; 6844 } 6845 6846 export interface TakeResponseBodyForInterceptionAsStreamRequest { 6847 interceptionId: InterceptionId; 6848 } 6849 6850 export interface TakeResponseBodyForInterceptionAsStreamResponse { 6851 stream: IO.StreamHandle; 6852 } 6853 6854 export interface ReplayXHRRequest { 6855 /** 6856 * Identifier of XHR to replay. 6857 */ 6858 requestId: RequestId; 6859 } 6860 6861 export interface SearchInResponseBodyRequest { 6862 /** 6863 * Identifier of the network response to search. 6864 */ 6865 requestId: RequestId; 6866 /** 6867 * String to search for. 6868 */ 6869 query: string; 6870 /** 6871 * If true, search is case sensitive. 6872 */ 6873 caseSensitive?: boolean; 6874 /** 6875 * If true, treats string parameter as regex. 6876 */ 6877 isRegex?: boolean; 6878 } 6879 6880 export interface SearchInResponseBodyResponse { 6881 /** 6882 * List of search matches. 6883 */ 6884 result: Debugger.SearchMatch[]; 6885 } 6886 6887 export interface SetBlockedURLsRequest { 6888 /** 6889 * URL patterns to block. Wildcards ('*') are allowed. 6890 */ 6891 urls: string[]; 6892 } 6893 6894 export interface SetBypassServiceWorkerRequest { 6895 /** 6896 * Bypass service worker and load from network. 6897 */ 6898 bypass: boolean; 6899 } 6900 6901 export interface SetCacheDisabledRequest { 6902 /** 6903 * Cache disabled state. 6904 */ 6905 cacheDisabled: boolean; 6906 } 6907 6908 export interface SetCookieRequest { 6909 /** 6910 * Cookie name. 6911 */ 6912 name: string; 6913 /** 6914 * Cookie value. 6915 */ 6916 value: string; 6917 /** 6918 * The request-URI to associate with the setting of the cookie. This value can affect the 6919 * default domain and path values of the created cookie. 6920 */ 6921 url?: string; 6922 /** 6923 * Cookie domain. 6924 */ 6925 domain?: string; 6926 /** 6927 * Cookie path. 6928 */ 6929 path?: string; 6930 /** 6931 * True if cookie is secure. 6932 */ 6933 secure?: boolean; 6934 /** 6935 * True if cookie is http-only. 6936 */ 6937 httpOnly?: boolean; 6938 /** 6939 * Cookie SameSite type. 6940 */ 6941 sameSite?: CookieSameSite; 6942 /** 6943 * Cookie expiration date, session cookie if not set 6944 */ 6945 expires?: TimeSinceEpoch; 6946 /** 6947 * Cookie Priority type. 6948 */ 6949 priority?: CookiePriority; 6950 } 6951 6952 export interface SetCookieResponse { 6953 /** 6954 * True if successfully set cookie. 6955 */ 6956 success: boolean; 6957 } 6958 6959 export interface SetCookiesRequest { 6960 /** 6961 * Cookies to be set. 6962 */ 6963 cookies: CookieParam[]; 6964 } 6965 6966 export interface SetDataSizeLimitsForTestRequest { 6967 /** 6968 * Maximum total buffer size. 6969 */ 6970 maxTotalSize: integer; 6971 /** 6972 * Maximum per-resource size. 6973 */ 6974 maxResourceSize: integer; 6975 } 6976 6977 export interface SetExtraHTTPHeadersRequest { 6978 /** 6979 * Map with extra HTTP headers. 6980 */ 6981 headers: Headers; 6982 } 6983 6984 export interface SetRequestInterceptionRequest { 6985 /** 6986 * Requests matching any of these patterns will be forwarded and wait for the corresponding 6987 * continueInterceptedRequest call. 6988 */ 6989 patterns: RequestPattern[]; 6990 } 6991 6992 export interface SetUserAgentOverrideRequest { 6993 /** 6994 * User agent to use. 6995 */ 6996 userAgent: string; 6997 /** 6998 * Browser langugage to emulate. 6999 */ 7000 acceptLanguage?: string; 7001 /** 7002 * The platform navigator.platform should return. 7003 */ 7004 platform?: string; 7005 } 7006 7007 /** 7008 * Fired when data chunk was received over the network. 7009 */ 7010 export interface DataReceivedEvent { 7011 /** 7012 * Request identifier. 7013 */ 7014 requestId: RequestId; 7015 /** 7016 * Timestamp. 7017 */ 7018 timestamp: MonotonicTime; 7019 /** 7020 * Data chunk length. 7021 */ 7022 dataLength: integer; 7023 /** 7024 * Actual bytes received (might be less than dataLength for compressed encodings). 7025 */ 7026 encodedDataLength: integer; 7027 } 7028 7029 /** 7030 * Fired when EventSource message is received. 7031 */ 7032 export interface EventSourceMessageReceivedEvent { 7033 /** 7034 * Request identifier. 7035 */ 7036 requestId: RequestId; 7037 /** 7038 * Timestamp. 7039 */ 7040 timestamp: MonotonicTime; 7041 /** 7042 * Message type. 7043 */ 7044 eventName: string; 7045 /** 7046 * Message identifier. 7047 */ 7048 eventId: string; 7049 /** 7050 * Message content. 7051 */ 7052 data: string; 7053 } 7054 7055 /** 7056 * Fired when HTTP request has failed to load. 7057 */ 7058 export interface LoadingFailedEvent { 7059 /** 7060 * Request identifier. 7061 */ 7062 requestId: RequestId; 7063 /** 7064 * Timestamp. 7065 */ 7066 timestamp: MonotonicTime; 7067 /** 7068 * Resource type. 7069 */ 7070 type: ResourceType; 7071 /** 7072 * User friendly error message. 7073 */ 7074 errorText: string; 7075 /** 7076 * True if loading was canceled. 7077 */ 7078 canceled?: boolean; 7079 /** 7080 * The reason why loading was blocked, if any. 7081 */ 7082 blockedReason?: BlockedReason; 7083 } 7084 7085 /** 7086 * Fired when HTTP request has finished loading. 7087 */ 7088 export interface LoadingFinishedEvent { 7089 /** 7090 * Request identifier. 7091 */ 7092 requestId: RequestId; 7093 /** 7094 * Timestamp. 7095 */ 7096 timestamp: MonotonicTime; 7097 /** 7098 * Total number of bytes received for this request. 7099 */ 7100 encodedDataLength: number; 7101 /** 7102 * Set when 1) response was blocked by Cross-Origin Read Blocking and also 7103 * 2) this needs to be reported to the DevTools console. 7104 */ 7105 shouldReportCorbBlocking?: boolean; 7106 } 7107 7108 /** 7109 * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or 7110 * mocked. 7111 * Deprecated, use Fetch.requestPaused instead. 7112 */ 7113 export interface RequestInterceptedEvent { 7114 /** 7115 * Each request the page makes will have a unique id, however if any redirects are encountered 7116 * while processing that fetch, they will be reported with the same id as the original fetch. 7117 * Likewise if HTTP authentication is needed then the same fetch id will be used. 7118 */ 7119 interceptionId: InterceptionId; 7120 request: Request; 7121 /** 7122 * The id of the frame that initiated the request. 7123 */ 7124 frameId: Page.FrameId; 7125 /** 7126 * How the requested resource will be used. 7127 */ 7128 resourceType: ResourceType; 7129 /** 7130 * Whether this is a navigation request, which can abort the navigation completely. 7131 */ 7132 isNavigationRequest: boolean; 7133 /** 7134 * Set if the request is a navigation that will result in a download. 7135 * Only present after response is received from the server (i.e. HeadersReceived stage). 7136 */ 7137 isDownload?: boolean; 7138 /** 7139 * Redirect location, only sent if a redirect was intercepted. 7140 */ 7141 redirectUrl?: string; 7142 /** 7143 * Details of the Authorization Challenge encountered. If this is set then 7144 * continueInterceptedRequest must contain an authChallengeResponse. 7145 */ 7146 authChallenge?: AuthChallenge; 7147 /** 7148 * Response error if intercepted at response stage or if redirect occurred while intercepting 7149 * request. 7150 */ 7151 responseErrorReason?: ErrorReason; 7152 /** 7153 * Response code if intercepted at response stage or if redirect occurred while intercepting 7154 * request or auth retry occurred. 7155 */ 7156 responseStatusCode?: integer; 7157 /** 7158 * Response headers if intercepted at the response stage or if redirect occurred while 7159 * intercepting request or auth retry occurred. 7160 */ 7161 responseHeaders?: Headers; 7162 /** 7163 * If the intercepted request had a corresponding requestWillBeSent event fired for it, then 7164 * this requestId will be the same as the requestId present in the requestWillBeSent event. 7165 */ 7166 requestId?: RequestId; 7167 } 7168 7169 /** 7170 * Fired if request ended up loading from cache. 7171 */ 7172 export interface RequestServedFromCacheEvent { 7173 /** 7174 * Request identifier. 7175 */ 7176 requestId: RequestId; 7177 } 7178 7179 /** 7180 * Fired when page is about to send HTTP request. 7181 */ 7182 export interface RequestWillBeSentEvent { 7183 /** 7184 * Request identifier. 7185 */ 7186 requestId: RequestId; 7187 /** 7188 * Loader identifier. Empty string if the request is fetched from worker. 7189 */ 7190 loaderId: LoaderId; 7191 /** 7192 * URL of the document this request is loaded for. 7193 */ 7194 documentURL: string; 7195 /** 7196 * Request data. 7197 */ 7198 request: Request; 7199 /** 7200 * Timestamp. 7201 */ 7202 timestamp: MonotonicTime; 7203 /** 7204 * Timestamp. 7205 */ 7206 wallTime: TimeSinceEpoch; 7207 /** 7208 * Request initiator. 7209 */ 7210 initiator: Initiator; 7211 /** 7212 * Redirect response data. 7213 */ 7214 redirectResponse?: Response; 7215 /** 7216 * Type of this resource. 7217 */ 7218 type?: ResourceType; 7219 /** 7220 * Frame identifier. 7221 */ 7222 frameId?: Page.FrameId; 7223 /** 7224 * Whether the request is initiated by a user gesture. Defaults to false. 7225 */ 7226 hasUserGesture?: boolean; 7227 } 7228 7229 /** 7230 * Fired when resource loading priority is changed 7231 */ 7232 export interface ResourceChangedPriorityEvent { 7233 /** 7234 * Request identifier. 7235 */ 7236 requestId: RequestId; 7237 /** 7238 * New priority 7239 */ 7240 newPriority: ResourcePriority; 7241 /** 7242 * Timestamp. 7243 */ 7244 timestamp: MonotonicTime; 7245 } 7246 7247 /** 7248 * Fired when a signed exchange was received over the network 7249 */ 7250 export interface SignedExchangeReceivedEvent { 7251 /** 7252 * Request identifier. 7253 */ 7254 requestId: RequestId; 7255 /** 7256 * Information about the signed exchange response. 7257 */ 7258 info: SignedExchangeInfo; 7259 } 7260 7261 /** 7262 * Fired when HTTP response is available. 7263 */ 7264 export interface ResponseReceivedEvent { 7265 /** 7266 * Request identifier. 7267 */ 7268 requestId: RequestId; 7269 /** 7270 * Loader identifier. Empty string if the request is fetched from worker. 7271 */ 7272 loaderId: LoaderId; 7273 /** 7274 * Timestamp. 7275 */ 7276 timestamp: MonotonicTime; 7277 /** 7278 * Resource type. 7279 */ 7280 type: ResourceType; 7281 /** 7282 * Response data. 7283 */ 7284 response: Response; 7285 /** 7286 * Frame identifier. 7287 */ 7288 frameId?: Page.FrameId; 7289 } 7290 7291 /** 7292 * Fired when WebSocket is closed. 7293 */ 7294 export interface WebSocketClosedEvent { 7295 /** 7296 * Request identifier. 7297 */ 7298 requestId: RequestId; 7299 /** 7300 * Timestamp. 7301 */ 7302 timestamp: MonotonicTime; 7303 } 7304 7305 /** 7306 * Fired upon WebSocket creation. 7307 */ 7308 export interface WebSocketCreatedEvent { 7309 /** 7310 * Request identifier. 7311 */ 7312 requestId: RequestId; 7313 /** 7314 * WebSocket request URL. 7315 */ 7316 url: string; 7317 /** 7318 * Request initiator. 7319 */ 7320 initiator?: Initiator; 7321 } 7322 7323 /** 7324 * Fired when WebSocket message error occurs. 7325 */ 7326 export interface WebSocketFrameErrorEvent { 7327 /** 7328 * Request identifier. 7329 */ 7330 requestId: RequestId; 7331 /** 7332 * Timestamp. 7333 */ 7334 timestamp: MonotonicTime; 7335 /** 7336 * WebSocket error message. 7337 */ 7338 errorMessage: string; 7339 } 7340 7341 /** 7342 * Fired when WebSocket message is received. 7343 */ 7344 export interface WebSocketFrameReceivedEvent { 7345 /** 7346 * Request identifier. 7347 */ 7348 requestId: RequestId; 7349 /** 7350 * Timestamp. 7351 */ 7352 timestamp: MonotonicTime; 7353 /** 7354 * WebSocket response data. 7355 */ 7356 response: WebSocketFrame; 7357 } 7358 7359 /** 7360 * Fired when WebSocket message is sent. 7361 */ 7362 export interface WebSocketFrameSentEvent { 7363 /** 7364 * Request identifier. 7365 */ 7366 requestId: RequestId; 7367 /** 7368 * Timestamp. 7369 */ 7370 timestamp: MonotonicTime; 7371 /** 7372 * WebSocket response data. 7373 */ 7374 response: WebSocketFrame; 7375 } 7376 7377 /** 7378 * Fired when WebSocket handshake response becomes available. 7379 */ 7380 export interface WebSocketHandshakeResponseReceivedEvent { 7381 /** 7382 * Request identifier. 7383 */ 7384 requestId: RequestId; 7385 /** 7386 * Timestamp. 7387 */ 7388 timestamp: MonotonicTime; 7389 /** 7390 * WebSocket response data. 7391 */ 7392 response: WebSocketResponse; 7393 } 7394 7395 /** 7396 * Fired when WebSocket is about to initiate handshake. 7397 */ 7398 export interface WebSocketWillSendHandshakeRequestEvent { 7399 /** 7400 * Request identifier. 7401 */ 7402 requestId: RequestId; 7403 /** 7404 * Timestamp. 7405 */ 7406 timestamp: MonotonicTime; 7407 /** 7408 * UTC Timestamp. 7409 */ 7410 wallTime: TimeSinceEpoch; 7411 /** 7412 * WebSocket request data. 7413 */ 7414 request: WebSocketRequest; 7415 } 7416 7417 /** 7418 * Fired when additional information about a requestWillBeSent event is available from the 7419 * network stack. Not every requestWillBeSent event will have an additional 7420 * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent 7421 * or requestWillBeSentExtraInfo will be fired first for the same request. 7422 */ 7423 export interface RequestWillBeSentExtraInfoEvent { 7424 /** 7425 * Request identifier. Used to match this information to an existing requestWillBeSent event. 7426 */ 7427 requestId: RequestId; 7428 /** 7429 * A list of cookies which will not be sent with this request along with corresponding reasons 7430 * for blocking. 7431 */ 7432 blockedCookies: BlockedCookieWithReason[]; 7433 /** 7434 * Raw request headers as they will be sent over the wire. 7435 */ 7436 headers: Headers; 7437 } 7438 7439 /** 7440 * Fired when additional information about a responseReceived event is available from the network 7441 * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for 7442 * it, and responseReceivedExtraInfo may be fired before or after responseReceived. 7443 */ 7444 export interface ResponseReceivedExtraInfoEvent { 7445 /** 7446 * Request identifier. Used to match this information to another responseReceived event. 7447 */ 7448 requestId: RequestId; 7449 /** 7450 * A list of cookies which were not stored from the response along with the corresponding 7451 * reasons for blocking. The cookies here may not be valid due to syntax errors, which 7452 * are represented by the invalid cookie line string instead of a proper cookie. 7453 */ 7454 blockedCookies: BlockedSetCookieWithReason[]; 7455 /** 7456 * Raw response headers as they were received over the wire. 7457 */ 7458 headers: Headers; 7459 /** 7460 * Raw response header text as it was received over the wire. The raw text may not always be 7461 * available, such as in the case of HTTP/2 or QUIC. 7462 */ 7463 headersText?: string; 7464 } 7465 } 7466 7467 /** 7468 * This domain provides various functionality related to drawing atop the inspected page. 7469 */ 7470 export namespace Overlay { 7471 7472 /** 7473 * Configuration data for the highlighting of page elements. 7474 */ 7475 export interface HighlightConfig { 7476 /** 7477 * Whether the node info tooltip should be shown (default: false). 7478 */ 7479 showInfo?: boolean; 7480 /** 7481 * Whether the node styles in the tooltip (default: false). 7482 */ 7483 showStyles?: boolean; 7484 /** 7485 * Whether the rulers should be shown (default: false). 7486 */ 7487 showRulers?: boolean; 7488 /** 7489 * Whether the extension lines from node to the rulers should be shown (default: false). 7490 */ 7491 showExtensionLines?: boolean; 7492 /** 7493 * The content box highlight fill color (default: transparent). 7494 */ 7495 contentColor?: DOM.RGBA; 7496 /** 7497 * The padding highlight fill color (default: transparent). 7498 */ 7499 paddingColor?: DOM.RGBA; 7500 /** 7501 * The border highlight fill color (default: transparent). 7502 */ 7503 borderColor?: DOM.RGBA; 7504 /** 7505 * The margin highlight fill color (default: transparent). 7506 */ 7507 marginColor?: DOM.RGBA; 7508 /** 7509 * The event target element highlight fill color (default: transparent). 7510 */ 7511 eventTargetColor?: DOM.RGBA; 7512 /** 7513 * The shape outside fill color (default: transparent). 7514 */ 7515 shapeColor?: DOM.RGBA; 7516 /** 7517 * The shape margin fill color (default: transparent). 7518 */ 7519 shapeMarginColor?: DOM.RGBA; 7520 /** 7521 * The grid layout color (default: transparent). 7522 */ 7523 cssGridColor?: DOM.RGBA; 7524 } 7525 7526 export enum InspectMode { 7527 SearchForNode = 'searchForNode', 7528 SearchForUAShadowDOM = 'searchForUAShadowDOM', 7529 CaptureAreaScreenshot = 'captureAreaScreenshot', 7530 ShowDistances = 'showDistances', 7531 None = 'none', 7532 } 7533 7534 export interface GetHighlightObjectForTestRequest { 7535 /** 7536 * Id of the node to get highlight object for. 7537 */ 7538 nodeId: DOM.NodeId; 7539 /** 7540 * Whether to include distance info. 7541 */ 7542 includeDistance?: boolean; 7543 /** 7544 * Whether to include style info. 7545 */ 7546 includeStyle?: boolean; 7547 } 7548 7549 export interface GetHighlightObjectForTestResponse { 7550 /** 7551 * Highlight data for the node. 7552 */ 7553 highlight: any; 7554 } 7555 7556 export interface HighlightFrameRequest { 7557 /** 7558 * Identifier of the frame to highlight. 7559 */ 7560 frameId: Page.FrameId; 7561 /** 7562 * The content box highlight fill color (default: transparent). 7563 */ 7564 contentColor?: DOM.RGBA; 7565 /** 7566 * The content box highlight outline color (default: transparent). 7567 */ 7568 contentOutlineColor?: DOM.RGBA; 7569 } 7570 7571 export interface HighlightNodeRequest { 7572 /** 7573 * A descriptor for the highlight appearance. 7574 */ 7575 highlightConfig: HighlightConfig; 7576 /** 7577 * Identifier of the node to highlight. 7578 */ 7579 nodeId?: DOM.NodeId; 7580 /** 7581 * Identifier of the backend node to highlight. 7582 */ 7583 backendNodeId?: DOM.BackendNodeId; 7584 /** 7585 * JavaScript object id of the node to be highlighted. 7586 */ 7587 objectId?: Runtime.RemoteObjectId; 7588 /** 7589 * Selectors to highlight relevant nodes. 7590 */ 7591 selector?: string; 7592 } 7593 7594 export interface HighlightQuadRequest { 7595 /** 7596 * Quad to highlight 7597 */ 7598 quad: DOM.Quad; 7599 /** 7600 * The highlight fill color (default: transparent). 7601 */ 7602 color?: DOM.RGBA; 7603 /** 7604 * The highlight outline color (default: transparent). 7605 */ 7606 outlineColor?: DOM.RGBA; 7607 } 7608 7609 export interface HighlightRectRequest { 7610 /** 7611 * X coordinate 7612 */ 7613 x: integer; 7614 /** 7615 * Y coordinate 7616 */ 7617 y: integer; 7618 /** 7619 * Rectangle width 7620 */ 7621 width: integer; 7622 /** 7623 * Rectangle height 7624 */ 7625 height: integer; 7626 /** 7627 * The highlight fill color (default: transparent). 7628 */ 7629 color?: DOM.RGBA; 7630 /** 7631 * The highlight outline color (default: transparent). 7632 */ 7633 outlineColor?: DOM.RGBA; 7634 } 7635 7636 export interface SetInspectModeRequest { 7637 /** 7638 * Set an inspection mode. 7639 */ 7640 mode: InspectMode; 7641 /** 7642 * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled 7643 * == false`. 7644 */ 7645 highlightConfig?: HighlightConfig; 7646 } 7647 7648 export interface SetShowAdHighlightsRequest { 7649 /** 7650 * True for showing ad highlights 7651 */ 7652 show: boolean; 7653 } 7654 7655 export interface SetPausedInDebuggerMessageRequest { 7656 /** 7657 * The message to display, also triggers resume and step over controls. 7658 */ 7659 message?: string; 7660 } 7661 7662 export interface SetShowDebugBordersRequest { 7663 /** 7664 * True for showing debug borders 7665 */ 7666 show: boolean; 7667 } 7668 7669 export interface SetShowFPSCounterRequest { 7670 /** 7671 * True for showing the FPS counter 7672 */ 7673 show: boolean; 7674 } 7675 7676 export interface SetShowPaintRectsRequest { 7677 /** 7678 * True for showing paint rectangles 7679 */ 7680 result: boolean; 7681 } 7682 7683 export interface SetShowLayoutShiftRegionsRequest { 7684 /** 7685 * True for showing layout shift regions 7686 */ 7687 result: boolean; 7688 } 7689 7690 export interface SetShowScrollBottleneckRectsRequest { 7691 /** 7692 * True for showing scroll bottleneck rects 7693 */ 7694 show: boolean; 7695 } 7696 7697 export interface SetShowHitTestBordersRequest { 7698 /** 7699 * True for showing hit-test borders 7700 */ 7701 show: boolean; 7702 } 7703 7704 export interface SetShowViewportSizeOnResizeRequest { 7705 /** 7706 * Whether to paint size or not. 7707 */ 7708 show: boolean; 7709 } 7710 7711 /** 7712 * Fired when the node should be inspected. This happens after call to `setInspectMode` or when 7713 * user manually inspects an element. 7714 */ 7715 export interface InspectNodeRequestedEvent { 7716 /** 7717 * Id of the node to inspect. 7718 */ 7719 backendNodeId: DOM.BackendNodeId; 7720 } 7721 7722 /** 7723 * Fired when the node should be highlighted. This happens after call to `setInspectMode`. 7724 */ 7725 export interface NodeHighlightRequestedEvent { 7726 nodeId: DOM.NodeId; 7727 } 7728 7729 /** 7730 * Fired when user asks to capture screenshot of some area on the page. 7731 */ 7732 export interface ScreenshotRequestedEvent { 7733 /** 7734 * Viewport to capture, in device independent pixels (dip). 7735 */ 7736 viewport: Page.Viewport; 7737 } 7738 } 7739 7740 /** 7741 * Actions and events related to the inspected page belong to the page domain. 7742 */ 7743 export namespace Page { 7744 7745 /** 7746 * Unique frame identifier. 7747 */ 7748 export type FrameId = string; 7749 7750 /** 7751 * Information about the Frame on the page. 7752 */ 7753 export interface Frame { 7754 /** 7755 * Frame unique identifier. 7756 */ 7757 id: FrameId; 7758 /** 7759 * Parent frame identifier. 7760 */ 7761 parentId?: string; 7762 /** 7763 * Identifier of the loader associated with this frame. 7764 */ 7765 loaderId: Network.LoaderId; 7766 /** 7767 * Frame's name as specified in the tag. 7768 */ 7769 name?: string; 7770 /** 7771 * Frame document's URL without fragment. 7772 */ 7773 url: string; 7774 /** 7775 * Frame document's URL fragment including the '#'. 7776 */ 7777 urlFragment?: string; 7778 /** 7779 * Frame document's security origin. 7780 */ 7781 securityOrigin: string; 7782 /** 7783 * Frame document's mimeType as determined by the browser. 7784 */ 7785 mimeType: string; 7786 /** 7787 * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment. 7788 */ 7789 unreachableUrl?: string; 7790 } 7791 7792 /** 7793 * Information about the Resource on the page. 7794 */ 7795 export interface FrameResource { 7796 /** 7797 * Resource URL. 7798 */ 7799 url: string; 7800 /** 7801 * Type of this resource. 7802 */ 7803 type: Network.ResourceType; 7804 /** 7805 * Resource mimeType as determined by the browser. 7806 */ 7807 mimeType: string; 7808 /** 7809 * last-modified timestamp as reported by server. 7810 */ 7811 lastModified?: Network.TimeSinceEpoch; 7812 /** 7813 * Resource content size. 7814 */ 7815 contentSize?: number; 7816 /** 7817 * True if the resource failed to load. 7818 */ 7819 failed?: boolean; 7820 /** 7821 * True if the resource was canceled during loading. 7822 */ 7823 canceled?: boolean; 7824 } 7825 7826 /** 7827 * Information about the Frame hierarchy along with their cached resources. 7828 */ 7829 export interface FrameResourceTree { 7830 /** 7831 * Frame information for this tree item. 7832 */ 7833 frame: Frame; 7834 /** 7835 * Child frames. 7836 */ 7837 childFrames?: FrameResourceTree[]; 7838 /** 7839 * Information about frame resources. 7840 */ 7841 resources: FrameResource[]; 7842 } 7843 7844 /** 7845 * Information about the Frame hierarchy. 7846 */ 7847 export interface FrameTree { 7848 /** 7849 * Frame information for this tree item. 7850 */ 7851 frame: Frame; 7852 /** 7853 * Child frames. 7854 */ 7855 childFrames?: FrameTree[]; 7856 } 7857 7858 /** 7859 * Unique script identifier. 7860 */ 7861 export type ScriptIdentifier = string; 7862 7863 /** 7864 * Transition type. 7865 */ 7866 export enum TransitionType { 7867 Link = 'link', 7868 Typed = 'typed', 7869 Address_bar = 'address_bar', 7870 Auto_bookmark = 'auto_bookmark', 7871 Auto_subframe = 'auto_subframe', 7872 Manual_subframe = 'manual_subframe', 7873 Generated = 'generated', 7874 Auto_toplevel = 'auto_toplevel', 7875 Form_submit = 'form_submit', 7876 Reload = 'reload', 7877 Keyword = 'keyword', 7878 Keyword_generated = 'keyword_generated', 7879 Other = 'other', 7880 } 7881 7882 /** 7883 * Navigation history entry. 7884 */ 7885 export interface NavigationEntry { 7886 /** 7887 * Unique id of the navigation history entry. 7888 */ 7889 id: integer; 7890 /** 7891 * URL of the navigation history entry. 7892 */ 7893 url: string; 7894 /** 7895 * URL that the user typed in the url bar. 7896 */ 7897 userTypedURL: string; 7898 /** 7899 * Title of the navigation history entry. 7900 */ 7901 title: string; 7902 /** 7903 * Transition type. 7904 */ 7905 transitionType: TransitionType; 7906 } 7907 7908 /** 7909 * Screencast frame metadata. 7910 */ 7911 export interface ScreencastFrameMetadata { 7912 /** 7913 * Top offset in DIP. 7914 */ 7915 offsetTop: number; 7916 /** 7917 * Page scale factor. 7918 */ 7919 pageScaleFactor: number; 7920 /** 7921 * Device screen width in DIP. 7922 */ 7923 deviceWidth: number; 7924 /** 7925 * Device screen height in DIP. 7926 */ 7927 deviceHeight: number; 7928 /** 7929 * Position of horizontal scroll in CSS pixels. 7930 */ 7931 scrollOffsetX: number; 7932 /** 7933 * Position of vertical scroll in CSS pixels. 7934 */ 7935 scrollOffsetY: number; 7936 /** 7937 * Frame swap timestamp. 7938 */ 7939 timestamp?: Network.TimeSinceEpoch; 7940 } 7941 7942 /** 7943 * Javascript dialog type. 7944 */ 7945 export enum DialogType { 7946 Alert = 'alert', 7947 Confirm = 'confirm', 7948 Prompt = 'prompt', 7949 Beforeunload = 'beforeunload', 7950 } 7951 7952 /** 7953 * Error while paring app manifest. 7954 */ 7955 export interface AppManifestError { 7956 /** 7957 * Error message. 7958 */ 7959 message: string; 7960 /** 7961 * If criticial, this is a non-recoverable parse error. 7962 */ 7963 critical: integer; 7964 /** 7965 * Error line. 7966 */ 7967 line: integer; 7968 /** 7969 * Error column. 7970 */ 7971 column: integer; 7972 } 7973 7974 /** 7975 * Parsed app manifest properties. 7976 */ 7977 export interface AppManifestParsedProperties { 7978 /** 7979 * Computed scope value 7980 */ 7981 scope: string; 7982 } 7983 7984 /** 7985 * Layout viewport position and dimensions. 7986 */ 7987 export interface LayoutViewport { 7988 /** 7989 * Horizontal offset relative to the document (CSS pixels). 7990 */ 7991 pageX: integer; 7992 /** 7993 * Vertical offset relative to the document (CSS pixels). 7994 */ 7995 pageY: integer; 7996 /** 7997 * Width (CSS pixels), excludes scrollbar if present. 7998 */ 7999 clientWidth: integer; 8000 /** 8001 * Height (CSS pixels), excludes scrollbar if present. 8002 */ 8003 clientHeight: integer; 8004 } 8005 8006 /** 8007 * Visual viewport position, dimensions, and scale. 8008 */ 8009 export interface VisualViewport { 8010 /** 8011 * Horizontal offset relative to the layout viewport (CSS pixels). 8012 */ 8013 offsetX: number; 8014 /** 8015 * Vertical offset relative to the layout viewport (CSS pixels). 8016 */ 8017 offsetY: number; 8018 /** 8019 * Horizontal offset relative to the document (CSS pixels). 8020 */ 8021 pageX: number; 8022 /** 8023 * Vertical offset relative to the document (CSS pixels). 8024 */ 8025 pageY: number; 8026 /** 8027 * Width (CSS pixels), excludes scrollbar if present. 8028 */ 8029 clientWidth: number; 8030 /** 8031 * Height (CSS pixels), excludes scrollbar if present. 8032 */ 8033 clientHeight: number; 8034 /** 8035 * Scale relative to the ideal viewport (size at width=device-width). 8036 */ 8037 scale: number; 8038 /** 8039 * Page zoom factor (CSS to device independent pixels ratio). 8040 */ 8041 zoom?: number; 8042 } 8043 8044 /** 8045 * Viewport for capturing screenshot. 8046 */ 8047 export interface Viewport { 8048 /** 8049 * X offset in device independent pixels (dip). 8050 */ 8051 x: number; 8052 /** 8053 * Y offset in device independent pixels (dip). 8054 */ 8055 y: number; 8056 /** 8057 * Rectangle width in device independent pixels (dip). 8058 */ 8059 width: number; 8060 /** 8061 * Rectangle height in device independent pixels (dip). 8062 */ 8063 height: number; 8064 /** 8065 * Page scale factor. 8066 */ 8067 scale: number; 8068 } 8069 8070 /** 8071 * Generic font families collection. 8072 */ 8073 export interface FontFamilies { 8074 /** 8075 * The standard font-family. 8076 */ 8077 standard?: string; 8078 /** 8079 * The fixed font-family. 8080 */ 8081 fixed?: string; 8082 /** 8083 * The serif font-family. 8084 */ 8085 serif?: string; 8086 /** 8087 * The sansSerif font-family. 8088 */ 8089 sansSerif?: string; 8090 /** 8091 * The cursive font-family. 8092 */ 8093 cursive?: string; 8094 /** 8095 * The fantasy font-family. 8096 */ 8097 fantasy?: string; 8098 /** 8099 * The pictograph font-family. 8100 */ 8101 pictograph?: string; 8102 } 8103 8104 /** 8105 * Default font sizes. 8106 */ 8107 export interface FontSizes { 8108 /** 8109 * Default standard font size. 8110 */ 8111 standard?: integer; 8112 /** 8113 * Default fixed font size. 8114 */ 8115 fixed?: integer; 8116 } 8117 8118 export enum ClientNavigationReason { 8119 FormSubmissionGet = 'formSubmissionGet', 8120 FormSubmissionPost = 'formSubmissionPost', 8121 HttpHeaderRefresh = 'httpHeaderRefresh', 8122 ScriptInitiated = 'scriptInitiated', 8123 MetaTagRefresh = 'metaTagRefresh', 8124 PageBlockInterstitial = 'pageBlockInterstitial', 8125 Reload = 'reload', 8126 AnchorClick = 'anchorClick', 8127 } 8128 8129 export interface InstallabilityErrorArgument { 8130 /** 8131 * Argument name (e.g. name:'minimum-icon-size-in-pixels'). 8132 */ 8133 name: string; 8134 /** 8135 * Argument value (e.g. value:'64'). 8136 */ 8137 value: string; 8138 } 8139 8140 /** 8141 * The installability error 8142 */ 8143 export interface InstallabilityError { 8144 /** 8145 * The error id (e.g. 'manifest-missing-suitable-icon'). 8146 */ 8147 errorId: string; 8148 /** 8149 * The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}). 8150 */ 8151 errorArguments: InstallabilityErrorArgument[]; 8152 } 8153 8154 /** 8155 * The referring-policy used for the navigation. 8156 */ 8157 export enum ReferrerPolicy { 8158 NoReferrer = 'noReferrer', 8159 NoReferrerWhenDowngrade = 'noReferrerWhenDowngrade', 8160 Origin = 'origin', 8161 OriginWhenCrossOrigin = 'originWhenCrossOrigin', 8162 SameOrigin = 'sameOrigin', 8163 StrictOrigin = 'strictOrigin', 8164 StrictOriginWhenCrossOrigin = 'strictOriginWhenCrossOrigin', 8165 UnsafeUrl = 'unsafeUrl', 8166 } 8167 8168 export interface AddScriptToEvaluateOnLoadRequest { 8169 scriptSource: string; 8170 } 8171 8172 export interface AddScriptToEvaluateOnLoadResponse { 8173 /** 8174 * Identifier of the added script. 8175 */ 8176 identifier: ScriptIdentifier; 8177 } 8178 8179 export interface AddScriptToEvaluateOnNewDocumentRequest { 8180 source: string; 8181 /** 8182 * If specified, creates an isolated world with the given name and evaluates given script in it. 8183 * This world name will be used as the ExecutionContextDescription::name when the corresponding 8184 * event is emitted. 8185 */ 8186 worldName?: string; 8187 } 8188 8189 export interface AddScriptToEvaluateOnNewDocumentResponse { 8190 /** 8191 * Identifier of the added script. 8192 */ 8193 identifier: ScriptIdentifier; 8194 } 8195 8196 export enum CaptureScreenshotRequestFormat { 8197 Jpeg = 'jpeg', 8198 Png = 'png', 8199 } 8200 8201 export interface CaptureScreenshotRequest { 8202 /** 8203 * Image compression format (defaults to png). 8204 */ 8205 format?: CaptureScreenshotRequestFormat; 8206 /** 8207 * Compression quality from range [0..100] (jpeg only). 8208 */ 8209 quality?: integer; 8210 /** 8211 * Capture the screenshot of a given region only. 8212 */ 8213 clip?: Viewport; 8214 /** 8215 * Capture the screenshot from the surface, rather than the view. Defaults to true. 8216 */ 8217 fromSurface?: boolean; 8218 } 8219 8220 export interface CaptureScreenshotResponse { 8221 /** 8222 * Base64-encoded image data. 8223 */ 8224 data: binary; 8225 } 8226 8227 export enum CaptureSnapshotRequestFormat { 8228 MHTML = 'mhtml', 8229 } 8230 8231 export interface CaptureSnapshotRequest { 8232 /** 8233 * Format (defaults to mhtml). 8234 */ 8235 format?: CaptureSnapshotRequestFormat; 8236 } 8237 8238 export interface CaptureSnapshotResponse { 8239 /** 8240 * Serialized page data. 8241 */ 8242 data: string; 8243 } 8244 8245 export interface CreateIsolatedWorldRequest { 8246 /** 8247 * Id of the frame in which the isolated world should be created. 8248 */ 8249 frameId: FrameId; 8250 /** 8251 * An optional name which is reported in the Execution Context. 8252 */ 8253 worldName?: string; 8254 /** 8255 * Whether or not universal access should be granted to the isolated world. This is a powerful 8256 * option, use with caution. 8257 */ 8258 grantUniveralAccess?: boolean; 8259 } 8260 8261 export interface CreateIsolatedWorldResponse { 8262 /** 8263 * Execution context of the isolated world. 8264 */ 8265 executionContextId: Runtime.ExecutionContextId; 8266 } 8267 8268 export interface DeleteCookieRequest { 8269 /** 8270 * Name of the cookie to remove. 8271 */ 8272 cookieName: string; 8273 /** 8274 * URL to match cooke domain and path. 8275 */ 8276 url: string; 8277 } 8278 8279 export interface GetAppManifestResponse { 8280 /** 8281 * Manifest location. 8282 */ 8283 url: string; 8284 errors: AppManifestError[]; 8285 /** 8286 * Manifest content. 8287 */ 8288 data?: string; 8289 /** 8290 * Parsed manifest properties 8291 */ 8292 parsed?: AppManifestParsedProperties; 8293 } 8294 8295 export interface GetInstallabilityErrorsResponse { 8296 installabilityErrors: InstallabilityError[]; 8297 } 8298 8299 export interface GetManifestIconsResponse { 8300 primaryIcon?: binary; 8301 } 8302 8303 export interface GetCookiesResponse { 8304 /** 8305 * Array of cookie objects. 8306 */ 8307 cookies: Network.Cookie[]; 8308 } 8309 8310 export interface GetFrameTreeResponse { 8311 /** 8312 * Present frame tree structure. 8313 */ 8314 frameTree: FrameTree; 8315 } 8316 8317 export interface GetLayoutMetricsResponse { 8318 /** 8319 * Metrics relating to the layout viewport. 8320 */ 8321 layoutViewport: LayoutViewport; 8322 /** 8323 * Metrics relating to the visual viewport. 8324 */ 8325 visualViewport: VisualViewport; 8326 /** 8327 * Size of scrollable area. 8328 */ 8329 contentSize: DOM.Rect; 8330 } 8331 8332 export interface GetNavigationHistoryResponse { 8333 /** 8334 * Index of the current navigation history entry. 8335 */ 8336 currentIndex: integer; 8337 /** 8338 * Array of navigation history entries. 8339 */ 8340 entries: NavigationEntry[]; 8341 } 8342 8343 export interface GetResourceContentRequest { 8344 /** 8345 * Frame id to get resource for. 8346 */ 8347 frameId: FrameId; 8348 /** 8349 * URL of the resource to get content for. 8350 */ 8351 url: string; 8352 } 8353 8354 export interface GetResourceContentResponse { 8355 /** 8356 * Resource content. 8357 */ 8358 content: string; 8359 /** 8360 * True, if content was served as base64. 8361 */ 8362 base64Encoded: boolean; 8363 } 8364 8365 export interface GetResourceTreeResponse { 8366 /** 8367 * Present frame / resource tree structure. 8368 */ 8369 frameTree: FrameResourceTree; 8370 } 8371 8372 export interface HandleJavaScriptDialogRequest { 8373 /** 8374 * Whether to accept or dismiss the dialog. 8375 */ 8376 accept: boolean; 8377 /** 8378 * The text to enter into the dialog prompt before accepting. Used only if this is a prompt 8379 * dialog. 8380 */ 8381 promptText?: string; 8382 } 8383 8384 export interface NavigateRequest { 8385 /** 8386 * URL to navigate the page to. 8387 */ 8388 url: string; 8389 /** 8390 * Referrer URL. 8391 */ 8392 referrer?: string; 8393 /** 8394 * Intended transition type. 8395 */ 8396 transitionType?: TransitionType; 8397 /** 8398 * Frame id to navigate, if not specified navigates the top frame. 8399 */ 8400 frameId?: FrameId; 8401 /** 8402 * Referrer-policy used for the navigation. 8403 */ 8404 referrerPolicy?: ReferrerPolicy; 8405 } 8406 8407 export interface NavigateResponse { 8408 /** 8409 * Frame id that has navigated (or failed to navigate) 8410 */ 8411 frameId: FrameId; 8412 /** 8413 * Loader identifier. 8414 */ 8415 loaderId?: Network.LoaderId; 8416 /** 8417 * User friendly error message, present if and only if navigation has failed. 8418 */ 8419 errorText?: string; 8420 } 8421 8422 export interface NavigateToHistoryEntryRequest { 8423 /** 8424 * Unique id of the entry to navigate to. 8425 */ 8426 entryId: integer; 8427 } 8428 8429 export enum PrintToPDFRequestTransferMode { 8430 ReturnAsBase64 = 'ReturnAsBase64', 8431 ReturnAsStream = 'ReturnAsStream', 8432 } 8433 8434 export interface PrintToPDFRequest { 8435 /** 8436 * Paper orientation. Defaults to false. 8437 */ 8438 landscape?: boolean; 8439 /** 8440 * Display header and footer. Defaults to false. 8441 */ 8442 displayHeaderFooter?: boolean; 8443 /** 8444 * Print background graphics. Defaults to false. 8445 */ 8446 printBackground?: boolean; 8447 /** 8448 * Scale of the webpage rendering. Defaults to 1. 8449 */ 8450 scale?: number; 8451 /** 8452 * Paper width in inches. Defaults to 8.5 inches. 8453 */ 8454 paperWidth?: number; 8455 /** 8456 * Paper height in inches. Defaults to 11 inches. 8457 */ 8458 paperHeight?: number; 8459 /** 8460 * Top margin in inches. Defaults to 1cm (~0.4 inches). 8461 */ 8462 marginTop?: number; 8463 /** 8464 * Bottom margin in inches. Defaults to 1cm (~0.4 inches). 8465 */ 8466 marginBottom?: number; 8467 /** 8468 * Left margin in inches. Defaults to 1cm (~0.4 inches). 8469 */ 8470 marginLeft?: number; 8471 /** 8472 * Right margin in inches. Defaults to 1cm (~0.4 inches). 8473 */ 8474 marginRight?: number; 8475 /** 8476 * Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means 8477 * print all pages. 8478 */ 8479 pageRanges?: string; 8480 /** 8481 * Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. 8482 * Defaults to false. 8483 */ 8484 ignoreInvalidPageRanges?: boolean; 8485 /** 8486 * HTML template for the print header. Should be valid HTML markup with following 8487 * classes used to inject printing values into them: 8488 * - `date`: formatted print date 8489 * - `title`: document title 8490 * - `url`: document location 8491 * - `pageNumber`: current page number 8492 * - `totalPages`: total pages in the document 8493 * 8494 * For example, `<span class=title></span>` would generate span containing the title. 8495 */ 8496 headerTemplate?: string; 8497 /** 8498 * HTML template for the print footer. Should use the same format as the `headerTemplate`. 8499 */ 8500 footerTemplate?: string; 8501 /** 8502 * Whether or not to prefer page size as defined by css. Defaults to false, 8503 * in which case the content will be scaled to fit the paper size. 8504 */ 8505 preferCSSPageSize?: boolean; 8506 /** 8507 * return as stream 8508 */ 8509 transferMode?: PrintToPDFRequestTransferMode; 8510 } 8511 8512 export interface PrintToPDFResponse { 8513 /** 8514 * Base64-encoded pdf data. Empty if |returnAsStream| is specified. 8515 */ 8516 data: binary; 8517 /** 8518 * A handle of the stream that holds resulting PDF data. 8519 */ 8520 stream?: IO.StreamHandle; 8521 } 8522 8523 export interface ReloadRequest { 8524 /** 8525 * If true, browser cache is ignored (as if the user pressed Shift+refresh). 8526 */ 8527 ignoreCache?: boolean; 8528 /** 8529 * If set, the script will be injected into all frames of the inspected page after reload. 8530 * Argument will be ignored if reloading dataURL origin. 8531 */ 8532 scriptToEvaluateOnLoad?: string; 8533 } 8534 8535 export interface RemoveScriptToEvaluateOnLoadRequest { 8536 identifier: ScriptIdentifier; 8537 } 8538 8539 export interface RemoveScriptToEvaluateOnNewDocumentRequest { 8540 identifier: ScriptIdentifier; 8541 } 8542 8543 export interface ScreencastFrameAckRequest { 8544 /** 8545 * Frame number. 8546 */ 8547 sessionId: integer; 8548 } 8549 8550 export interface SearchInResourceRequest { 8551 /** 8552 * Frame id for resource to search in. 8553 */ 8554 frameId: FrameId; 8555 /** 8556 * URL of the resource to search in. 8557 */ 8558 url: string; 8559 /** 8560 * String to search for. 8561 */ 8562 query: string; 8563 /** 8564 * If true, search is case sensitive. 8565 */ 8566 caseSensitive?: boolean; 8567 /** 8568 * If true, treats string parameter as regex. 8569 */ 8570 isRegex?: boolean; 8571 } 8572 8573 export interface SearchInResourceResponse { 8574 /** 8575 * List of search matches. 8576 */ 8577 result: Debugger.SearchMatch[]; 8578 } 8579 8580 export interface SetAdBlockingEnabledRequest { 8581 /** 8582 * Whether to block ads. 8583 */ 8584 enabled: boolean; 8585 } 8586 8587 export interface SetBypassCSPRequest { 8588 /** 8589 * Whether to bypass page CSP. 8590 */ 8591 enabled: boolean; 8592 } 8593 8594 export interface SetDeviceMetricsOverrideRequest { 8595 /** 8596 * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. 8597 */ 8598 width: integer; 8599 /** 8600 * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. 8601 */ 8602 height: integer; 8603 /** 8604 * Overriding device scale factor value. 0 disables the override. 8605 */ 8606 deviceScaleFactor: number; 8607 /** 8608 * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text 8609 * autosizing and more. 8610 */ 8611 mobile: boolean; 8612 /** 8613 * Scale to apply to resulting view image. 8614 */ 8615 scale?: number; 8616 /** 8617 * Overriding screen width value in pixels (minimum 0, maximum 10000000). 8618 */ 8619 screenWidth?: integer; 8620 /** 8621 * Overriding screen height value in pixels (minimum 0, maximum 10000000). 8622 */ 8623 screenHeight?: integer; 8624 /** 8625 * Overriding view X position on screen in pixels (minimum 0, maximum 10000000). 8626 */ 8627 positionX?: integer; 8628 /** 8629 * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). 8630 */ 8631 positionY?: integer; 8632 /** 8633 * Do not set visible view size, rely upon explicit setVisibleSize call. 8634 */ 8635 dontSetVisibleSize?: boolean; 8636 /** 8637 * Screen orientation override. 8638 */ 8639 screenOrientation?: Emulation.ScreenOrientation; 8640 /** 8641 * The viewport dimensions and scale. If not set, the override is cleared. 8642 */ 8643 viewport?: Viewport; 8644 } 8645 8646 export interface SetDeviceOrientationOverrideRequest { 8647 /** 8648 * Mock alpha 8649 */ 8650 alpha: number; 8651 /** 8652 * Mock beta 8653 */ 8654 beta: number; 8655 /** 8656 * Mock gamma 8657 */ 8658 gamma: number; 8659 } 8660 8661 export interface SetFontFamiliesRequest { 8662 /** 8663 * Specifies font families to set. If a font family is not specified, it won't be changed. 8664 */ 8665 fontFamilies: FontFamilies; 8666 } 8667 8668 export interface SetFontSizesRequest { 8669 /** 8670 * Specifies font sizes to set. If a font size is not specified, it won't be changed. 8671 */ 8672 fontSizes: FontSizes; 8673 } 8674 8675 export interface SetDocumentContentRequest { 8676 /** 8677 * Frame id to set HTML for. 8678 */ 8679 frameId: FrameId; 8680 /** 8681 * HTML content to set. 8682 */ 8683 html: string; 8684 } 8685 8686 export enum SetDownloadBehaviorRequestBehavior { 8687 Deny = 'deny', 8688 Allow = 'allow', 8689 Default = 'default', 8690 } 8691 8692 export interface SetDownloadBehaviorRequest { 8693 /** 8694 * Whether to allow all or deny all download requests, or use default Chrome behavior if 8695 * available (otherwise deny). 8696 */ 8697 behavior: SetDownloadBehaviorRequestBehavior; 8698 /** 8699 * The default path to save downloaded files to. This is requred if behavior is set to 'allow' 8700 */ 8701 downloadPath?: string; 8702 } 8703 8704 export interface SetGeolocationOverrideRequest { 8705 /** 8706 * Mock latitude 8707 */ 8708 latitude?: number; 8709 /** 8710 * Mock longitude 8711 */ 8712 longitude?: number; 8713 /** 8714 * Mock accuracy 8715 */ 8716 accuracy?: number; 8717 } 8718 8719 export interface SetLifecycleEventsEnabledRequest { 8720 /** 8721 * If true, starts emitting lifecycle events. 8722 */ 8723 enabled: boolean; 8724 } 8725 8726 export enum SetTouchEmulationEnabledRequestConfiguration { 8727 Mobile = 'mobile', 8728 Desktop = 'desktop', 8729 } 8730 8731 export interface SetTouchEmulationEnabledRequest { 8732 /** 8733 * Whether the touch event emulation should be enabled. 8734 */ 8735 enabled: boolean; 8736 /** 8737 * Touch/gesture events configuration. Default: current platform. 8738 */ 8739 configuration?: SetTouchEmulationEnabledRequestConfiguration; 8740 } 8741 8742 export enum StartScreencastRequestFormat { 8743 Jpeg = 'jpeg', 8744 Png = 'png', 8745 } 8746 8747 export interface StartScreencastRequest { 8748 /** 8749 * Image compression format. 8750 */ 8751 format?: StartScreencastRequestFormat; 8752 /** 8753 * Compression quality from range [0..100]. 8754 */ 8755 quality?: integer; 8756 /** 8757 * Maximum screenshot width. 8758 */ 8759 maxWidth?: integer; 8760 /** 8761 * Maximum screenshot height. 8762 */ 8763 maxHeight?: integer; 8764 /** 8765 * Send every n-th frame. 8766 */ 8767 everyNthFrame?: integer; 8768 } 8769 8770 export enum SetWebLifecycleStateRequestState { 8771 Frozen = 'frozen', 8772 Active = 'active', 8773 } 8774 8775 export interface SetWebLifecycleStateRequest { 8776 /** 8777 * Target lifecycle state 8778 */ 8779 state: SetWebLifecycleStateRequestState; 8780 } 8781 8782 export interface SetProduceCompilationCacheRequest { 8783 enabled: boolean; 8784 } 8785 8786 export interface AddCompilationCacheRequest { 8787 url: string; 8788 /** 8789 * Base64-encoded data 8790 */ 8791 data: binary; 8792 } 8793 8794 export interface GenerateTestReportRequest { 8795 /** 8796 * Message to be displayed in the report. 8797 */ 8798 message: string; 8799 /** 8800 * Specifies the endpoint group to deliver the report to. 8801 */ 8802 group?: string; 8803 } 8804 8805 export interface SetInterceptFileChooserDialogRequest { 8806 enabled: boolean; 8807 } 8808 8809 export interface DomContentEventFiredEvent { 8810 timestamp: Network.MonotonicTime; 8811 } 8812 8813 export enum FileChooserOpenedEventMode { 8814 SelectSingle = 'selectSingle', 8815 SelectMultiple = 'selectMultiple', 8816 } 8817 8818 /** 8819 * Emitted only when `page.interceptFileChooser` is enabled. 8820 */ 8821 export interface FileChooserOpenedEvent { 8822 /** 8823 * Id of the frame containing input node. 8824 */ 8825 frameId: FrameId; 8826 /** 8827 * Input node id. 8828 */ 8829 backendNodeId: DOM.BackendNodeId; 8830 /** 8831 * Input mode. 8832 */ 8833 mode: FileChooserOpenedEventMode; 8834 } 8835 8836 /** 8837 * Fired when frame has been attached to its parent. 8838 */ 8839 export interface FrameAttachedEvent { 8840 /** 8841 * Id of the frame that has been attached. 8842 */ 8843 frameId: FrameId; 8844 /** 8845 * Parent frame identifier. 8846 */ 8847 parentFrameId: FrameId; 8848 /** 8849 * JavaScript stack trace of when frame was attached, only set if frame initiated from script. 8850 */ 8851 stack?: Runtime.StackTrace; 8852 } 8853 8854 /** 8855 * Fired when frame no longer has a scheduled navigation. 8856 */ 8857 export interface FrameClearedScheduledNavigationEvent { 8858 /** 8859 * Id of the frame that has cleared its scheduled navigation. 8860 */ 8861 frameId: FrameId; 8862 } 8863 8864 /** 8865 * Fired when frame has been detached from its parent. 8866 */ 8867 export interface FrameDetachedEvent { 8868 /** 8869 * Id of the frame that has been detached. 8870 */ 8871 frameId: FrameId; 8872 } 8873 8874 /** 8875 * Fired once navigation of the frame has completed. Frame is now associated with the new loader. 8876 */ 8877 export interface FrameNavigatedEvent { 8878 /** 8879 * Frame object. 8880 */ 8881 frame: Frame; 8882 } 8883 8884 /** 8885 * Fired when a renderer-initiated navigation is requested. 8886 * Navigation may still be cancelled after the event is issued. 8887 */ 8888 export interface FrameRequestedNavigationEvent { 8889 /** 8890 * Id of the frame that is being navigated. 8891 */ 8892 frameId: FrameId; 8893 /** 8894 * The reason for the navigation. 8895 */ 8896 reason: ClientNavigationReason; 8897 /** 8898 * The destination URL for the requested navigation. 8899 */ 8900 url: string; 8901 } 8902 8903 /** 8904 * Fired when frame schedules a potential navigation. 8905 */ 8906 export interface FrameScheduledNavigationEvent { 8907 /** 8908 * Id of the frame that has scheduled a navigation. 8909 */ 8910 frameId: FrameId; 8911 /** 8912 * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not 8913 * guaranteed to start. 8914 */ 8915 delay: number; 8916 /** 8917 * The reason for the navigation. 8918 */ 8919 reason: ClientNavigationReason; 8920 /** 8921 * The destination URL for the scheduled navigation. 8922 */ 8923 url: string; 8924 } 8925 8926 /** 8927 * Fired when frame has started loading. 8928 */ 8929 export interface FrameStartedLoadingEvent { 8930 /** 8931 * Id of the frame that has started loading. 8932 */ 8933 frameId: FrameId; 8934 } 8935 8936 /** 8937 * Fired when frame has stopped loading. 8938 */ 8939 export interface FrameStoppedLoadingEvent { 8940 /** 8941 * Id of the frame that has stopped loading. 8942 */ 8943 frameId: FrameId; 8944 } 8945 8946 /** 8947 * Fired when page is about to start a download. 8948 */ 8949 export interface DownloadWillBeginEvent { 8950 /** 8951 * Id of the frame that caused download to begin. 8952 */ 8953 frameId: FrameId; 8954 /** 8955 * URL of the resource being downloaded. 8956 */ 8957 url: string; 8958 } 8959 8960 /** 8961 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been 8962 * closed. 8963 */ 8964 export interface JavascriptDialogClosedEvent { 8965 /** 8966 * Whether dialog was confirmed. 8967 */ 8968 result: boolean; 8969 /** 8970 * User input in case of prompt. 8971 */ 8972 userInput: string; 8973 } 8974 8975 /** 8976 * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to 8977 * open. 8978 */ 8979 export interface JavascriptDialogOpeningEvent { 8980 /** 8981 * Frame url. 8982 */ 8983 url: string; 8984 /** 8985 * Message that will be displayed by the dialog. 8986 */ 8987 message: string; 8988 /** 8989 * Dialog type. 8990 */ 8991 type: DialogType; 8992 /** 8993 * True iff browser is capable showing or acting on the given dialog. When browser has no 8994 * dialog handler for given target, calling alert while Page domain is engaged will stall 8995 * the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. 8996 */ 8997 hasBrowserHandler: boolean; 8998 /** 8999 * Default dialog prompt. 9000 */ 9001 defaultPrompt?: string; 9002 } 9003 9004 /** 9005 * Fired for top level page lifecycle events such as navigation, load, paint, etc. 9006 */ 9007 export interface LifecycleEventEvent { 9008 /** 9009 * Id of the frame. 9010 */ 9011 frameId: FrameId; 9012 /** 9013 * Loader identifier. Empty string if the request is fetched from worker. 9014 */ 9015 loaderId: Network.LoaderId; 9016 name: string; 9017 timestamp: Network.MonotonicTime; 9018 } 9019 9020 export interface LoadEventFiredEvent { 9021 timestamp: Network.MonotonicTime; 9022 } 9023 9024 /** 9025 * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. 9026 */ 9027 export interface NavigatedWithinDocumentEvent { 9028 /** 9029 * Id of the frame. 9030 */ 9031 frameId: FrameId; 9032 /** 9033 * Frame's new url. 9034 */ 9035 url: string; 9036 } 9037 9038 /** 9039 * Compressed image data requested by the `startScreencast`. 9040 */ 9041 export interface ScreencastFrameEvent { 9042 /** 9043 * Base64-encoded compressed image. 9044 */ 9045 data: binary; 9046 /** 9047 * Screencast frame metadata. 9048 */ 9049 metadata: ScreencastFrameMetadata; 9050 /** 9051 * Frame number. 9052 */ 9053 sessionId: integer; 9054 } 9055 9056 /** 9057 * Fired when the page with currently enabled screencast was shown or hidden `. 9058 */ 9059 export interface ScreencastVisibilityChangedEvent { 9060 /** 9061 * True if the page is visible. 9062 */ 9063 visible: boolean; 9064 } 9065 9066 /** 9067 * Fired when a new window is going to be opened, via window.open(), link click, form submission, 9068 * etc. 9069 */ 9070 export interface WindowOpenEvent { 9071 /** 9072 * The URL for the new window. 9073 */ 9074 url: string; 9075 /** 9076 * Window name. 9077 */ 9078 windowName: string; 9079 /** 9080 * An array of enabled window features. 9081 */ 9082 windowFeatures: string[]; 9083 /** 9084 * Whether or not it was triggered by user gesture. 9085 */ 9086 userGesture: boolean; 9087 } 9088 9089 /** 9090 * Issued for every compilation cache generated. Is only available 9091 * if Page.setGenerateCompilationCache is enabled. 9092 */ 9093 export interface CompilationCacheProducedEvent { 9094 url: string; 9095 /** 9096 * Base64-encoded data 9097 */ 9098 data: binary; 9099 } 9100 } 9101 9102 export namespace Performance { 9103 9104 /** 9105 * Run-time execution metric. 9106 */ 9107 export interface Metric { 9108 /** 9109 * Metric name. 9110 */ 9111 name: string; 9112 /** 9113 * Metric value. 9114 */ 9115 value: number; 9116 } 9117 9118 export enum EnableRequestTimeDomain { 9119 TimeTicks = 'timeTicks', 9120 ThreadTicks = 'threadTicks', 9121 } 9122 9123 export interface EnableRequest { 9124 /** 9125 * Time domain to use for collecting and reporting duration metrics. 9126 */ 9127 timeDomain?: EnableRequestTimeDomain; 9128 } 9129 9130 export enum SetTimeDomainRequestTimeDomain { 9131 TimeTicks = 'timeTicks', 9132 ThreadTicks = 'threadTicks', 9133 } 9134 9135 export interface SetTimeDomainRequest { 9136 /** 9137 * Time domain 9138 */ 9139 timeDomain: SetTimeDomainRequestTimeDomain; 9140 } 9141 9142 export interface GetMetricsResponse { 9143 /** 9144 * Current values for run-time metrics. 9145 */ 9146 metrics: Metric[]; 9147 } 9148 9149 /** 9150 * Current values of the metrics. 9151 */ 9152 export interface MetricsEvent { 9153 /** 9154 * Current values of the metrics. 9155 */ 9156 metrics: Metric[]; 9157 /** 9158 * Timestamp title. 9159 */ 9160 title: string; 9161 } 9162 } 9163 9164 /** 9165 * Security 9166 */ 9167 export namespace Security { 9168 9169 /** 9170 * An internal certificate ID value. 9171 */ 9172 export type CertificateId = integer; 9173 9174 /** 9175 * A description of mixed content (HTTP resources on HTTPS pages), as defined by 9176 * https://www.w3.org/TR/mixed-content/#categories 9177 */ 9178 export enum MixedContentType { 9179 Blockable = 'blockable', 9180 OptionallyBlockable = 'optionally-blockable', 9181 None = 'none', 9182 } 9183 9184 /** 9185 * The security level of a page or resource. 9186 */ 9187 export enum SecurityState { 9188 Unknown = 'unknown', 9189 Neutral = 'neutral', 9190 Insecure = 'insecure', 9191 Secure = 'secure', 9192 Info = 'info', 9193 InsecureBroken = 'insecure-broken', 9194 } 9195 9196 /** 9197 * Details about the security state of the page certificate. 9198 */ 9199 export interface CertificateSecurityState { 9200 /** 9201 * Protocol name (e.g. "TLS 1.2" or "QUIC"). 9202 */ 9203 protocol: string; 9204 /** 9205 * Key Exchange used by the connection, or the empty string if not applicable. 9206 */ 9207 keyExchange: string; 9208 /** 9209 * (EC)DH group used by the connection, if applicable. 9210 */ 9211 keyExchangeGroup?: string; 9212 /** 9213 * Cipher name. 9214 */ 9215 cipher: string; 9216 /** 9217 * TLS MAC. Note that AEAD ciphers do not have separate MACs. 9218 */ 9219 mac?: string; 9220 /** 9221 * Page certificate. 9222 */ 9223 certificate: string[]; 9224 /** 9225 * Certificate subject name. 9226 */ 9227 subjectName: string; 9228 /** 9229 * Name of the issuing CA. 9230 */ 9231 issuer: string; 9232 /** 9233 * Certificate valid from date. 9234 */ 9235 validFrom: Network.TimeSinceEpoch; 9236 /** 9237 * Certificate valid to (expiration) date 9238 */ 9239 validTo: Network.TimeSinceEpoch; 9240 /** 9241 * The highest priority network error code, if the certificate has an error. 9242 */ 9243 certificateNetworkError?: string; 9244 /** 9245 * True if the certificate uses a weak signature aglorithm. 9246 */ 9247 certificateHasWeakSignature: boolean; 9248 /** 9249 * True if the certificate has a SHA1 signature in the chain. 9250 */ 9251 certificateHasSha1Signature: boolean; 9252 /** 9253 * True if modern SSL 9254 */ 9255 modernSSL: boolean; 9256 /** 9257 * True if the connection is using an obsolete SSL protocol. 9258 */ 9259 obsoleteSslProtocol: boolean; 9260 /** 9261 * True if the connection is using an obsolete SSL key exchange. 9262 */ 9263 obsoleteSslKeyExchange: boolean; 9264 /** 9265 * True if the connection is using an obsolete SSL cipher. 9266 */ 9267 obsoleteSslCipher: boolean; 9268 /** 9269 * True if the connection is using an obsolete SSL signature. 9270 */ 9271 obsoleteSslSignature: boolean; 9272 } 9273 9274 export enum SafetyTipStatus { 9275 BadReputation = 'badReputation', 9276 Lookalike = 'lookalike', 9277 } 9278 9279 export interface SafetyTipInfo { 9280 /** 9281 * Describes whether the page triggers any safety tips or reputation warnings. Default is unknown. 9282 */ 9283 safetyTipStatus: SafetyTipStatus; 9284 /** 9285 * The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches. 9286 */ 9287 safeUrl?: string; 9288 } 9289 9290 /** 9291 * Security state information about the page. 9292 */ 9293 export interface VisibleSecurityState { 9294 /** 9295 * The security level of the page. 9296 */ 9297 securityState: SecurityState; 9298 /** 9299 * Security state details about the page certificate. 9300 */ 9301 certificateSecurityState?: CertificateSecurityState; 9302 /** 9303 * The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown. 9304 */ 9305 safetyTipInfo?: SafetyTipInfo; 9306 /** 9307 * Array of security state issues ids. 9308 */ 9309 securityStateIssueIds: string[]; 9310 } 9311 9312 /** 9313 * An explanation of an factor contributing to the security state. 9314 */ 9315 export interface SecurityStateExplanation { 9316 /** 9317 * Security state representing the severity of the factor being explained. 9318 */ 9319 securityState: SecurityState; 9320 /** 9321 * Title describing the type of factor. 9322 */ 9323 title: string; 9324 /** 9325 * Short phrase describing the type of factor. 9326 */ 9327 summary: string; 9328 /** 9329 * Full text explanation of the factor. 9330 */ 9331 description: string; 9332 /** 9333 * The type of mixed content described by the explanation. 9334 */ 9335 mixedContentType: MixedContentType; 9336 /** 9337 * Page certificate. 9338 */ 9339 certificate: string[]; 9340 /** 9341 * Recommendations to fix any issues. 9342 */ 9343 recommendations?: string[]; 9344 } 9345 9346 /** 9347 * Information about insecure content on the page. 9348 */ 9349 export interface InsecureContentStatus { 9350 /** 9351 * Always false. 9352 */ 9353 ranMixedContent: boolean; 9354 /** 9355 * Always false. 9356 */ 9357 displayedMixedContent: boolean; 9358 /** 9359 * Always false. 9360 */ 9361 containedMixedForm: boolean; 9362 /** 9363 * Always false. 9364 */ 9365 ranContentWithCertErrors: boolean; 9366 /** 9367 * Always false. 9368 */ 9369 displayedContentWithCertErrors: boolean; 9370 /** 9371 * Always set to unknown. 9372 */ 9373 ranInsecureContentStyle: SecurityState; 9374 /** 9375 * Always set to unknown. 9376 */ 9377 displayedInsecureContentStyle: SecurityState; 9378 } 9379 9380 /** 9381 * The action to take when a certificate error occurs. continue will continue processing the 9382 * request and cancel will cancel the request. 9383 */ 9384 export enum CertificateErrorAction { 9385 Continue = 'continue', 9386 Cancel = 'cancel', 9387 } 9388 9389 export interface SetIgnoreCertificateErrorsRequest { 9390 /** 9391 * If true, all certificate errors will be ignored. 9392 */ 9393 ignore: boolean; 9394 } 9395 9396 export interface HandleCertificateErrorRequest { 9397 /** 9398 * The ID of the event. 9399 */ 9400 eventId: integer; 9401 /** 9402 * The action to take on the certificate error. 9403 */ 9404 action: CertificateErrorAction; 9405 } 9406 9407 export interface SetOverrideCertificateErrorsRequest { 9408 /** 9409 * If true, certificate errors will be overridden. 9410 */ 9411 override: boolean; 9412 } 9413 9414 /** 9415 * There is a certificate error. If overriding certificate errors is enabled, then it should be 9416 * handled with the `handleCertificateError` command. Note: this event does not fire if the 9417 * certificate error has been allowed internally. Only one client per target should override 9418 * certificate errors at the same time. 9419 */ 9420 export interface CertificateErrorEvent { 9421 /** 9422 * The ID of the event. 9423 */ 9424 eventId: integer; 9425 /** 9426 * The type of the error. 9427 */ 9428 errorType: string; 9429 /** 9430 * The url that was requested. 9431 */ 9432 requestURL: string; 9433 } 9434 9435 /** 9436 * The security state of the page changed. 9437 */ 9438 export interface VisibleSecurityStateChangedEvent { 9439 /** 9440 * Security state information about the page. 9441 */ 9442 visibleSecurityState: VisibleSecurityState; 9443 } 9444 9445 /** 9446 * The security state of the page changed. 9447 */ 9448 export interface SecurityStateChangedEvent { 9449 /** 9450 * Security state. 9451 */ 9452 securityState: SecurityState; 9453 /** 9454 * True if the page was loaded over cryptographic transport such as HTTPS. 9455 */ 9456 schemeIsCryptographic: boolean; 9457 /** 9458 * List of explanations for the security state. If the overall security state is `insecure` or 9459 * `warning`, at least one corresponding explanation should be included. 9460 */ 9461 explanations: SecurityStateExplanation[]; 9462 /** 9463 * Information about insecure content on the page. 9464 */ 9465 insecureContentStatus: InsecureContentStatus; 9466 /** 9467 * Overrides user-visible description of the state. 9468 */ 9469 summary?: string; 9470 } 9471 } 9472 9473 export namespace ServiceWorker { 9474 9475 export type RegistrationID = string; 9476 9477 /** 9478 * ServiceWorker registration. 9479 */ 9480 export interface ServiceWorkerRegistration { 9481 registrationId: RegistrationID; 9482 scopeURL: string; 9483 isDeleted: boolean; 9484 } 9485 9486 export enum ServiceWorkerVersionRunningStatus { 9487 Stopped = 'stopped', 9488 Starting = 'starting', 9489 Running = 'running', 9490 Stopping = 'stopping', 9491 } 9492 9493 export enum ServiceWorkerVersionStatus { 9494 New = 'new', 9495 Installing = 'installing', 9496 Installed = 'installed', 9497 Activating = 'activating', 9498 Activated = 'activated', 9499 Redundant = 'redundant', 9500 } 9501 9502 /** 9503 * ServiceWorker version. 9504 */ 9505 export interface ServiceWorkerVersion { 9506 versionId: string; 9507 registrationId: RegistrationID; 9508 scriptURL: string; 9509 runningStatus: ServiceWorkerVersionRunningStatus; 9510 status: ServiceWorkerVersionStatus; 9511 /** 9512 * The Last-Modified header value of the main script. 9513 */ 9514 scriptLastModified?: number; 9515 /** 9516 * The time at which the response headers of the main script were received from the server. 9517 * For cached script it is the last time the cache entry was validated. 9518 */ 9519 scriptResponseTime?: number; 9520 controlledClients?: Target.TargetID[]; 9521 targetId?: Target.TargetID; 9522 } 9523 9524 /** 9525 * ServiceWorker error message. 9526 */ 9527 export interface ServiceWorkerErrorMessage { 9528 errorMessage: string; 9529 registrationId: RegistrationID; 9530 versionId: string; 9531 sourceURL: string; 9532 lineNumber: integer; 9533 columnNumber: integer; 9534 } 9535 9536 export interface DeliverPushMessageRequest { 9537 origin: string; 9538 registrationId: RegistrationID; 9539 data: string; 9540 } 9541 9542 export interface DispatchSyncEventRequest { 9543 origin: string; 9544 registrationId: RegistrationID; 9545 tag: string; 9546 lastChance: boolean; 9547 } 9548 9549 export interface DispatchPeriodicSyncEventRequest { 9550 origin: string; 9551 registrationId: RegistrationID; 9552 tag: string; 9553 } 9554 9555 export interface InspectWorkerRequest { 9556 versionId: string; 9557 } 9558 9559 export interface SetForceUpdateOnPageLoadRequest { 9560 forceUpdateOnPageLoad: boolean; 9561 } 9562 9563 export interface SkipWaitingRequest { 9564 scopeURL: string; 9565 } 9566 9567 export interface StartWorkerRequest { 9568 scopeURL: string; 9569 } 9570 9571 export interface StopWorkerRequest { 9572 versionId: string; 9573 } 9574 9575 export interface UnregisterRequest { 9576 scopeURL: string; 9577 } 9578 9579 export interface UpdateRegistrationRequest { 9580 scopeURL: string; 9581 } 9582 9583 export interface WorkerErrorReportedEvent { 9584 errorMessage: ServiceWorkerErrorMessage; 9585 } 9586 9587 export interface WorkerRegistrationUpdatedEvent { 9588 registrations: ServiceWorkerRegistration[]; 9589 } 9590 9591 export interface WorkerVersionUpdatedEvent { 9592 versions: ServiceWorkerVersion[]; 9593 } 9594 } 9595 9596 export namespace Storage { 9597 9598 /** 9599 * Enum of possible storage types. 9600 */ 9601 export enum StorageType { 9602 Appcache = 'appcache', 9603 Cookies = 'cookies', 9604 File_systems = 'file_systems', 9605 Indexeddb = 'indexeddb', 9606 Local_storage = 'local_storage', 9607 Shader_cache = 'shader_cache', 9608 Websql = 'websql', 9609 Service_workers = 'service_workers', 9610 Cache_storage = 'cache_storage', 9611 All = 'all', 9612 Other = 'other', 9613 } 9614 9615 /** 9616 * Usage for a storage type. 9617 */ 9618 export interface UsageForType { 9619 /** 9620 * Name of storage type. 9621 */ 9622 storageType: StorageType; 9623 /** 9624 * Storage usage (bytes). 9625 */ 9626 usage: number; 9627 } 9628 9629 export interface ClearDataForOriginRequest { 9630 /** 9631 * Security origin. 9632 */ 9633 origin: string; 9634 /** 9635 * Comma separated list of StorageType to clear. 9636 */ 9637 storageTypes: string; 9638 } 9639 9640 export interface GetCookiesRequest { 9641 /** 9642 * Browser context to use when called on the browser endpoint. 9643 */ 9644 browserContextId?: Browser.BrowserContextID; 9645 } 9646 9647 export interface GetCookiesResponse { 9648 /** 9649 * Array of cookie objects. 9650 */ 9651 cookies: Network.Cookie[]; 9652 } 9653 9654 export interface SetCookiesRequest { 9655 /** 9656 * Cookies to be set. 9657 */ 9658 cookies: Network.CookieParam[]; 9659 /** 9660 * Browser context to use when called on the browser endpoint. 9661 */ 9662 browserContextId?: Browser.BrowserContextID; 9663 } 9664 9665 export interface ClearCookiesRequest { 9666 /** 9667 * Browser context to use when called on the browser endpoint. 9668 */ 9669 browserContextId?: Browser.BrowserContextID; 9670 } 9671 9672 export interface GetUsageAndQuotaRequest { 9673 /** 9674 * Security origin. 9675 */ 9676 origin: string; 9677 } 9678 9679 export interface GetUsageAndQuotaResponse { 9680 /** 9681 * Storage usage (bytes). 9682 */ 9683 usage: number; 9684 /** 9685 * Storage quota (bytes). 9686 */ 9687 quota: number; 9688 /** 9689 * Storage usage per type (bytes). 9690 */ 9691 usageBreakdown: UsageForType[]; 9692 } 9693 9694 export interface TrackCacheStorageForOriginRequest { 9695 /** 9696 * Security origin. 9697 */ 9698 origin: string; 9699 } 9700 9701 export interface TrackIndexedDBForOriginRequest { 9702 /** 9703 * Security origin. 9704 */ 9705 origin: string; 9706 } 9707 9708 export interface UntrackCacheStorageForOriginRequest { 9709 /** 9710 * Security origin. 9711 */ 9712 origin: string; 9713 } 9714 9715 export interface UntrackIndexedDBForOriginRequest { 9716 /** 9717 * Security origin. 9718 */ 9719 origin: string; 9720 } 9721 9722 /** 9723 * A cache's contents have been modified. 9724 */ 9725 export interface CacheStorageContentUpdatedEvent { 9726 /** 9727 * Origin to update. 9728 */ 9729 origin: string; 9730 /** 9731 * Name of cache in origin. 9732 */ 9733 cacheName: string; 9734 } 9735 9736 /** 9737 * A cache has been added/deleted. 9738 */ 9739 export interface CacheStorageListUpdatedEvent { 9740 /** 9741 * Origin to update. 9742 */ 9743 origin: string; 9744 } 9745 9746 /** 9747 * The origin's IndexedDB object store has been modified. 9748 */ 9749 export interface IndexedDBContentUpdatedEvent { 9750 /** 9751 * Origin to update. 9752 */ 9753 origin: string; 9754 /** 9755 * Database to update. 9756 */ 9757 databaseName: string; 9758 /** 9759 * ObjectStore to update. 9760 */ 9761 objectStoreName: string; 9762 } 9763 9764 /** 9765 * The origin's IndexedDB database list has been modified. 9766 */ 9767 export interface IndexedDBListUpdatedEvent { 9768 /** 9769 * Origin to update. 9770 */ 9771 origin: string; 9772 } 9773 } 9774 9775 /** 9776 * The SystemInfo domain defines methods and events for querying low-level system information. 9777 */ 9778 export namespace SystemInfo { 9779 9780 /** 9781 * Describes a single graphics processor (GPU). 9782 */ 9783 export interface GPUDevice { 9784 /** 9785 * PCI ID of the GPU vendor, if available; 0 otherwise. 9786 */ 9787 vendorId: number; 9788 /** 9789 * PCI ID of the GPU device, if available; 0 otherwise. 9790 */ 9791 deviceId: number; 9792 /** 9793 * Sub sys ID of the GPU, only available on Windows. 9794 */ 9795 subSysId?: number; 9796 /** 9797 * Revision of the GPU, only available on Windows. 9798 */ 9799 revision?: number; 9800 /** 9801 * String description of the GPU vendor, if the PCI ID is not available. 9802 */ 9803 vendorString: string; 9804 /** 9805 * String description of the GPU device, if the PCI ID is not available. 9806 */ 9807 deviceString: string; 9808 /** 9809 * String description of the GPU driver vendor. 9810 */ 9811 driverVendor: string; 9812 /** 9813 * String description of the GPU driver version. 9814 */ 9815 driverVersion: string; 9816 } 9817 9818 /** 9819 * Describes the width and height dimensions of an entity. 9820 */ 9821 export interface Size { 9822 /** 9823 * Width in pixels. 9824 */ 9825 width: integer; 9826 /** 9827 * Height in pixels. 9828 */ 9829 height: integer; 9830 } 9831 9832 /** 9833 * Describes a supported video decoding profile with its associated minimum and 9834 * maximum resolutions. 9835 */ 9836 export interface VideoDecodeAcceleratorCapability { 9837 /** 9838 * Video codec profile that is supported, e.g. VP9 Profile 2. 9839 */ 9840 profile: string; 9841 /** 9842 * Maximum video dimensions in pixels supported for this |profile|. 9843 */ 9844 maxResolution: Size; 9845 /** 9846 * Minimum video dimensions in pixels supported for this |profile|. 9847 */ 9848 minResolution: Size; 9849 } 9850 9851 /** 9852 * Describes a supported video encoding profile with its associated maximum 9853 * resolution and maximum framerate. 9854 */ 9855 export interface VideoEncodeAcceleratorCapability { 9856 /** 9857 * Video codec profile that is supported, e.g H264 Main. 9858 */ 9859 profile: string; 9860 /** 9861 * Maximum video dimensions in pixels supported for this |profile|. 9862 */ 9863 maxResolution: Size; 9864 /** 9865 * Maximum encoding framerate in frames per second supported for this 9866 * |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 9867 * 24000/1001 fps, etc. 9868 */ 9869 maxFramerateNumerator: integer; 9870 maxFramerateDenominator: integer; 9871 } 9872 9873 /** 9874 * YUV subsampling type of the pixels of a given image. 9875 */ 9876 export enum SubsamplingFormat { 9877 Yuv420 = 'yuv420', 9878 Yuv422 = 'yuv422', 9879 Yuv444 = 'yuv444', 9880 } 9881 9882 /** 9883 * Image format of a given image. 9884 */ 9885 export enum ImageType { 9886 Jpeg = 'jpeg', 9887 Webp = 'webp', 9888 Unknown = 'unknown', 9889 } 9890 9891 /** 9892 * Describes a supported image decoding profile with its associated minimum and 9893 * maximum resolutions and subsampling. 9894 */ 9895 export interface ImageDecodeAcceleratorCapability { 9896 /** 9897 * Image coded, e.g. Jpeg. 9898 */ 9899 imageType: ImageType; 9900 /** 9901 * Maximum supported dimensions of the image in pixels. 9902 */ 9903 maxDimensions: Size; 9904 /** 9905 * Minimum supported dimensions of the image in pixels. 9906 */ 9907 minDimensions: Size; 9908 /** 9909 * Optional array of supported subsampling formats, e.g. 4:2:0, if known. 9910 */ 9911 subsamplings: SubsamplingFormat[]; 9912 } 9913 9914 /** 9915 * Provides information about the GPU(s) on the system. 9916 */ 9917 export interface GPUInfo { 9918 /** 9919 * The graphics devices on the system. Element 0 is the primary GPU. 9920 */ 9921 devices: GPUDevice[]; 9922 /** 9923 * An optional dictionary of additional GPU related attributes. 9924 */ 9925 auxAttributes?: any; 9926 /** 9927 * An optional dictionary of graphics features and their status. 9928 */ 9929 featureStatus?: any; 9930 /** 9931 * An optional array of GPU driver bug workarounds. 9932 */ 9933 driverBugWorkarounds: string[]; 9934 /** 9935 * Supported accelerated video decoding capabilities. 9936 */ 9937 videoDecoding: VideoDecodeAcceleratorCapability[]; 9938 /** 9939 * Supported accelerated video encoding capabilities. 9940 */ 9941 videoEncoding: VideoEncodeAcceleratorCapability[]; 9942 /** 9943 * Supported accelerated image decoding capabilities. 9944 */ 9945 imageDecoding: ImageDecodeAcceleratorCapability[]; 9946 } 9947 9948 /** 9949 * Represents process info. 9950 */ 9951 export interface ProcessInfo { 9952 /** 9953 * Specifies process type. 9954 */ 9955 type: string; 9956 /** 9957 * Specifies process id. 9958 */ 9959 id: integer; 9960 /** 9961 * Specifies cumulative CPU usage in seconds across all threads of the 9962 * process since the process start. 9963 */ 9964 cpuTime: number; 9965 } 9966 9967 export interface GetInfoResponse { 9968 /** 9969 * Information about the GPUs on the system. 9970 */ 9971 gpu: GPUInfo; 9972 /** 9973 * A platform-dependent description of the model of the machine. On Mac OS, this is, for 9974 * example, 'MacBookPro'. Will be the empty string if not supported. 9975 */ 9976 modelName: string; 9977 /** 9978 * A platform-dependent description of the version of the machine. On Mac OS, this is, for 9979 * example, '10.1'. Will be the empty string if not supported. 9980 */ 9981 modelVersion: string; 9982 /** 9983 * The command line string used to launch the browser. Will be the empty string if not 9984 * supported. 9985 */ 9986 commandLine: string; 9987 } 9988 9989 export interface GetProcessInfoResponse { 9990 /** 9991 * An array of process info blocks. 9992 */ 9993 processInfo: ProcessInfo[]; 9994 } 9995 } 9996 9997 /** 9998 * Supports additional targets discovery and allows to attach to them. 9999 */ 10000 export namespace Target { 10001 10002 export type TargetID = string; 10003 10004 /** 10005 * Unique identifier of attached debugging session. 10006 */ 10007 export type SessionID = string; 10008 10009 export interface TargetInfo { 10010 targetId: TargetID; 10011 type: string; 10012 title: string; 10013 url: string; 10014 /** 10015 * Whether the target has an attached client. 10016 */ 10017 attached: boolean; 10018 /** 10019 * Opener target Id 10020 */ 10021 openerId?: TargetID; 10022 browserContextId?: Browser.BrowserContextID; 10023 } 10024 10025 export interface RemoteLocation { 10026 host: string; 10027 port: integer; 10028 } 10029 10030 export interface ActivateTargetRequest { 10031 targetId: TargetID; 10032 } 10033 10034 export interface AttachToTargetRequest { 10035 targetId: TargetID; 10036 /** 10037 * Enables "flat" access to the session via specifying sessionId attribute in the commands. 10038 * We plan to make this the default, deprecate non-flattened mode, 10039 * and eventually retire it. See crbug.com/991325. 10040 */ 10041 flatten?: boolean; 10042 } 10043 10044 export interface AttachToTargetResponse { 10045 /** 10046 * Id assigned to the session. 10047 */ 10048 sessionId: SessionID; 10049 } 10050 10051 export interface AttachToBrowserTargetResponse { 10052 /** 10053 * Id assigned to the session. 10054 */ 10055 sessionId: SessionID; 10056 } 10057 10058 export interface CloseTargetRequest { 10059 targetId: TargetID; 10060 } 10061 10062 export interface CloseTargetResponse { 10063 success: boolean; 10064 } 10065 10066 export interface ExposeDevToolsProtocolRequest { 10067 targetId: TargetID; 10068 /** 10069 * Binding name, 'cdp' if not specified. 10070 */ 10071 bindingName?: string; 10072 } 10073 10074 export interface CreateBrowserContextRequest { 10075 /** 10076 * If specified, disposes this context when debugging session disconnects. 10077 */ 10078 disposeOnDetach?: boolean; 10079 } 10080 10081 export interface CreateBrowserContextResponse { 10082 /** 10083 * The id of the context created. 10084 */ 10085 browserContextId: Browser.BrowserContextID; 10086 } 10087 10088 export interface GetBrowserContextsResponse { 10089 /** 10090 * An array of browser context ids. 10091 */ 10092 browserContextIds: Browser.BrowserContextID[]; 10093 } 10094 10095 export interface CreateTargetRequest { 10096 /** 10097 * The initial URL the page will be navigated to. 10098 */ 10099 url: string; 10100 /** 10101 * Frame width in DIP (headless chrome only). 10102 */ 10103 width?: integer; 10104 /** 10105 * Frame height in DIP (headless chrome only). 10106 */ 10107 height?: integer; 10108 /** 10109 * The browser context to create the page in. 10110 */ 10111 browserContextId?: Browser.BrowserContextID; 10112 /** 10113 * Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, 10114 * not supported on MacOS yet, false by default). 10115 */ 10116 enableBeginFrameControl?: boolean; 10117 /** 10118 * Whether to create a new Window or Tab (chrome-only, false by default). 10119 */ 10120 newWindow?: boolean; 10121 /** 10122 * Whether to create the target in background or foreground (chrome-only, 10123 * false by default). 10124 */ 10125 background?: boolean; 10126 } 10127 10128 export interface CreateTargetResponse { 10129 /** 10130 * The id of the page opened. 10131 */ 10132 targetId: TargetID; 10133 } 10134 10135 export interface DetachFromTargetRequest { 10136 /** 10137 * Session to detach. 10138 */ 10139 sessionId?: SessionID; 10140 /** 10141 * Deprecated. 10142 */ 10143 targetId?: TargetID; 10144 } 10145 10146 export interface DisposeBrowserContextRequest { 10147 browserContextId: Browser.BrowserContextID; 10148 } 10149 10150 export interface GetTargetInfoRequest { 10151 targetId?: TargetID; 10152 } 10153 10154 export interface GetTargetInfoResponse { 10155 targetInfo: TargetInfo; 10156 } 10157 10158 export interface GetTargetsResponse { 10159 /** 10160 * The list of targets. 10161 */ 10162 targetInfos: TargetInfo[]; 10163 } 10164 10165 export interface SendMessageToTargetRequest { 10166 message: string; 10167 /** 10168 * Identifier of the session. 10169 */ 10170 sessionId?: SessionID; 10171 /** 10172 * Deprecated. 10173 */ 10174 targetId?: TargetID; 10175 } 10176 10177 export interface SetAutoAttachRequest { 10178 /** 10179 * Whether to auto-attach to related targets. 10180 */ 10181 autoAttach: boolean; 10182 /** 10183 * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` 10184 * to run paused targets. 10185 */ 10186 waitForDebuggerOnStart: boolean; 10187 /** 10188 * Enables "flat" access to the session via specifying sessionId attribute in the commands. 10189 * We plan to make this the default, deprecate non-flattened mode, 10190 * and eventually retire it. See crbug.com/991325. 10191 */ 10192 flatten?: boolean; 10193 } 10194 10195 export interface SetDiscoverTargetsRequest { 10196 /** 10197 * Whether to discover available targets. 10198 */ 10199 discover: boolean; 10200 } 10201 10202 export interface SetRemoteLocationsRequest { 10203 /** 10204 * List of remote locations. 10205 */ 10206 locations: RemoteLocation[]; 10207 } 10208 10209 /** 10210 * Issued when attached to target because of auto-attach or `attachToTarget` command. 10211 */ 10212 export interface AttachedToTargetEvent { 10213 /** 10214 * Identifier assigned to the session used to send/receive messages. 10215 */ 10216 sessionId: SessionID; 10217 targetInfo: TargetInfo; 10218 waitingForDebugger: boolean; 10219 } 10220 10221 /** 10222 * Issued when detached from target for any reason (including `detachFromTarget` command). Can be 10223 * issued multiple times per target if multiple sessions have been attached to it. 10224 */ 10225 export interface DetachedFromTargetEvent { 10226 /** 10227 * Detached session identifier. 10228 */ 10229 sessionId: SessionID; 10230 /** 10231 * Deprecated. 10232 */ 10233 targetId?: TargetID; 10234 } 10235 10236 /** 10237 * Notifies about a new protocol message received from the session (as reported in 10238 * `attachedToTarget` event). 10239 */ 10240 export interface ReceivedMessageFromTargetEvent { 10241 /** 10242 * Identifier of a session which sends a message. 10243 */ 10244 sessionId: SessionID; 10245 message: string; 10246 /** 10247 * Deprecated. 10248 */ 10249 targetId?: TargetID; 10250 } 10251 10252 /** 10253 * Issued when a possible inspection target is created. 10254 */ 10255 export interface TargetCreatedEvent { 10256 targetInfo: TargetInfo; 10257 } 10258 10259 /** 10260 * Issued when a target is destroyed. 10261 */ 10262 export interface TargetDestroyedEvent { 10263 targetId: TargetID; 10264 } 10265 10266 /** 10267 * Issued when a target has crashed. 10268 */ 10269 export interface TargetCrashedEvent { 10270 targetId: TargetID; 10271 /** 10272 * Termination status type. 10273 */ 10274 status: string; 10275 /** 10276 * Termination error code. 10277 */ 10278 errorCode: integer; 10279 } 10280 10281 /** 10282 * Issued when some information about a target has changed. This only happens between 10283 * `targetCreated` and `targetDestroyed`. 10284 */ 10285 export interface TargetInfoChangedEvent { 10286 targetInfo: TargetInfo; 10287 } 10288 } 10289 10290 /** 10291 * The Tethering domain defines methods and events for browser port binding. 10292 */ 10293 export namespace Tethering { 10294 10295 export interface BindRequest { 10296 /** 10297 * Port number to bind. 10298 */ 10299 port: integer; 10300 } 10301 10302 export interface UnbindRequest { 10303 /** 10304 * Port number to unbind. 10305 */ 10306 port: integer; 10307 } 10308 10309 /** 10310 * Informs that port was successfully bound and got a specified connection id. 10311 */ 10312 export interface AcceptedEvent { 10313 /** 10314 * Port number that was successfully bound. 10315 */ 10316 port: integer; 10317 /** 10318 * Connection id to be used. 10319 */ 10320 connectionId: string; 10321 } 10322 } 10323 10324 export namespace Tracing { 10325 10326 /** 10327 * Configuration for memory dump. Used only when "memory-infra" category is enabled. 10328 */ 10329 export interface MemoryDumpConfig { 10330 [key: string]: string; 10331 } 10332 10333 export enum TraceConfigRecordMode { 10334 RecordUntilFull = 'recordUntilFull', 10335 RecordContinuously = 'recordContinuously', 10336 RecordAsMuchAsPossible = 'recordAsMuchAsPossible', 10337 EchoToConsole = 'echoToConsole', 10338 } 10339 10340 export interface TraceConfig { 10341 /** 10342 * Controls how the trace buffer stores data. 10343 */ 10344 recordMode?: TraceConfigRecordMode; 10345 /** 10346 * Turns on JavaScript stack sampling. 10347 */ 10348 enableSampling?: boolean; 10349 /** 10350 * Turns on system tracing. 10351 */ 10352 enableSystrace?: boolean; 10353 /** 10354 * Turns on argument filter. 10355 */ 10356 enableArgumentFilter?: boolean; 10357 /** 10358 * Included category filters. 10359 */ 10360 includedCategories?: string[]; 10361 /** 10362 * Excluded category filters. 10363 */ 10364 excludedCategories?: string[]; 10365 /** 10366 * Configuration to synthesize the delays in tracing. 10367 */ 10368 syntheticDelays?: string[]; 10369 /** 10370 * Configuration for memory dump triggers. Used only when "memory-infra" category is enabled. 10371 */ 10372 memoryDumpConfig?: MemoryDumpConfig; 10373 } 10374 10375 /** 10376 * Data format of a trace. Can be either the legacy JSON format or the 10377 * protocol buffer format. Note that the JSON format will be deprecated soon. 10378 */ 10379 export enum StreamFormat { 10380 Json = 'json', 10381 Proto = 'proto', 10382 } 10383 10384 /** 10385 * Compression type to use for traces returned via streams. 10386 */ 10387 export enum StreamCompression { 10388 None = 'none', 10389 Gzip = 'gzip', 10390 } 10391 10392 export interface GetCategoriesResponse { 10393 /** 10394 * A list of supported tracing categories. 10395 */ 10396 categories: string[]; 10397 } 10398 10399 export interface RecordClockSyncMarkerRequest { 10400 /** 10401 * The ID of this clock sync marker 10402 */ 10403 syncId: string; 10404 } 10405 10406 export interface RequestMemoryDumpRequest { 10407 /** 10408 * Enables more deterministic results by forcing garbage collection 10409 */ 10410 deterministic?: boolean; 10411 } 10412 10413 export interface RequestMemoryDumpResponse { 10414 /** 10415 * GUID of the resulting global memory dump. 10416 */ 10417 dumpGuid: string; 10418 /** 10419 * True iff the global memory dump succeeded. 10420 */ 10421 success: boolean; 10422 } 10423 10424 export enum StartRequestTransferMode { 10425 ReportEvents = 'ReportEvents', 10426 ReturnAsStream = 'ReturnAsStream', 10427 } 10428 10429 export interface StartRequest { 10430 /** 10431 * Category/tag filter 10432 */ 10433 categories?: string; 10434 /** 10435 * Tracing options 10436 */ 10437 options?: string; 10438 /** 10439 * If set, the agent will issue bufferUsage events at this interval, specified in milliseconds 10440 */ 10441 bufferUsageReportingInterval?: number; 10442 /** 10443 * Whether to report trace events as series of dataCollected events or to save trace to a 10444 * stream (defaults to `ReportEvents`). 10445 */ 10446 transferMode?: StartRequestTransferMode; 10447 /** 10448 * Trace data format to use. This only applies when using `ReturnAsStream` 10449 * transfer mode (defaults to `json`). 10450 */ 10451 streamFormat?: StreamFormat; 10452 /** 10453 * Compression format to use. This only applies when using `ReturnAsStream` 10454 * transfer mode (defaults to `none`) 10455 */ 10456 streamCompression?: StreamCompression; 10457 traceConfig?: TraceConfig; 10458 } 10459 10460 export interface BufferUsageEvent { 10461 /** 10462 * A number in range [0..1] that indicates the used size of event buffer as a fraction of its 10463 * total size. 10464 */ 10465 percentFull?: number; 10466 /** 10467 * An approximate number of events in the trace log. 10468 */ 10469 eventCount?: number; 10470 /** 10471 * A number in range [0..1] that indicates the used size of event buffer as a fraction of its 10472 * total size. 10473 */ 10474 value?: number; 10475 } 10476 10477 /** 10478 * Contains an bucket of collected trace events. When tracing is stopped collected events will be 10479 * send as a sequence of dataCollected events followed by tracingComplete event. 10480 */ 10481 export interface DataCollectedEvent { 10482 value: any[]; 10483 } 10484 10485 /** 10486 * Signals that tracing is stopped and there is no trace buffers pending flush, all data were 10487 * delivered via dataCollected events. 10488 */ 10489 export interface TracingCompleteEvent { 10490 /** 10491 * Indicates whether some trace data is known to have been lost, e.g. because the trace ring 10492 * buffer wrapped around. 10493 */ 10494 dataLossOccurred: boolean; 10495 /** 10496 * A handle of the stream that holds resulting trace data. 10497 */ 10498 stream?: IO.StreamHandle; 10499 /** 10500 * Trace data format of returned stream. 10501 */ 10502 traceFormat?: StreamFormat; 10503 /** 10504 * Compression format of returned stream. 10505 */ 10506 streamCompression?: StreamCompression; 10507 } 10508 } 10509 10510 /** 10511 * A domain for letting clients substitute browser's network layer with client code. 10512 */ 10513 export namespace Fetch { 10514 10515 /** 10516 * Unique request identifier. 10517 */ 10518 export type RequestId = string; 10519 10520 /** 10521 * Stages of the request to handle. Request will intercept before the request is 10522 * sent. Response will intercept after the response is received (but before response 10523 * body is received. 10524 */ 10525 export enum RequestStage { 10526 Request = 'Request', 10527 Response = 'Response', 10528 } 10529 10530 export interface RequestPattern { 10531 /** 10532 * Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is 10533 * backslash. Omitting is equivalent to "*". 10534 */ 10535 urlPattern?: string; 10536 /** 10537 * If set, only requests for matching resource types will be intercepted. 10538 */ 10539 resourceType?: Network.ResourceType; 10540 /** 10541 * Stage at wich to begin intercepting requests. Default is Request. 10542 */ 10543 requestStage?: RequestStage; 10544 } 10545 10546 /** 10547 * Response HTTP header entry 10548 */ 10549 export interface HeaderEntry { 10550 name: string; 10551 value: string; 10552 } 10553 10554 export enum AuthChallengeSource { 10555 Server = 'Server', 10556 Proxy = 'Proxy', 10557 } 10558 10559 /** 10560 * Authorization challenge for HTTP status code 401 or 407. 10561 */ 10562 export interface AuthChallenge { 10563 /** 10564 * Source of the authentication challenge. 10565 */ 10566 source?: AuthChallengeSource; 10567 /** 10568 * Origin of the challenger. 10569 */ 10570 origin: string; 10571 /** 10572 * The authentication scheme used, such as basic or digest 10573 */ 10574 scheme: string; 10575 /** 10576 * The realm of the challenge. May be empty. 10577 */ 10578 realm: string; 10579 } 10580 10581 export enum AuthChallengeResponseResponse { 10582 Default = 'Default', 10583 CancelAuth = 'CancelAuth', 10584 ProvideCredentials = 'ProvideCredentials', 10585 } 10586 10587 /** 10588 * Response to an AuthChallenge. 10589 */ 10590 export interface AuthChallengeResponse { 10591 /** 10592 * The decision on what to do in response to the authorization challenge. Default means 10593 * deferring to the default behavior of the net stack, which will likely either the Cancel 10594 * authentication or display a popup dialog box. 10595 */ 10596 response: AuthChallengeResponseResponse; 10597 /** 10598 * The username to provide, possibly empty. Should only be set if response is 10599 * ProvideCredentials. 10600 */ 10601 username?: string; 10602 /** 10603 * The password to provide, possibly empty. Should only be set if response is 10604 * ProvideCredentials. 10605 */ 10606 password?: string; 10607 } 10608 10609 export interface EnableRequest { 10610 /** 10611 * If specified, only requests matching any of these patterns will produce 10612 * fetchRequested event and will be paused until clients response. If not set, 10613 * all requests will be affected. 10614 */ 10615 patterns?: RequestPattern[]; 10616 /** 10617 * If true, authRequired events will be issued and requests will be paused 10618 * expecting a call to continueWithAuth. 10619 */ 10620 handleAuthRequests?: boolean; 10621 } 10622 10623 export interface FailRequestRequest { 10624 /** 10625 * An id the client received in requestPaused event. 10626 */ 10627 requestId: RequestId; 10628 /** 10629 * Causes the request to fail with the given reason. 10630 */ 10631 errorReason: Network.ErrorReason; 10632 } 10633 10634 export interface FulfillRequestRequest { 10635 /** 10636 * An id the client received in requestPaused event. 10637 */ 10638 requestId: RequestId; 10639 /** 10640 * An HTTP response code. 10641 */ 10642 responseCode: integer; 10643 /** 10644 * Response headers. 10645 */ 10646 responseHeaders?: HeaderEntry[]; 10647 /** 10648 * Alternative way of specifying response headers as a \0-separated 10649 * series of name: value pairs. Prefer the above method unless you 10650 * need to represent some non-UTF8 values that can't be transmitted 10651 * over the protocol as text. 10652 */ 10653 binaryResponseHeaders?: binary; 10654 /** 10655 * A response body. 10656 */ 10657 body?: binary; 10658 /** 10659 * A textual representation of responseCode. 10660 * If absent, a standard phrase matching responseCode is used. 10661 */ 10662 responsePhrase?: string; 10663 } 10664 10665 export interface ContinueRequestRequest { 10666 /** 10667 * An id the client received in requestPaused event. 10668 */ 10669 requestId: RequestId; 10670 /** 10671 * If set, the request url will be modified in a way that's not observable by page. 10672 */ 10673 url?: string; 10674 /** 10675 * If set, the request method is overridden. 10676 */ 10677 method?: string; 10678 /** 10679 * If set, overrides the post data in the request. 10680 */ 10681 postData?: string; 10682 /** 10683 * If set, overrides the request headrts. 10684 */ 10685 headers?: HeaderEntry[]; 10686 } 10687 10688 export interface ContinueWithAuthRequest { 10689 /** 10690 * An id the client received in authRequired event. 10691 */ 10692 requestId: RequestId; 10693 /** 10694 * Response to with an authChallenge. 10695 */ 10696 authChallengeResponse: AuthChallengeResponse; 10697 } 10698 10699 export interface GetResponseBodyRequest { 10700 /** 10701 * Identifier for the intercepted request to get body for. 10702 */ 10703 requestId: RequestId; 10704 } 10705 10706 export interface GetResponseBodyResponse { 10707 /** 10708 * Response body. 10709 */ 10710 body: string; 10711 /** 10712 * True, if content was sent as base64. 10713 */ 10714 base64Encoded: boolean; 10715 } 10716 10717 export interface TakeResponseBodyAsStreamRequest { 10718 requestId: RequestId; 10719 } 10720 10721 export interface TakeResponseBodyAsStreamResponse { 10722 stream: IO.StreamHandle; 10723 } 10724 10725 /** 10726 * Issued when the domain is enabled and the request URL matches the 10727 * specified filter. The request is paused until the client responds 10728 * with one of continueRequest, failRequest or fulfillRequest. 10729 * The stage of the request can be determined by presence of responseErrorReason 10730 * and responseStatusCode -- the request is at the response stage if either 10731 * of these fields is present and in the request stage otherwise. 10732 */ 10733 export interface RequestPausedEvent { 10734 /** 10735 * Each request the page makes will have a unique id. 10736 */ 10737 requestId: RequestId; 10738 /** 10739 * The details of the request. 10740 */ 10741 request: Network.Request; 10742 /** 10743 * The id of the frame that initiated the request. 10744 */ 10745 frameId: Page.FrameId; 10746 /** 10747 * How the requested resource will be used. 10748 */ 10749 resourceType: Network.ResourceType; 10750 /** 10751 * Response error if intercepted at response stage. 10752 */ 10753 responseErrorReason?: Network.ErrorReason; 10754 /** 10755 * Response code if intercepted at response stage. 10756 */ 10757 responseStatusCode?: integer; 10758 /** 10759 * Response headers if intercepted at the response stage. 10760 */ 10761 responseHeaders?: HeaderEntry[]; 10762 /** 10763 * If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, 10764 * then this networkId will be the same as the requestId present in the requestWillBeSent event. 10765 */ 10766 networkId?: RequestId; 10767 } 10768 10769 /** 10770 * Issued when the domain is enabled with handleAuthRequests set to true. 10771 * The request is paused until client responds with continueWithAuth. 10772 */ 10773 export interface AuthRequiredEvent { 10774 /** 10775 * Each request the page makes will have a unique id. 10776 */ 10777 requestId: RequestId; 10778 /** 10779 * The details of the request. 10780 */ 10781 request: Network.Request; 10782 /** 10783 * The id of the frame that initiated the request. 10784 */ 10785 frameId: Page.FrameId; 10786 /** 10787 * How the requested resource will be used. 10788 */ 10789 resourceType: Network.ResourceType; 10790 /** 10791 * Details of the Authorization Challenge encountered. 10792 * If this is set, client should respond with continueRequest that 10793 * contains AuthChallengeResponse. 10794 */ 10795 authChallenge: AuthChallenge; 10796 } 10797 } 10798 10799 /** 10800 * This domain allows inspection of Web Audio API. 10801 * https://webaudio.github.io/web-audio-api/ 10802 */ 10803 export namespace WebAudio { 10804 10805 /** 10806 * An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API 10807 */ 10808 export type GraphObjectId = string; 10809 10810 /** 10811 * Enum of BaseAudioContext types 10812 */ 10813 export enum ContextType { 10814 Realtime = 'realtime', 10815 Offline = 'offline', 10816 } 10817 10818 /** 10819 * Enum of AudioContextState from the spec 10820 */ 10821 export enum ContextState { 10822 Suspended = 'suspended', 10823 Running = 'running', 10824 Closed = 'closed', 10825 } 10826 10827 /** 10828 * Enum of AudioNode types 10829 */ 10830 export type NodeType = string; 10831 10832 /** 10833 * Enum of AudioNode::ChannelCountMode from the spec 10834 */ 10835 export enum ChannelCountMode { 10836 ClampedMax = 'clamped-max', 10837 Explicit = 'explicit', 10838 Max = 'max', 10839 } 10840 10841 /** 10842 * Enum of AudioNode::ChannelInterpretation from the spec 10843 */ 10844 export enum ChannelInterpretation { 10845 Discrete = 'discrete', 10846 Speakers = 'speakers', 10847 } 10848 10849 /** 10850 * Enum of AudioParam types 10851 */ 10852 export type ParamType = string; 10853 10854 /** 10855 * Enum of AudioParam::AutomationRate from the spec 10856 */ 10857 export enum AutomationRate { 10858 ARate = 'a-rate', 10859 KRate = 'k-rate', 10860 } 10861 10862 /** 10863 * Fields in AudioContext that change in real-time. 10864 */ 10865 export interface ContextRealtimeData { 10866 /** 10867 * The current context time in second in BaseAudioContext. 10868 */ 10869 currentTime: number; 10870 /** 10871 * The time spent on rendering graph divided by render qunatum duration, 10872 * and multiplied by 100. 100 means the audio renderer reached the full 10873 * capacity and glitch may occur. 10874 */ 10875 renderCapacity: number; 10876 /** 10877 * A running mean of callback interval. 10878 */ 10879 callbackIntervalMean: number; 10880 /** 10881 * A running variance of callback interval. 10882 */ 10883 callbackIntervalVariance: number; 10884 } 10885 10886 /** 10887 * Protocol object for BaseAudioContext 10888 */ 10889 export interface BaseAudioContext { 10890 contextId: GraphObjectId; 10891 contextType: ContextType; 10892 contextState: ContextState; 10893 realtimeData?: ContextRealtimeData; 10894 /** 10895 * Platform-dependent callback buffer size. 10896 */ 10897 callbackBufferSize: number; 10898 /** 10899 * Number of output channels supported by audio hardware in use. 10900 */ 10901 maxOutputChannelCount: number; 10902 /** 10903 * Context sample rate. 10904 */ 10905 sampleRate: number; 10906 } 10907 10908 /** 10909 * Protocol object for AudioListner 10910 */ 10911 export interface AudioListener { 10912 listenerId: GraphObjectId; 10913 contextId: GraphObjectId; 10914 } 10915 10916 /** 10917 * Protocol object for AudioNode 10918 */ 10919 export interface AudioNode { 10920 nodeId: GraphObjectId; 10921 contextId: GraphObjectId; 10922 nodeType: NodeType; 10923 numberOfInputs: number; 10924 numberOfOutputs: number; 10925 channelCount: number; 10926 channelCountMode: ChannelCountMode; 10927 channelInterpretation: ChannelInterpretation; 10928 } 10929 10930 /** 10931 * Protocol object for AudioParam 10932 */ 10933 export interface AudioParam { 10934 paramId: GraphObjectId; 10935 nodeId: GraphObjectId; 10936 contextId: GraphObjectId; 10937 paramType: ParamType; 10938 rate: AutomationRate; 10939 defaultValue: number; 10940 minValue: number; 10941 maxValue: number; 10942 } 10943 10944 export interface GetRealtimeDataRequest { 10945 contextId: GraphObjectId; 10946 } 10947 10948 export interface GetRealtimeDataResponse { 10949 realtimeData: ContextRealtimeData; 10950 } 10951 10952 /** 10953 * Notifies that a new BaseAudioContext has been created. 10954 */ 10955 export interface ContextCreatedEvent { 10956 context: BaseAudioContext; 10957 } 10958 10959 /** 10960 * Notifies that an existing BaseAudioContext will be destroyed. 10961 */ 10962 export interface ContextWillBeDestroyedEvent { 10963 contextId: GraphObjectId; 10964 } 10965 10966 /** 10967 * Notifies that existing BaseAudioContext has changed some properties (id stays the same).. 10968 */ 10969 export interface ContextChangedEvent { 10970 context: BaseAudioContext; 10971 } 10972 10973 /** 10974 * Notifies that the construction of an AudioListener has finished. 10975 */ 10976 export interface AudioListenerCreatedEvent { 10977 listener: AudioListener; 10978 } 10979 10980 /** 10981 * Notifies that a new AudioListener has been created. 10982 */ 10983 export interface AudioListenerWillBeDestroyedEvent { 10984 contextId: GraphObjectId; 10985 listenerId: GraphObjectId; 10986 } 10987 10988 /** 10989 * Notifies that a new AudioNode has been created. 10990 */ 10991 export interface AudioNodeCreatedEvent { 10992 node: AudioNode; 10993 } 10994 10995 /** 10996 * Notifies that an existing AudioNode has been destroyed. 10997 */ 10998 export interface AudioNodeWillBeDestroyedEvent { 10999 contextId: GraphObjectId; 11000 nodeId: GraphObjectId; 11001 } 11002 11003 /** 11004 * Notifies that a new AudioParam has been created. 11005 */ 11006 export interface AudioParamCreatedEvent { 11007 param: AudioParam; 11008 } 11009 11010 /** 11011 * Notifies that an existing AudioParam has been destroyed. 11012 */ 11013 export interface AudioParamWillBeDestroyedEvent { 11014 contextId: GraphObjectId; 11015 nodeId: GraphObjectId; 11016 paramId: GraphObjectId; 11017 } 11018 11019 /** 11020 * Notifies that two AudioNodes are connected. 11021 */ 11022 export interface NodesConnectedEvent { 11023 contextId: GraphObjectId; 11024 sourceId: GraphObjectId; 11025 destinationId: GraphObjectId; 11026 sourceOutputIndex?: number; 11027 destinationInputIndex?: number; 11028 } 11029 11030 /** 11031 * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. 11032 */ 11033 export interface NodesDisconnectedEvent { 11034 contextId: GraphObjectId; 11035 sourceId: GraphObjectId; 11036 destinationId: GraphObjectId; 11037 sourceOutputIndex?: number; 11038 destinationInputIndex?: number; 11039 } 11040 11041 /** 11042 * Notifies that an AudioNode is connected to an AudioParam. 11043 */ 11044 export interface NodeParamConnectedEvent { 11045 contextId: GraphObjectId; 11046 sourceId: GraphObjectId; 11047 destinationId: GraphObjectId; 11048 sourceOutputIndex?: number; 11049 } 11050 11051 /** 11052 * Notifies that an AudioNode is disconnected to an AudioParam. 11053 */ 11054 export interface NodeParamDisconnectedEvent { 11055 contextId: GraphObjectId; 11056 sourceId: GraphObjectId; 11057 destinationId: GraphObjectId; 11058 sourceOutputIndex?: number; 11059 } 11060 } 11061 11062 /** 11063 * This domain allows configuring virtual authenticators to test the WebAuthn 11064 * API. 11065 */ 11066 export namespace WebAuthn { 11067 11068 export type AuthenticatorId = string; 11069 11070 export enum AuthenticatorProtocol { 11071 U2f = 'u2f', 11072 Ctap2 = 'ctap2', 11073 } 11074 11075 export enum AuthenticatorTransport { 11076 Usb = 'usb', 11077 Nfc = 'nfc', 11078 Ble = 'ble', 11079 Cable = 'cable', 11080 Internal = 'internal', 11081 } 11082 11083 export interface VirtualAuthenticatorOptions { 11084 protocol: AuthenticatorProtocol; 11085 transport: AuthenticatorTransport; 11086 /** 11087 * Defaults to false. 11088 */ 11089 hasResidentKey?: boolean; 11090 /** 11091 * Defaults to false. 11092 */ 11093 hasUserVerification?: boolean; 11094 /** 11095 * If set to true, tests of user presence will succeed immediately. 11096 * Otherwise, they will not be resolved. Defaults to true. 11097 */ 11098 automaticPresenceSimulation?: boolean; 11099 /** 11100 * Sets whether User Verification succeeds or fails for an authenticator. 11101 * Defaults to false. 11102 */ 11103 isUserVerified?: boolean; 11104 } 11105 11106 export interface Credential { 11107 credentialId: binary; 11108 isResidentCredential: boolean; 11109 /** 11110 * Relying Party ID the credential is scoped to. Must be set when adding a 11111 * credential. 11112 */ 11113 rpId?: string; 11114 /** 11115 * The ECDSA P-256 private key in PKCS#8 format. 11116 */ 11117 privateKey: binary; 11118 /** 11119 * An opaque byte sequence with a maximum size of 64 bytes mapping the 11120 * credential to a specific user. 11121 */ 11122 userHandle?: binary; 11123 /** 11124 * Signature counter. This is incremented by one for each successful 11125 * assertion. 11126 * See https://w3c.github.io/webauthn/#signature-counter 11127 */ 11128 signCount: integer; 11129 } 11130 11131 export interface AddVirtualAuthenticatorRequest { 11132 options: VirtualAuthenticatorOptions; 11133 } 11134 11135 export interface AddVirtualAuthenticatorResponse { 11136 authenticatorId: AuthenticatorId; 11137 } 11138 11139 export interface RemoveVirtualAuthenticatorRequest { 11140 authenticatorId: AuthenticatorId; 11141 } 11142 11143 export interface AddCredentialRequest { 11144 authenticatorId: AuthenticatorId; 11145 credential: Credential; 11146 } 11147 11148 export interface GetCredentialRequest { 11149 authenticatorId: AuthenticatorId; 11150 credentialId: binary; 11151 } 11152 11153 export interface GetCredentialResponse { 11154 credential: Credential; 11155 } 11156 11157 export interface GetCredentialsRequest { 11158 authenticatorId: AuthenticatorId; 11159 } 11160 11161 export interface GetCredentialsResponse { 11162 credentials: Credential[]; 11163 } 11164 11165 export interface RemoveCredentialRequest { 11166 authenticatorId: AuthenticatorId; 11167 credentialId: binary; 11168 } 11169 11170 export interface ClearCredentialsRequest { 11171 authenticatorId: AuthenticatorId; 11172 } 11173 11174 export interface SetUserVerifiedRequest { 11175 authenticatorId: AuthenticatorId; 11176 isUserVerified: boolean; 11177 } 11178 } 11179 11180 /** 11181 * This domain allows detailed inspection of media elements 11182 */ 11183 export namespace Media { 11184 11185 /** 11186 * Players will get an ID that is unique within the agent context. 11187 */ 11188 export type PlayerId = string; 11189 11190 export type Timestamp = number; 11191 11192 /** 11193 * Player Property type 11194 */ 11195 export interface PlayerProperty { 11196 name: string; 11197 value?: string; 11198 } 11199 11200 /** 11201 * Break out events into different types 11202 */ 11203 export enum PlayerEventType { 11204 ErrorEvent = 'errorEvent', 11205 TriggeredEvent = 'triggeredEvent', 11206 MessageEvent = 'messageEvent', 11207 } 11208 11209 export interface PlayerEvent { 11210 type: PlayerEventType; 11211 /** 11212 * Events are timestamped relative to the start of the player creation 11213 * not relative to the start of playback. 11214 */ 11215 timestamp: Timestamp; 11216 name: string; 11217 value: string; 11218 } 11219 11220 /** 11221 * This can be called multiple times, and can be used to set / override / 11222 * remove player properties. A null propValue indicates removal. 11223 */ 11224 export interface PlayerPropertiesChangedEvent { 11225 playerId: PlayerId; 11226 properties: PlayerProperty[]; 11227 } 11228 11229 /** 11230 * Send events as a list, allowing them to be batched on the browser for less 11231 * congestion. If batched, events must ALWAYS be in chronological order. 11232 */ 11233 export interface PlayerEventsAddedEvent { 11234 playerId: PlayerId; 11235 events: PlayerEvent[]; 11236 } 11237 11238 /** 11239 * Called whenever a player is created, or when a new agent joins and recieves 11240 * a list of active players. If an agent is restored, it will recieve the full 11241 * list of player ids and all events again. 11242 */ 11243 export interface PlayersCreatedEvent { 11244 players: PlayerId[]; 11245 } 11246 } 11247 11248 /** 11249 * This domain is deprecated - use Runtime or Log instead. 11250 */ 11251 export namespace Console { 11252 11253 export enum ConsoleMessageSource { 11254 XML = 'xml', 11255 Javascript = 'javascript', 11256 Network = 'network', 11257 ConsoleAPI = 'console-api', 11258 Storage = 'storage', 11259 Appcache = 'appcache', 11260 Rendering = 'rendering', 11261 Security = 'security', 11262 Other = 'other', 11263 Deprecation = 'deprecation', 11264 Worker = 'worker', 11265 } 11266 11267 export enum ConsoleMessageLevel { 11268 Log = 'log', 11269 Warning = 'warning', 11270 Error = 'error', 11271 Debug = 'debug', 11272 Info = 'info', 11273 } 11274 11275 /** 11276 * Console message. 11277 */ 11278 export interface ConsoleMessage { 11279 /** 11280 * Message source. 11281 */ 11282 source: ConsoleMessageSource; 11283 /** 11284 * Message severity. 11285 */ 11286 level: ConsoleMessageLevel; 11287 /** 11288 * Message text. 11289 */ 11290 text: string; 11291 /** 11292 * URL of the message origin. 11293 */ 11294 url?: string; 11295 /** 11296 * Line number in the resource that generated this message (1-based). 11297 */ 11298 line?: integer; 11299 /** 11300 * Column number in the resource that generated this message (1-based). 11301 */ 11302 column?: integer; 11303 } 11304 11305 /** 11306 * Issued when new console message is added. 11307 */ 11308 export interface MessageAddedEvent { 11309 /** 11310 * Console message that has been added. 11311 */ 11312 message: ConsoleMessage; 11313 } 11314 } 11315 11316 /** 11317 * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing 11318 * breakpoints, stepping through execution, exploring stack traces, etc. 11319 */ 11320 export namespace Debugger { 11321 11322 /** 11323 * Breakpoint identifier. 11324 */ 11325 export type BreakpointId = string; 11326 11327 /** 11328 * Call frame identifier. 11329 */ 11330 export type CallFrameId = string; 11331 11332 /** 11333 * Location in the source code. 11334 */ 11335 export interface Location { 11336 /** 11337 * Script identifier as reported in the `Debugger.scriptParsed`. 11338 */ 11339 scriptId: Runtime.ScriptId; 11340 /** 11341 * Line number in the script (0-based). 11342 */ 11343 lineNumber: integer; 11344 /** 11345 * Column number in the script (0-based). 11346 */ 11347 columnNumber?: integer; 11348 } 11349 11350 /** 11351 * Location in the source code. 11352 */ 11353 export interface ScriptPosition { 11354 lineNumber: integer; 11355 columnNumber: integer; 11356 } 11357 11358 /** 11359 * JavaScript call frame. Array of call frames form the call stack. 11360 */ 11361 export interface CallFrame { 11362 /** 11363 * Call frame identifier. This identifier is only valid while the virtual machine is paused. 11364 */ 11365 callFrameId: CallFrameId; 11366 /** 11367 * Name of the JavaScript function called on this call frame. 11368 */ 11369 functionName: string; 11370 /** 11371 * Location in the source code. 11372 */ 11373 functionLocation?: Location; 11374 /** 11375 * Location in the source code. 11376 */ 11377 location: Location; 11378 /** 11379 * JavaScript script name or url. 11380 */ 11381 url: string; 11382 /** 11383 * Scope chain for this call frame. 11384 */ 11385 scopeChain: Scope[]; 11386 /** 11387 * `this` object for this call frame. 11388 */ 11389 this: Runtime.RemoteObject; 11390 /** 11391 * The value being returned, if the function is at return point. 11392 */ 11393 returnValue?: Runtime.RemoteObject; 11394 } 11395 11396 export enum ScopeType { 11397 Global = 'global', 11398 Local = 'local', 11399 With = 'with', 11400 Closure = 'closure', 11401 Catch = 'catch', 11402 Block = 'block', 11403 Script = 'script', 11404 Eval = 'eval', 11405 Module = 'module', 11406 WasmExpressionStack = 'wasm-expression-stack', 11407 } 11408 11409 /** 11410 * Scope description. 11411 */ 11412 export interface Scope { 11413 /** 11414 * Scope type. 11415 */ 11416 type: ScopeType; 11417 /** 11418 * Object representing the scope. For `global` and `with` scopes it represents the actual 11419 * object; for the rest of the scopes, it is artificial transient object enumerating scope 11420 * variables as its properties. 11421 */ 11422 object: Runtime.RemoteObject; 11423 name?: string; 11424 /** 11425 * Location in the source code where scope starts 11426 */ 11427 startLocation?: Location; 11428 /** 11429 * Location in the source code where scope ends 11430 */ 11431 endLocation?: Location; 11432 } 11433 11434 /** 11435 * Search match for resource. 11436 */ 11437 export interface SearchMatch { 11438 /** 11439 * Line number in resource content. 11440 */ 11441 lineNumber: number; 11442 /** 11443 * Line with match content. 11444 */ 11445 lineContent: string; 11446 } 11447 11448 export enum BreakLocationType { 11449 DebuggerStatement = 'debuggerStatement', 11450 Call = 'call', 11451 Return = 'return', 11452 } 11453 11454 export interface BreakLocation { 11455 /** 11456 * Script identifier as reported in the `Debugger.scriptParsed`. 11457 */ 11458 scriptId: Runtime.ScriptId; 11459 /** 11460 * Line number in the script (0-based). 11461 */ 11462 lineNumber: integer; 11463 /** 11464 * Column number in the script (0-based). 11465 */ 11466 columnNumber?: integer; 11467 type?: BreakLocationType; 11468 } 11469 11470 /** 11471 * Enum of possible script languages. 11472 */ 11473 export enum ScriptLanguage { 11474 JavaScript = 'JavaScript', 11475 WebAssembly = 'WebAssembly', 11476 } 11477 11478 export enum ContinueToLocationRequestTargetCallFrames { 11479 Any = 'any', 11480 Current = 'current', 11481 } 11482 11483 export interface ContinueToLocationRequest { 11484 /** 11485 * Location to continue to. 11486 */ 11487 location: Location; 11488 targetCallFrames?: ContinueToLocationRequestTargetCallFrames; 11489 } 11490 11491 export interface EnableRequest { 11492 /** 11493 * The maximum size in bytes of collected scripts (not referenced by other heap objects) 11494 * the debugger can hold. Puts no limit if paramter is omitted. 11495 */ 11496 maxScriptsCacheSize?: number; 11497 } 11498 11499 export interface EnableResponse { 11500 /** 11501 * Unique identifier of the debugger. 11502 */ 11503 debuggerId: Runtime.UniqueDebuggerId; 11504 } 11505 11506 export interface EvaluateOnCallFrameRequest { 11507 /** 11508 * Call frame identifier to evaluate on. 11509 */ 11510 callFrameId: CallFrameId; 11511 /** 11512 * Expression to evaluate. 11513 */ 11514 expression: string; 11515 /** 11516 * String object group name to put result into (allows rapid releasing resulting object handles 11517 * using `releaseObjectGroup`). 11518 */ 11519 objectGroup?: string; 11520 /** 11521 * Specifies whether command line API should be available to the evaluated expression, defaults 11522 * to false. 11523 */ 11524 includeCommandLineAPI?: boolean; 11525 /** 11526 * In silent mode exceptions thrown during evaluation are not reported and do not pause 11527 * execution. Overrides `setPauseOnException` state. 11528 */ 11529 silent?: boolean; 11530 /** 11531 * Whether the result is expected to be a JSON object that should be sent by value. 11532 */ 11533 returnByValue?: boolean; 11534 /** 11535 * Whether preview should be generated for the result. 11536 */ 11537 generatePreview?: boolean; 11538 /** 11539 * Whether to throw an exception if side effect cannot be ruled out during evaluation. 11540 */ 11541 throwOnSideEffect?: boolean; 11542 /** 11543 * Terminate execution after timing out (number of milliseconds). 11544 */ 11545 timeout?: Runtime.TimeDelta; 11546 } 11547 11548 export interface EvaluateOnCallFrameResponse { 11549 /** 11550 * Object wrapper for the evaluation result. 11551 */ 11552 result: Runtime.RemoteObject; 11553 /** 11554 * Exception details. 11555 */ 11556 exceptionDetails?: Runtime.ExceptionDetails; 11557 } 11558 11559 export interface GetPossibleBreakpointsRequest { 11560 /** 11561 * Start of range to search possible breakpoint locations in. 11562 */ 11563 start: Location; 11564 /** 11565 * End of range to search possible breakpoint locations in (excluding). When not specified, end 11566 * of scripts is used as end of range. 11567 */ 11568 end?: Location; 11569 /** 11570 * Only consider locations which are in the same (non-nested) function as start. 11571 */ 11572 restrictToFunction?: boolean; 11573 } 11574 11575 export interface GetPossibleBreakpointsResponse { 11576 /** 11577 * List of the possible breakpoint locations. 11578 */ 11579 locations: BreakLocation[]; 11580 } 11581 11582 export interface GetScriptSourceRequest { 11583 /** 11584 * Id of the script to get source for. 11585 */ 11586 scriptId: Runtime.ScriptId; 11587 } 11588 11589 export interface GetScriptSourceResponse { 11590 /** 11591 * Script source (empty in case of Wasm bytecode). 11592 */ 11593 scriptSource: string; 11594 /** 11595 * Wasm bytecode. 11596 */ 11597 bytecode?: binary; 11598 } 11599 11600 export interface GetWasmBytecodeRequest { 11601 /** 11602 * Id of the Wasm script to get source for. 11603 */ 11604 scriptId: Runtime.ScriptId; 11605 } 11606 11607 export interface GetWasmBytecodeResponse { 11608 /** 11609 * Script source. 11610 */ 11611 bytecode: binary; 11612 } 11613 11614 export interface GetStackTraceRequest { 11615 stackTraceId: Runtime.StackTraceId; 11616 } 11617 11618 export interface GetStackTraceResponse { 11619 stackTrace: Runtime.StackTrace; 11620 } 11621 11622 export interface PauseOnAsyncCallRequest { 11623 /** 11624 * Debugger will pause when async call with given stack trace is started. 11625 */ 11626 parentStackTraceId: Runtime.StackTraceId; 11627 } 11628 11629 export interface RemoveBreakpointRequest { 11630 breakpointId: BreakpointId; 11631 } 11632 11633 export interface RestartFrameRequest { 11634 /** 11635 * Call frame identifier to evaluate on. 11636 */ 11637 callFrameId: CallFrameId; 11638 } 11639 11640 export interface RestartFrameResponse { 11641 /** 11642 * New stack trace. 11643 */ 11644 callFrames: CallFrame[]; 11645 /** 11646 * Async stack trace, if any. 11647 */ 11648 asyncStackTrace?: Runtime.StackTrace; 11649 /** 11650 * Async stack trace, if any. 11651 */ 11652 asyncStackTraceId?: Runtime.StackTraceId; 11653 } 11654 11655 export interface ResumeRequest { 11656 /** 11657 * Set to true to terminate execution upon resuming execution. In contrast 11658 * to Runtime.terminateExecution, this will allows to execute further 11659 * JavaScript (i.e. via evaluation) until execution of the paused code 11660 * is actually resumed, at which point termination is triggered. 11661 * If execution is currently not paused, this parameter has no effect. 11662 */ 11663 terminateOnResume?: boolean; 11664 } 11665 11666 export interface SearchInContentRequest { 11667 /** 11668 * Id of the script to search in. 11669 */ 11670 scriptId: Runtime.ScriptId; 11671 /** 11672 * String to search for. 11673 */ 11674 query: string; 11675 /** 11676 * If true, search is case sensitive. 11677 */ 11678 caseSensitive?: boolean; 11679 /** 11680 * If true, treats string parameter as regex. 11681 */ 11682 isRegex?: boolean; 11683 } 11684 11685 export interface SearchInContentResponse { 11686 /** 11687 * List of search matches. 11688 */ 11689 result: SearchMatch[]; 11690 } 11691 11692 export interface SetAsyncCallStackDepthRequest { 11693 /** 11694 * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async 11695 * call stacks (default). 11696 */ 11697 maxDepth: integer; 11698 } 11699 11700 export interface SetBlackboxPatternsRequest { 11701 /** 11702 * Array of regexps that will be used to check script url for blackbox state. 11703 */ 11704 patterns: string[]; 11705 } 11706 11707 export interface SetBlackboxedRangesRequest { 11708 /** 11709 * Id of the script. 11710 */ 11711 scriptId: Runtime.ScriptId; 11712 positions: ScriptPosition[]; 11713 } 11714 11715 export interface SetBreakpointRequest { 11716 /** 11717 * Location to set breakpoint in. 11718 */ 11719 location: Location; 11720 /** 11721 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the 11722 * breakpoint if this expression evaluates to true. 11723 */ 11724 condition?: string; 11725 } 11726 11727 export interface SetBreakpointResponse { 11728 /** 11729 * Id of the created breakpoint for further reference. 11730 */ 11731 breakpointId: BreakpointId; 11732 /** 11733 * Location this breakpoint resolved into. 11734 */ 11735 actualLocation: Location; 11736 } 11737 11738 export enum SetInstrumentationBreakpointRequestInstrumentation { 11739 BeforeScriptExecution = 'beforeScriptExecution', 11740 BeforeScriptWithSourceMapExecution = 'beforeScriptWithSourceMapExecution', 11741 } 11742 11743 export interface SetInstrumentationBreakpointRequest { 11744 /** 11745 * Instrumentation name. 11746 */ 11747 instrumentation: SetInstrumentationBreakpointRequestInstrumentation; 11748 } 11749 11750 export interface SetInstrumentationBreakpointResponse { 11751 /** 11752 * Id of the created breakpoint for further reference. 11753 */ 11754 breakpointId: BreakpointId; 11755 } 11756 11757 export interface SetBreakpointByUrlRequest { 11758 /** 11759 * Line number to set breakpoint at. 11760 */ 11761 lineNumber: integer; 11762 /** 11763 * URL of the resources to set breakpoint on. 11764 */ 11765 url?: string; 11766 /** 11767 * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or 11768 * `urlRegex` must be specified. 11769 */ 11770 urlRegex?: string; 11771 /** 11772 * Script hash of the resources to set breakpoint on. 11773 */ 11774 scriptHash?: string; 11775 /** 11776 * Offset in the line to set breakpoint at. 11777 */ 11778 columnNumber?: integer; 11779 /** 11780 * Expression to use as a breakpoint condition. When specified, debugger will only stop on the 11781 * breakpoint if this expression evaluates to true. 11782 */ 11783 condition?: string; 11784 } 11785 11786 export interface SetBreakpointByUrlResponse { 11787 /** 11788 * Id of the created breakpoint for further reference. 11789 */ 11790 breakpointId: BreakpointId; 11791 /** 11792 * List of the locations this breakpoint resolved into upon addition. 11793 */ 11794 locations: Location[]; 11795 } 11796 11797 export interface SetBreakpointOnFunctionCallRequest { 11798 /** 11799 * Function object id. 11800 */ 11801 objectId: Runtime.RemoteObjectId; 11802 /** 11803 * Expression to use as a breakpoint condition. When specified, debugger will 11804 * stop on the breakpoint if this expression evaluates to true. 11805 */ 11806 condition?: string; 11807 } 11808 11809 export interface SetBreakpointOnFunctionCallResponse { 11810 /** 11811 * Id of the created breakpoint for further reference. 11812 */ 11813 breakpointId: BreakpointId; 11814 } 11815 11816 export interface SetBreakpointsActiveRequest { 11817 /** 11818 * New value for breakpoints active state. 11819 */ 11820 active: boolean; 11821 } 11822 11823 export enum SetPauseOnExceptionsRequestState { 11824 None = 'none', 11825 Uncaught = 'uncaught', 11826 All = 'all', 11827 } 11828 11829 export interface SetPauseOnExceptionsRequest { 11830 /** 11831 * Pause on exceptions mode. 11832 */ 11833 state: SetPauseOnExceptionsRequestState; 11834 } 11835 11836 export interface SetReturnValueRequest { 11837 /** 11838 * New return value. 11839 */ 11840 newValue: Runtime.CallArgument; 11841 } 11842 11843 export interface SetScriptSourceRequest { 11844 /** 11845 * Id of the script to edit. 11846 */ 11847 scriptId: Runtime.ScriptId; 11848 /** 11849 * New content of the script. 11850 */ 11851 scriptSource: string; 11852 /** 11853 * If true the change will not actually be applied. Dry run may be used to get result 11854 * description without actually modifying the code. 11855 */ 11856 dryRun?: boolean; 11857 } 11858 11859 export interface SetScriptSourceResponse { 11860 /** 11861 * New stack trace in case editing has happened while VM was stopped. 11862 */ 11863 callFrames?: CallFrame[]; 11864 /** 11865 * Whether current call stack was modified after applying the changes. 11866 */ 11867 stackChanged?: boolean; 11868 /** 11869 * Async stack trace, if any. 11870 */ 11871 asyncStackTrace?: Runtime.StackTrace; 11872 /** 11873 * Async stack trace, if any. 11874 */ 11875 asyncStackTraceId?: Runtime.StackTraceId; 11876 /** 11877 * Exception details if any. 11878 */ 11879 exceptionDetails?: Runtime.ExceptionDetails; 11880 } 11881 11882 export interface SetSkipAllPausesRequest { 11883 /** 11884 * New value for skip pauses state. 11885 */ 11886 skip: boolean; 11887 } 11888 11889 export interface SetVariableValueRequest { 11890 /** 11891 * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' 11892 * scope types are allowed. Other scopes could be manipulated manually. 11893 */ 11894 scopeNumber: integer; 11895 /** 11896 * Variable name. 11897 */ 11898 variableName: string; 11899 /** 11900 * New variable value. 11901 */ 11902 newValue: Runtime.CallArgument; 11903 /** 11904 * Id of callframe that holds variable. 11905 */ 11906 callFrameId: CallFrameId; 11907 } 11908 11909 export interface StepIntoRequest { 11910 /** 11911 * Debugger will pause on the execution of the first async task which was scheduled 11912 * before next pause. 11913 */ 11914 breakOnAsyncCall?: boolean; 11915 } 11916 11917 /** 11918 * Fired when breakpoint is resolved to an actual script and location. 11919 */ 11920 export interface BreakpointResolvedEvent { 11921 /** 11922 * Breakpoint unique identifier. 11923 */ 11924 breakpointId: BreakpointId; 11925 /** 11926 * Actual breakpoint location. 11927 */ 11928 location: Location; 11929 } 11930 11931 export enum PausedEventReason { 11932 Ambiguous = 'ambiguous', 11933 Assert = 'assert', 11934 DebugCommand = 'debugCommand', 11935 DOM = 'DOM', 11936 EventListener = 'EventListener', 11937 Exception = 'exception', 11938 Instrumentation = 'instrumentation', 11939 OOM = 'OOM', 11940 Other = 'other', 11941 PromiseRejection = 'promiseRejection', 11942 XHR = 'XHR', 11943 } 11944 11945 /** 11946 * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. 11947 */ 11948 export interface PausedEvent { 11949 /** 11950 * Call stack the virtual machine stopped on. 11951 */ 11952 callFrames: CallFrame[]; 11953 /** 11954 * Pause reason. 11955 */ 11956 reason: PausedEventReason; 11957 /** 11958 * Object containing break-specific auxiliary properties. 11959 */ 11960 data?: any; 11961 /** 11962 * Hit breakpoints IDs 11963 */ 11964 hitBreakpoints?: string[]; 11965 /** 11966 * Async stack trace, if any. 11967 */ 11968 asyncStackTrace?: Runtime.StackTrace; 11969 /** 11970 * Async stack trace, if any. 11971 */ 11972 asyncStackTraceId?: Runtime.StackTraceId; 11973 /** 11974 * Never present, will be removed. 11975 */ 11976 asyncCallStackTraceId?: Runtime.StackTraceId; 11977 } 11978 11979 /** 11980 * Fired when virtual machine fails to parse the script. 11981 */ 11982 export interface ScriptFailedToParseEvent { 11983 /** 11984 * Identifier of the script parsed. 11985 */ 11986 scriptId: Runtime.ScriptId; 11987 /** 11988 * URL or name of the script parsed (if any). 11989 */ 11990 url: string; 11991 /** 11992 * Line offset of the script within the resource with given URL (for script tags). 11993 */ 11994 startLine: integer; 11995 /** 11996 * Column offset of the script within the resource with given URL. 11997 */ 11998 startColumn: integer; 11999 /** 12000 * Last line of the script. 12001 */ 12002 endLine: integer; 12003 /** 12004 * Length of the last line of the script. 12005 */ 12006 endColumn: integer; 12007 /** 12008 * Specifies script creation context. 12009 */ 12010 executionContextId: Runtime.ExecutionContextId; 12011 /** 12012 * Content hash of the script. 12013 */ 12014 hash: string; 12015 /** 12016 * Embedder-specific auxiliary data. 12017 */ 12018 executionContextAuxData?: any; 12019 /** 12020 * URL of source map associated with script (if any). 12021 */ 12022 sourceMapURL?: string; 12023 /** 12024 * True, if this script has sourceURL. 12025 */ 12026 hasSourceURL?: boolean; 12027 /** 12028 * True, if this script is ES6 module. 12029 */ 12030 isModule?: boolean; 12031 /** 12032 * This script length. 12033 */ 12034 length?: integer; 12035 /** 12036 * JavaScript top stack frame of where the script parsed event was triggered if available. 12037 */ 12038 stackTrace?: Runtime.StackTrace; 12039 /** 12040 * If the scriptLanguage is WebAssembly, the code section offset in the module. 12041 */ 12042 codeOffset?: integer; 12043 /** 12044 * The language of the script. 12045 */ 12046 scriptLanguage?: Debugger.ScriptLanguage; 12047 } 12048 12049 /** 12050 * Fired when virtual machine parses script. This event is also fired for all known and uncollected 12051 * scripts upon enabling debugger. 12052 */ 12053 export interface ScriptParsedEvent { 12054 /** 12055 * Identifier of the script parsed. 12056 */ 12057 scriptId: Runtime.ScriptId; 12058 /** 12059 * URL or name of the script parsed (if any). 12060 */ 12061 url: string; 12062 /** 12063 * Line offset of the script within the resource with given URL (for script tags). 12064 */ 12065 startLine: integer; 12066 /** 12067 * Column offset of the script within the resource with given URL. 12068 */ 12069 startColumn: integer; 12070 /** 12071 * Last line of the script. 12072 */ 12073 endLine: integer; 12074 /** 12075 * Length of the last line of the script. 12076 */ 12077 endColumn: integer; 12078 /** 12079 * Specifies script creation context. 12080 */ 12081 executionContextId: Runtime.ExecutionContextId; 12082 /** 12083 * Content hash of the script. 12084 */ 12085 hash: string; 12086 /** 12087 * Embedder-specific auxiliary data. 12088 */ 12089 executionContextAuxData?: any; 12090 /** 12091 * True, if this script is generated as a result of the live edit operation. 12092 */ 12093 isLiveEdit?: boolean; 12094 /** 12095 * URL of source map associated with script (if any). 12096 */ 12097 sourceMapURL?: string; 12098 /** 12099 * True, if this script has sourceURL. 12100 */ 12101 hasSourceURL?: boolean; 12102 /** 12103 * True, if this script is ES6 module. 12104 */ 12105 isModule?: boolean; 12106 /** 12107 * This script length. 12108 */ 12109 length?: integer; 12110 /** 12111 * JavaScript top stack frame of where the script parsed event was triggered if available. 12112 */ 12113 stackTrace?: Runtime.StackTrace; 12114 /** 12115 * If the scriptLanguage is WebAssembly, the code section offset in the module. 12116 */ 12117 codeOffset?: integer; 12118 /** 12119 * The language of the script. 12120 */ 12121 scriptLanguage?: Debugger.ScriptLanguage; 12122 } 12123 } 12124 12125 export namespace HeapProfiler { 12126 12127 /** 12128 * Heap snapshot object id. 12129 */ 12130 export type HeapSnapshotObjectId = string; 12131 12132 /** 12133 * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. 12134 */ 12135 export interface SamplingHeapProfileNode { 12136 /** 12137 * Function location. 12138 */ 12139 callFrame: Runtime.CallFrame; 12140 /** 12141 * Allocations size in bytes for the node excluding children. 12142 */ 12143 selfSize: number; 12144 /** 12145 * Node id. Ids are unique across all profiles collected between startSampling and stopSampling. 12146 */ 12147 id: integer; 12148 /** 12149 * Child nodes. 12150 */ 12151 children: SamplingHeapProfileNode[]; 12152 } 12153 12154 /** 12155 * A single sample from a sampling profile. 12156 */ 12157 export interface SamplingHeapProfileSample { 12158 /** 12159 * Allocation size in bytes attributed to the sample. 12160 */ 12161 size: number; 12162 /** 12163 * Id of the corresponding profile tree node. 12164 */ 12165 nodeId: integer; 12166 /** 12167 * Time-ordered sample ordinal number. It is unique across all profiles retrieved 12168 * between startSampling and stopSampling. 12169 */ 12170 ordinal: number; 12171 } 12172 12173 /** 12174 * Sampling profile. 12175 */ 12176 export interface SamplingHeapProfile { 12177 head: SamplingHeapProfileNode; 12178 samples: SamplingHeapProfileSample[]; 12179 } 12180 12181 export interface AddInspectedHeapObjectRequest { 12182 /** 12183 * Heap snapshot object id to be accessible by means of $x command line API. 12184 */ 12185 heapObjectId: HeapSnapshotObjectId; 12186 } 12187 12188 export interface GetHeapObjectIdRequest { 12189 /** 12190 * Identifier of the object to get heap object id for. 12191 */ 12192 objectId: Runtime.RemoteObjectId; 12193 } 12194 12195 export interface GetHeapObjectIdResponse { 12196 /** 12197 * Id of the heap snapshot object corresponding to the passed remote object id. 12198 */ 12199 heapSnapshotObjectId: HeapSnapshotObjectId; 12200 } 12201 12202 export interface GetObjectByHeapObjectIdRequest { 12203 objectId: HeapSnapshotObjectId; 12204 /** 12205 * Symbolic group name that can be used to release multiple objects. 12206 */ 12207 objectGroup?: string; 12208 } 12209 12210 export interface GetObjectByHeapObjectIdResponse { 12211 /** 12212 * Evaluation result. 12213 */ 12214 result: Runtime.RemoteObject; 12215 } 12216 12217 export interface GetSamplingProfileResponse { 12218 /** 12219 * Return the sampling profile being collected. 12220 */ 12221 profile: SamplingHeapProfile; 12222 } 12223 12224 export interface StartSamplingRequest { 12225 /** 12226 * Average sample interval in bytes. Poisson distribution is used for the intervals. The 12227 * default value is 32768 bytes. 12228 */ 12229 samplingInterval?: number; 12230 } 12231 12232 export interface StartTrackingHeapObjectsRequest { 12233 trackAllocations?: boolean; 12234 } 12235 12236 export interface StopSamplingResponse { 12237 /** 12238 * Recorded sampling heap profile. 12239 */ 12240 profile: SamplingHeapProfile; 12241 } 12242 12243 export interface StopTrackingHeapObjectsRequest { 12244 /** 12245 * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken 12246 * when the tracking is stopped. 12247 */ 12248 reportProgress?: boolean; 12249 treatGlobalObjectsAsRoots?: boolean; 12250 } 12251 12252 export interface TakeHeapSnapshotRequest { 12253 /** 12254 * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. 12255 */ 12256 reportProgress?: boolean; 12257 /** 12258 * If true, a raw snapshot without artifical roots will be generated 12259 */ 12260 treatGlobalObjectsAsRoots?: boolean; 12261 } 12262 12263 export interface AddHeapSnapshotChunkEvent { 12264 chunk: string; 12265 } 12266 12267 /** 12268 * If heap objects tracking has been started then backend may send update for one or more fragments 12269 */ 12270 export interface HeapStatsUpdateEvent { 12271 /** 12272 * An array of triplets. Each triplet describes a fragment. The first integer is the fragment 12273 * index, the second integer is a total count of objects for the fragment, the third integer is 12274 * a total size of the objects for the fragment. 12275 */ 12276 statsUpdate: integer[]; 12277 } 12278 12279 /** 12280 * If heap objects tracking has been started then backend regularly sends a current value for last 12281 * seen object id and corresponding timestamp. If the were changes in the heap since last event 12282 * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. 12283 */ 12284 export interface LastSeenObjectIdEvent { 12285 lastSeenObjectId: integer; 12286 timestamp: number; 12287 } 12288 12289 export interface ReportHeapSnapshotProgressEvent { 12290 done: integer; 12291 total: integer; 12292 finished?: boolean; 12293 } 12294 } 12295 12296 export namespace Profiler { 12297 12298 /** 12299 * Profile node. Holds callsite information, execution statistics and child nodes. 12300 */ 12301 export interface ProfileNode { 12302 /** 12303 * Unique id of the node. 12304 */ 12305 id: integer; 12306 /** 12307 * Function location. 12308 */ 12309 callFrame: Runtime.CallFrame; 12310 /** 12311 * Number of samples where this node was on top of the call stack. 12312 */ 12313 hitCount?: integer; 12314 /** 12315 * Child node ids. 12316 */ 12317 children?: integer[]; 12318 /** 12319 * The reason of being not optimized. The function may be deoptimized or marked as don't 12320 * optimize. 12321 */ 12322 deoptReason?: string; 12323 /** 12324 * An array of source position ticks. 12325 */ 12326 positionTicks?: PositionTickInfo[]; 12327 } 12328 12329 /** 12330 * Profile. 12331 */ 12332 export interface Profile { 12333 /** 12334 * The list of profile nodes. First item is the root node. 12335 */ 12336 nodes: ProfileNode[]; 12337 /** 12338 * Profiling start timestamp in microseconds. 12339 */ 12340 startTime: number; 12341 /** 12342 * Profiling end timestamp in microseconds. 12343 */ 12344 endTime: number; 12345 /** 12346 * Ids of samples top nodes. 12347 */ 12348 samples?: integer[]; 12349 /** 12350 * Time intervals between adjacent samples in microseconds. The first delta is relative to the 12351 * profile startTime. 12352 */ 12353 timeDeltas?: integer[]; 12354 } 12355 12356 /** 12357 * Specifies a number of samples attributed to a certain source position. 12358 */ 12359 export interface PositionTickInfo { 12360 /** 12361 * Source line number (1-based). 12362 */ 12363 line: integer; 12364 /** 12365 * Number of samples attributed to the source line. 12366 */ 12367 ticks: integer; 12368 } 12369 12370 /** 12371 * Coverage data for a source range. 12372 */ 12373 export interface CoverageRange { 12374 /** 12375 * JavaScript script source offset for the range start. 12376 */ 12377 startOffset: integer; 12378 /** 12379 * JavaScript script source offset for the range end. 12380 */ 12381 endOffset: integer; 12382 /** 12383 * Collected execution count of the source range. 12384 */ 12385 count: integer; 12386 } 12387 12388 /** 12389 * Coverage data for a JavaScript function. 12390 */ 12391 export interface FunctionCoverage { 12392 /** 12393 * JavaScript function name. 12394 */ 12395 functionName: string; 12396 /** 12397 * Source ranges inside the function with coverage data. 12398 */ 12399 ranges: CoverageRange[]; 12400 /** 12401 * Whether coverage data for this function has block granularity. 12402 */ 12403 isBlockCoverage: boolean; 12404 } 12405 12406 /** 12407 * Coverage data for a JavaScript script. 12408 */ 12409 export interface ScriptCoverage { 12410 /** 12411 * JavaScript script id. 12412 */ 12413 scriptId: Runtime.ScriptId; 12414 /** 12415 * JavaScript script name or url. 12416 */ 12417 url: string; 12418 /** 12419 * Functions contained in the script that has coverage data. 12420 */ 12421 functions: FunctionCoverage[]; 12422 } 12423 12424 /** 12425 * Describes a type collected during runtime. 12426 */ 12427 export interface TypeObject { 12428 /** 12429 * Name of a type collected with type profiling. 12430 */ 12431 name: string; 12432 } 12433 12434 /** 12435 * Source offset and types for a parameter or return value. 12436 */ 12437 export interface TypeProfileEntry { 12438 /** 12439 * Source offset of the parameter or end of function for return values. 12440 */ 12441 offset: integer; 12442 /** 12443 * The types for this parameter or return value. 12444 */ 12445 types: TypeObject[]; 12446 } 12447 12448 /** 12449 * Type profile data collected during runtime for a JavaScript script. 12450 */ 12451 export interface ScriptTypeProfile { 12452 /** 12453 * JavaScript script id. 12454 */ 12455 scriptId: Runtime.ScriptId; 12456 /** 12457 * JavaScript script name or url. 12458 */ 12459 url: string; 12460 /** 12461 * Type profile entries for parameters and return values of the functions in the script. 12462 */ 12463 entries: TypeProfileEntry[]; 12464 } 12465 12466 /** 12467 * Collected counter information. 12468 */ 12469 export interface CounterInfo { 12470 /** 12471 * Counter name. 12472 */ 12473 name: string; 12474 /** 12475 * Counter value. 12476 */ 12477 value: integer; 12478 } 12479 12480 export interface GetBestEffortCoverageResponse { 12481 /** 12482 * Coverage data for the current isolate. 12483 */ 12484 result: ScriptCoverage[]; 12485 } 12486 12487 export interface SetSamplingIntervalRequest { 12488 /** 12489 * New sampling interval in microseconds. 12490 */ 12491 interval: integer; 12492 } 12493 12494 export interface StartPreciseCoverageRequest { 12495 /** 12496 * Collect accurate call counts beyond simple 'covered' or 'not covered'. 12497 */ 12498 callCount?: boolean; 12499 /** 12500 * Collect block-based coverage. 12501 */ 12502 detailed?: boolean; 12503 /** 12504 * Allow the backend to send updates on its own initiative 12505 */ 12506 allowTriggeredUpdates?: boolean; 12507 } 12508 12509 export interface StartPreciseCoverageResponse { 12510 /** 12511 * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. 12512 */ 12513 timestamp: number; 12514 } 12515 12516 export interface StopResponse { 12517 /** 12518 * Recorded profile. 12519 */ 12520 profile: Profile; 12521 } 12522 12523 export interface TakePreciseCoverageResponse { 12524 /** 12525 * Coverage data for the current isolate. 12526 */ 12527 result: ScriptCoverage[]; 12528 /** 12529 * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. 12530 */ 12531 timestamp: number; 12532 } 12533 12534 export interface TakeTypeProfileResponse { 12535 /** 12536 * Type profile for all scripts since startTypeProfile() was turned on. 12537 */ 12538 result: ScriptTypeProfile[]; 12539 } 12540 12541 export interface GetRuntimeCallStatsResponse { 12542 /** 12543 * Collected counter information. 12544 */ 12545 result: CounterInfo[]; 12546 } 12547 12548 export interface ConsoleProfileFinishedEvent { 12549 id: string; 12550 /** 12551 * Location of console.profileEnd(). 12552 */ 12553 location: Debugger.Location; 12554 profile: Profile; 12555 /** 12556 * Profile title passed as an argument to console.profile(). 12557 */ 12558 title?: string; 12559 } 12560 12561 /** 12562 * Sent when new profile recording is started using console.profile() call. 12563 */ 12564 export interface ConsoleProfileStartedEvent { 12565 id: string; 12566 /** 12567 * Location of console.profile(). 12568 */ 12569 location: Debugger.Location; 12570 /** 12571 * Profile title passed as an argument to console.profile(). 12572 */ 12573 title?: string; 12574 } 12575 12576 /** 12577 * Reports coverage delta since the last poll (either from an event like this, or from 12578 * `takePreciseCoverage` for the current isolate. May only be sent if precise code 12579 * coverage has been started. This event can be trigged by the embedder to, for example, 12580 * trigger collection of coverage data immediatelly at a certain point in time. 12581 */ 12582 export interface PreciseCoverageDeltaUpdateEvent { 12583 /** 12584 * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. 12585 */ 12586 timestamp: number; 12587 /** 12588 * Identifier for distinguishing coverage events. 12589 */ 12590 occassion: string; 12591 /** 12592 * Coverage data for the current isolate. 12593 */ 12594 result: ScriptCoverage[]; 12595 } 12596 } 12597 12598 /** 12599 * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. 12600 * Evaluation results are returned as mirror object that expose object type, string representation 12601 * and unique identifier that can be used for further object reference. Original objects are 12602 * maintained in memory unless they are either explicitly released or are released along with the 12603 * other objects in their object group. 12604 */ 12605 export namespace Runtime { 12606 12607 /** 12608 * Unique script identifier. 12609 */ 12610 export type ScriptId = string; 12611 12612 /** 12613 * Unique object identifier. 12614 */ 12615 export type RemoteObjectId = string; 12616 12617 /** 12618 * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, 12619 * `-Infinity`, and bigint literals. 12620 */ 12621 export type UnserializableValue = string; 12622 12623 export enum RemoteObjectType { 12624 Object = 'object', 12625 Function = 'function', 12626 Undefined = 'undefined', 12627 String = 'string', 12628 Number = 'number', 12629 Boolean = 'boolean', 12630 Symbol = 'symbol', 12631 Bigint = 'bigint', 12632 Wasm = 'wasm', 12633 } 12634 12635 export enum RemoteObjectSubtype { 12636 Array = 'array', 12637 Null = 'null', 12638 Node = 'node', 12639 Regexp = 'regexp', 12640 Date = 'date', 12641 Map = 'map', 12642 Set = 'set', 12643 Weakmap = 'weakmap', 12644 Weakset = 'weakset', 12645 Iterator = 'iterator', 12646 Generator = 'generator', 12647 Error = 'error', 12648 Proxy = 'proxy', 12649 Promise = 'promise', 12650 Typedarray = 'typedarray', 12651 Arraybuffer = 'arraybuffer', 12652 Dataview = 'dataview', 12653 I32 = 'i32', 12654 I64 = 'i64', 12655 F32 = 'f32', 12656 F64 = 'f64', 12657 V128 = 'v128', 12658 } 12659 12660 /** 12661 * Mirror object referencing original JavaScript object. 12662 */ 12663 export interface RemoteObject { 12664 /** 12665 * Object type. 12666 */ 12667 type: RemoteObjectType; 12668 /** 12669 * Object subtype hint. Specified for `object` or `wasm` type values only. 12670 */ 12671 subtype?: RemoteObjectSubtype; 12672 /** 12673 * Object class (constructor) name. Specified for `object` type values only. 12674 */ 12675 className?: string; 12676 /** 12677 * Remote object value in case of primitive values or JSON values (if it was requested). 12678 */ 12679 value?: any; 12680 /** 12681 * Primitive value which can not be JSON-stringified does not have `value`, but gets this 12682 * property. 12683 */ 12684 unserializableValue?: UnserializableValue; 12685 /** 12686 * String representation of the object. 12687 */ 12688 description?: string; 12689 /** 12690 * Unique object identifier (for non-primitive values). 12691 */ 12692 objectId?: RemoteObjectId; 12693 /** 12694 * Preview containing abbreviated property values. Specified for `object` type values only. 12695 */ 12696 preview?: ObjectPreview; 12697 customPreview?: CustomPreview; 12698 } 12699 12700 export interface CustomPreview { 12701 /** 12702 * The JSON-stringified result of formatter.header(object, config) call. 12703 * It contains json ML array that represents RemoteObject. 12704 */ 12705 header: string; 12706 /** 12707 * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will 12708 * contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. 12709 * The result value is json ML array. 12710 */ 12711 bodyGetterId?: RemoteObjectId; 12712 } 12713 12714 export enum ObjectPreviewType { 12715 Object = 'object', 12716 Function = 'function', 12717 Undefined = 'undefined', 12718 String = 'string', 12719 Number = 'number', 12720 Boolean = 'boolean', 12721 Symbol = 'symbol', 12722 Bigint = 'bigint', 12723 } 12724 12725 export enum ObjectPreviewSubtype { 12726 Array = 'array', 12727 Null = 'null', 12728 Node = 'node', 12729 Regexp = 'regexp', 12730 Date = 'date', 12731 Map = 'map', 12732 Set = 'set', 12733 Weakmap = 'weakmap', 12734 Weakset = 'weakset', 12735 Iterator = 'iterator', 12736 Generator = 'generator', 12737 Error = 'error', 12738 } 12739 12740 /** 12741 * Object containing abbreviated remote object value. 12742 */ 12743 export interface ObjectPreview { 12744 /** 12745 * Object type. 12746 */ 12747 type: ObjectPreviewType; 12748 /** 12749 * Object subtype hint. Specified for `object` type values only. 12750 */ 12751 subtype?: ObjectPreviewSubtype; 12752 /** 12753 * String representation of the object. 12754 */ 12755 description?: string; 12756 /** 12757 * True iff some of the properties or entries of the original object did not fit. 12758 */ 12759 overflow: boolean; 12760 /** 12761 * List of the properties. 12762 */ 12763 properties: PropertyPreview[]; 12764 /** 12765 * List of the entries. Specified for `map` and `set` subtype values only. 12766 */ 12767 entries?: EntryPreview[]; 12768 } 12769 12770 export enum PropertyPreviewType { 12771 Object = 'object', 12772 Function = 'function', 12773 Undefined = 'undefined', 12774 String = 'string', 12775 Number = 'number', 12776 Boolean = 'boolean', 12777 Symbol = 'symbol', 12778 Accessor = 'accessor', 12779 Bigint = 'bigint', 12780 } 12781 12782 export enum PropertyPreviewSubtype { 12783 Array = 'array', 12784 Null = 'null', 12785 Node = 'node', 12786 Regexp = 'regexp', 12787 Date = 'date', 12788 Map = 'map', 12789 Set = 'set', 12790 Weakmap = 'weakmap', 12791 Weakset = 'weakset', 12792 Iterator = 'iterator', 12793 Generator = 'generator', 12794 Error = 'error', 12795 } 12796 12797 export interface PropertyPreview { 12798 /** 12799 * Property name. 12800 */ 12801 name: string; 12802 /** 12803 * Object type. Accessor means that the property itself is an accessor property. 12804 */ 12805 type: PropertyPreviewType; 12806 /** 12807 * User-friendly property value string. 12808 */ 12809 value?: string; 12810 /** 12811 * Nested value preview. 12812 */ 12813 valuePreview?: ObjectPreview; 12814 /** 12815 * Object subtype hint. Specified for `object` type values only. 12816 */ 12817 subtype?: PropertyPreviewSubtype; 12818 } 12819 12820 export interface EntryPreview { 12821 /** 12822 * Preview of the key. Specified for map-like collection entries. 12823 */ 12824 key?: ObjectPreview; 12825 /** 12826 * Preview of the value. 12827 */ 12828 value: ObjectPreview; 12829 } 12830 12831 /** 12832 * Object property descriptor. 12833 */ 12834 export interface PropertyDescriptor { 12835 /** 12836 * Property name or symbol description. 12837 */ 12838 name: string; 12839 /** 12840 * The value associated with the property. 12841 */ 12842 value?: RemoteObject; 12843 /** 12844 * True if the value associated with the property may be changed (data descriptors only). 12845 */ 12846 writable?: boolean; 12847 /** 12848 * A function which serves as a getter for the property, or `undefined` if there is no getter 12849 * (accessor descriptors only). 12850 */ 12851 get?: RemoteObject; 12852 /** 12853 * A function which serves as a setter for the property, or `undefined` if there is no setter 12854 * (accessor descriptors only). 12855 */ 12856 set?: RemoteObject; 12857 /** 12858 * True if the type of this property descriptor may be changed and if the property may be 12859 * deleted from the corresponding object. 12860 */ 12861 configurable: boolean; 12862 /** 12863 * True if this property shows up during enumeration of the properties on the corresponding 12864 * object. 12865 */ 12866 enumerable: boolean; 12867 /** 12868 * True if the result was thrown during the evaluation. 12869 */ 12870 wasThrown?: boolean; 12871 /** 12872 * True if the property is owned for the object. 12873 */ 12874 isOwn?: boolean; 12875 /** 12876 * Property symbol object, if the property is of the `symbol` type. 12877 */ 12878 symbol?: RemoteObject; 12879 } 12880 12881 /** 12882 * Object internal property descriptor. This property isn't normally visible in JavaScript code. 12883 */ 12884 export interface InternalPropertyDescriptor { 12885 /** 12886 * Conventional property name. 12887 */ 12888 name: string; 12889 /** 12890 * The value associated with the property. 12891 */ 12892 value?: RemoteObject; 12893 } 12894 12895 /** 12896 * Object private field descriptor. 12897 */ 12898 export interface PrivatePropertyDescriptor { 12899 /** 12900 * Private property name. 12901 */ 12902 name: string; 12903 /** 12904 * The value associated with the private property. 12905 */ 12906 value?: RemoteObject; 12907 /** 12908 * A function which serves as a getter for the private property, 12909 * or `undefined` if there is no getter (accessor descriptors only). 12910 */ 12911 get?: RemoteObject; 12912 /** 12913 * A function which serves as a setter for the private property, 12914 * or `undefined` if there is no setter (accessor descriptors only). 12915 */ 12916 set?: RemoteObject; 12917 } 12918 12919 /** 12920 * Represents function call argument. Either remote object id `objectId`, primitive `value`, 12921 * unserializable primitive value or neither of (for undefined) them should be specified. 12922 */ 12923 export interface CallArgument { 12924 /** 12925 * Primitive value or serializable javascript object. 12926 */ 12927 value?: any; 12928 /** 12929 * Primitive value which can not be JSON-stringified. 12930 */ 12931 unserializableValue?: UnserializableValue; 12932 /** 12933 * Remote object handle. 12934 */ 12935 objectId?: RemoteObjectId; 12936 } 12937 12938 /** 12939 * Id of an execution context. 12940 */ 12941 export type ExecutionContextId = integer; 12942 12943 /** 12944 * Description of an isolated world. 12945 */ 12946 export interface ExecutionContextDescription { 12947 /** 12948 * Unique id of the execution context. It can be used to specify in which execution context 12949 * script evaluation should be performed. 12950 */ 12951 id: ExecutionContextId; 12952 /** 12953 * Execution context origin. 12954 */ 12955 origin: string; 12956 /** 12957 * Human readable name describing given context. 12958 */ 12959 name: string; 12960 /** 12961 * Embedder-specific auxiliary data. 12962 */ 12963 auxData?: any; 12964 } 12965 12966 /** 12967 * Detailed information about exception (or error) that was thrown during script compilation or 12968 * execution. 12969 */ 12970 export interface ExceptionDetails { 12971 /** 12972 * Exception id. 12973 */ 12974 exceptionId: integer; 12975 /** 12976 * Exception text, which should be used together with exception object when available. 12977 */ 12978 text: string; 12979 /** 12980 * Line number of the exception location (0-based). 12981 */ 12982 lineNumber: integer; 12983 /** 12984 * Column number of the exception location (0-based). 12985 */ 12986 columnNumber: integer; 12987 /** 12988 * Script ID of the exception location. 12989 */ 12990 scriptId?: ScriptId; 12991 /** 12992 * URL of the exception location, to be used when the script was not reported. 12993 */ 12994 url?: string; 12995 /** 12996 * JavaScript stack trace if available. 12997 */ 12998 stackTrace?: StackTrace; 12999 /** 13000 * Exception object if available. 13001 */ 13002 exception?: RemoteObject; 13003 /** 13004 * Identifier of the context where exception happened. 13005 */ 13006 executionContextId?: ExecutionContextId; 13007 } 13008 13009 /** 13010 * Number of milliseconds since epoch. 13011 */ 13012 export type Timestamp = number; 13013 13014 /** 13015 * Number of milliseconds. 13016 */ 13017 export type TimeDelta = number; 13018 13019 /** 13020 * Stack entry for runtime errors and assertions. 13021 */ 13022 export interface CallFrame { 13023 /** 13024 * JavaScript function name. 13025 */ 13026 functionName: string; 13027 /** 13028 * JavaScript script id. 13029 */ 13030 scriptId: ScriptId; 13031 /** 13032 * JavaScript script name or url. 13033 */ 13034 url: string; 13035 /** 13036 * JavaScript script line number (0-based). 13037 */ 13038 lineNumber: integer; 13039 /** 13040 * JavaScript script column number (0-based). 13041 */ 13042 columnNumber: integer; 13043 } 13044 13045 /** 13046 * Call frames for assertions or error messages. 13047 */ 13048 export interface StackTrace { 13049 /** 13050 * String label of this stack trace. For async traces this may be a name of the function that 13051 * initiated the async call. 13052 */ 13053 description?: string; 13054 /** 13055 * JavaScript function name. 13056 */ 13057 callFrames: CallFrame[]; 13058 /** 13059 * Asynchronous JavaScript stack trace that preceded this stack, if available. 13060 */ 13061 parent?: StackTrace; 13062 /** 13063 * Asynchronous JavaScript stack trace that preceded this stack, if available. 13064 */ 13065 parentId?: StackTraceId; 13066 } 13067 13068 /** 13069 * Unique identifier of current debugger. 13070 */ 13071 export type UniqueDebuggerId = string; 13072 13073 /** 13074 * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This 13075 * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. 13076 */ 13077 export interface StackTraceId { 13078 id: string; 13079 debuggerId?: UniqueDebuggerId; 13080 } 13081 13082 export interface AwaitPromiseRequest { 13083 /** 13084 * Identifier of the promise. 13085 */ 13086 promiseObjectId: RemoteObjectId; 13087 /** 13088 * Whether the result is expected to be a JSON object that should be sent by value. 13089 */ 13090 returnByValue?: boolean; 13091 /** 13092 * Whether preview should be generated for the result. 13093 */ 13094 generatePreview?: boolean; 13095 } 13096 13097 export interface AwaitPromiseResponse { 13098 /** 13099 * Promise result. Will contain rejected value if promise was rejected. 13100 */ 13101 result: RemoteObject; 13102 /** 13103 * Exception details if stack strace is available. 13104 */ 13105 exceptionDetails?: ExceptionDetails; 13106 } 13107 13108 export interface CallFunctionOnRequest { 13109 /** 13110 * Declaration of the function to call. 13111 */ 13112 functionDeclaration: string; 13113 /** 13114 * Identifier of the object to call function on. Either objectId or executionContextId should 13115 * be specified. 13116 */ 13117 objectId?: RemoteObjectId; 13118 /** 13119 * Call arguments. All call arguments must belong to the same JavaScript world as the target 13120 * object. 13121 */ 13122 arguments?: CallArgument[]; 13123 /** 13124 * In silent mode exceptions thrown during evaluation are not reported and do not pause 13125 * execution. Overrides `setPauseOnException` state. 13126 */ 13127 silent?: boolean; 13128 /** 13129 * Whether the result is expected to be a JSON object which should be sent by value. 13130 */ 13131 returnByValue?: boolean; 13132 /** 13133 * Whether preview should be generated for the result. 13134 */ 13135 generatePreview?: boolean; 13136 /** 13137 * Whether execution should be treated as initiated by user in the UI. 13138 */ 13139 userGesture?: boolean; 13140 /** 13141 * Whether execution should `await` for resulting value and return once awaited promise is 13142 * resolved. 13143 */ 13144 awaitPromise?: boolean; 13145 /** 13146 * Specifies execution context which global object will be used to call function on. Either 13147 * executionContextId or objectId should be specified. 13148 */ 13149 executionContextId?: ExecutionContextId; 13150 /** 13151 * Symbolic group name that can be used to release multiple objects. If objectGroup is not 13152 * specified and objectId is, objectGroup will be inherited from object. 13153 */ 13154 objectGroup?: string; 13155 } 13156 13157 export interface CallFunctionOnResponse { 13158 /** 13159 * Call result. 13160 */ 13161 result: RemoteObject; 13162 /** 13163 * Exception details. 13164 */ 13165 exceptionDetails?: ExceptionDetails; 13166 } 13167 13168 export interface CompileScriptRequest { 13169 /** 13170 * Expression to compile. 13171 */ 13172 expression: string; 13173 /** 13174 * Source url to be set for the script. 13175 */ 13176 sourceURL: string; 13177 /** 13178 * Specifies whether the compiled script should be persisted. 13179 */ 13180 persistScript: boolean; 13181 /** 13182 * Specifies in which execution context to perform script run. If the parameter is omitted the 13183 * evaluation will be performed in the context of the inspected page. 13184 */ 13185 executionContextId?: ExecutionContextId; 13186 } 13187 13188 export interface CompileScriptResponse { 13189 /** 13190 * Id of the script. 13191 */ 13192 scriptId?: ScriptId; 13193 /** 13194 * Exception details. 13195 */ 13196 exceptionDetails?: ExceptionDetails; 13197 } 13198 13199 export interface EvaluateRequest { 13200 /** 13201 * Expression to evaluate. 13202 */ 13203 expression: string; 13204 /** 13205 * Symbolic group name that can be used to release multiple objects. 13206 */ 13207 objectGroup?: string; 13208 /** 13209 * Determines whether Command Line API should be available during the evaluation. 13210 */ 13211 includeCommandLineAPI?: boolean; 13212 /** 13213 * In silent mode exceptions thrown during evaluation are not reported and do not pause 13214 * execution. Overrides `setPauseOnException` state. 13215 */ 13216 silent?: boolean; 13217 /** 13218 * Specifies in which execution context to perform evaluation. If the parameter is omitted the 13219 * evaluation will be performed in the context of the inspected page. 13220 */ 13221 contextId?: ExecutionContextId; 13222 /** 13223 * Whether the result is expected to be a JSON object that should be sent by value. 13224 */ 13225 returnByValue?: boolean; 13226 /** 13227 * Whether preview should be generated for the result. 13228 */ 13229 generatePreview?: boolean; 13230 /** 13231 * Whether execution should be treated as initiated by user in the UI. 13232 */ 13233 userGesture?: boolean; 13234 /** 13235 * Whether execution should `await` for resulting value and return once awaited promise is 13236 * resolved. 13237 */ 13238 awaitPromise?: boolean; 13239 /** 13240 * Whether to throw an exception if side effect cannot be ruled out during evaluation. 13241 * This implies `disableBreaks` below. 13242 */ 13243 throwOnSideEffect?: boolean; 13244 /** 13245 * Terminate execution after timing out (number of milliseconds). 13246 */ 13247 timeout?: TimeDelta; 13248 /** 13249 * Disable breakpoints during execution. 13250 */ 13251 disableBreaks?: boolean; 13252 /** 13253 * Setting this flag to true enables `let` re-declaration and top-level `await`. 13254 * Note that `let` variables can only be re-declared if they originate from 13255 * `replMode` themselves. 13256 */ 13257 replMode?: boolean; 13258 } 13259 13260 export interface EvaluateResponse { 13261 /** 13262 * Evaluation result. 13263 */ 13264 result: RemoteObject; 13265 /** 13266 * Exception details. 13267 */ 13268 exceptionDetails?: ExceptionDetails; 13269 } 13270 13271 export interface GetIsolateIdResponse { 13272 /** 13273 * The isolate id. 13274 */ 13275 id: string; 13276 } 13277 13278 export interface GetHeapUsageResponse { 13279 /** 13280 * Used heap size in bytes. 13281 */ 13282 usedSize: number; 13283 /** 13284 * Allocated heap size in bytes. 13285 */ 13286 totalSize: number; 13287 } 13288 13289 export interface GetPropertiesRequest { 13290 /** 13291 * Identifier of the object to return properties for. 13292 */ 13293 objectId: RemoteObjectId; 13294 /** 13295 * If true, returns properties belonging only to the element itself, not to its prototype 13296 * chain. 13297 */ 13298 ownProperties?: boolean; 13299 /** 13300 * If true, returns accessor properties (with getter/setter) only; internal properties are not 13301 * returned either. 13302 */ 13303 accessorPropertiesOnly?: boolean; 13304 /** 13305 * Whether preview should be generated for the results. 13306 */ 13307 generatePreview?: boolean; 13308 } 13309 13310 export interface GetPropertiesResponse { 13311 /** 13312 * Object properties. 13313 */ 13314 result: PropertyDescriptor[]; 13315 /** 13316 * Internal object properties (only of the element itself). 13317 */ 13318 internalProperties?: InternalPropertyDescriptor[]; 13319 /** 13320 * Object private properties. 13321 */ 13322 privateProperties?: PrivatePropertyDescriptor[]; 13323 /** 13324 * Exception details. 13325 */ 13326 exceptionDetails?: ExceptionDetails; 13327 } 13328 13329 export interface GlobalLexicalScopeNamesRequest { 13330 /** 13331 * Specifies in which execution context to lookup global scope variables. 13332 */ 13333 executionContextId?: ExecutionContextId; 13334 } 13335 13336 export interface GlobalLexicalScopeNamesResponse { 13337 names: string[]; 13338 } 13339 13340 export interface QueryObjectsRequest { 13341 /** 13342 * Identifier of the prototype to return objects for. 13343 */ 13344 prototypeObjectId: RemoteObjectId; 13345 /** 13346 * Symbolic group name that can be used to release the results. 13347 */ 13348 objectGroup?: string; 13349 } 13350 13351 export interface QueryObjectsResponse { 13352 /** 13353 * Array with objects. 13354 */ 13355 objects: RemoteObject; 13356 } 13357 13358 export interface ReleaseObjectRequest { 13359 /** 13360 * Identifier of the object to release. 13361 */ 13362 objectId: RemoteObjectId; 13363 } 13364 13365 export interface ReleaseObjectGroupRequest { 13366 /** 13367 * Symbolic object group name. 13368 */ 13369 objectGroup: string; 13370 } 13371 13372 export interface RunScriptRequest { 13373 /** 13374 * Id of the script to run. 13375 */ 13376 scriptId: ScriptId; 13377 /** 13378 * Specifies in which execution context to perform script run. If the parameter is omitted the 13379 * evaluation will be performed in the context of the inspected page. 13380 */ 13381 executionContextId?: ExecutionContextId; 13382 /** 13383 * Symbolic group name that can be used to release multiple objects. 13384 */ 13385 objectGroup?: string; 13386 /** 13387 * In silent mode exceptions thrown during evaluation are not reported and do not pause 13388 * execution. Overrides `setPauseOnException` state. 13389 */ 13390 silent?: boolean; 13391 /** 13392 * Determines whether Command Line API should be available during the evaluation. 13393 */ 13394 includeCommandLineAPI?: boolean; 13395 /** 13396 * Whether the result is expected to be a JSON object which should be sent by value. 13397 */ 13398 returnByValue?: boolean; 13399 /** 13400 * Whether preview should be generated for the result. 13401 */ 13402 generatePreview?: boolean; 13403 /** 13404 * Whether execution should `await` for resulting value and return once awaited promise is 13405 * resolved. 13406 */ 13407 awaitPromise?: boolean; 13408 } 13409 13410 export interface RunScriptResponse { 13411 /** 13412 * Run result. 13413 */ 13414 result: RemoteObject; 13415 /** 13416 * Exception details. 13417 */ 13418 exceptionDetails?: ExceptionDetails; 13419 } 13420 13421 export interface SetAsyncCallStackDepthRequest { 13422 /** 13423 * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async 13424 * call stacks (default). 13425 */ 13426 maxDepth: integer; 13427 } 13428 13429 export interface SetCustomObjectFormatterEnabledRequest { 13430 enabled: boolean; 13431 } 13432 13433 export interface SetMaxCallStackSizeToCaptureRequest { 13434 size: integer; 13435 } 13436 13437 export interface AddBindingRequest { 13438 name: string; 13439 executionContextId?: ExecutionContextId; 13440 } 13441 13442 export interface RemoveBindingRequest { 13443 name: string; 13444 } 13445 13446 /** 13447 * Notification is issued every time when binding is called. 13448 */ 13449 export interface BindingCalledEvent { 13450 name: string; 13451 payload: string; 13452 /** 13453 * Identifier of the context where the call was made. 13454 */ 13455 executionContextId: ExecutionContextId; 13456 } 13457 13458 export enum ConsoleAPICalledEventType { 13459 Log = 'log', 13460 Debug = 'debug', 13461 Info = 'info', 13462 Error = 'error', 13463 Warning = 'warning', 13464 Dir = 'dir', 13465 DirXML = 'dirxml', 13466 Table = 'table', 13467 Trace = 'trace', 13468 Clear = 'clear', 13469 StartGroup = 'startGroup', 13470 StartGroupCollapsed = 'startGroupCollapsed', 13471 EndGroup = 'endGroup', 13472 Assert = 'assert', 13473 Profile = 'profile', 13474 ProfileEnd = 'profileEnd', 13475 Count = 'count', 13476 TimeEnd = 'timeEnd', 13477 } 13478 13479 /** 13480 * Issued when console API was called. 13481 */ 13482 export interface ConsoleAPICalledEvent { 13483 /** 13484 * Type of the call. 13485 */ 13486 type: ConsoleAPICalledEventType; 13487 /** 13488 * Call arguments. 13489 */ 13490 args: RemoteObject[]; 13491 /** 13492 * Identifier of the context where the call was made. 13493 */ 13494 executionContextId: ExecutionContextId; 13495 /** 13496 * Call timestamp. 13497 */ 13498 timestamp: Timestamp; 13499 /** 13500 * Stack trace captured when the call was made. The async stack chain is automatically reported for 13501 * the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call 13502 * chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field. 13503 */ 13504 stackTrace?: StackTrace; 13505 /** 13506 * Console context descriptor for calls on non-default console context (not console.*): 13507 * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call 13508 * on named context. 13509 */ 13510 context?: string; 13511 } 13512 13513 /** 13514 * Issued when unhandled exception was revoked. 13515 */ 13516 export interface ExceptionRevokedEvent { 13517 /** 13518 * Reason describing why exception was revoked. 13519 */ 13520 reason: string; 13521 /** 13522 * The id of revoked exception, as reported in `exceptionThrown`. 13523 */ 13524 exceptionId: integer; 13525 } 13526 13527 /** 13528 * Issued when exception was thrown and unhandled. 13529 */ 13530 export interface ExceptionThrownEvent { 13531 /** 13532 * Timestamp of the exception. 13533 */ 13534 timestamp: Timestamp; 13535 exceptionDetails: ExceptionDetails; 13536 } 13537 13538 /** 13539 * Issued when new execution context is created. 13540 */ 13541 export interface ExecutionContextCreatedEvent { 13542 /** 13543 * A newly created execution context. 13544 */ 13545 context: ExecutionContextDescription; 13546 } 13547 13548 /** 13549 * Issued when execution context is destroyed. 13550 */ 13551 export interface ExecutionContextDestroyedEvent { 13552 /** 13553 * Id of the destroyed context 13554 */ 13555 executionContextId: ExecutionContextId; 13556 } 13557 13558 /** 13559 * Issued when object should be inspected (for example, as a result of inspect() command line API 13560 * call). 13561 */ 13562 export interface InspectRequestedEvent { 13563 object: RemoteObject; 13564 hints: any; 13565 } 13566 } 13567 13568 /** 13569 * This domain is deprecated. 13570 */ 13571 export namespace Schema { 13572 13573 /** 13574 * Description of the protocol domain. 13575 */ 13576 export interface Domain { 13577 /** 13578 * Domain name. 13579 */ 13580 name: string; 13581 /** 13582 * Domain version. 13583 */ 13584 version: string; 13585 } 13586 13587 export interface GetDomainsResponse { 13588 /** 13589 * List of supported domains. 13590 */ 13591 domains: Domain[]; 13592 } 13593 } 13594} 13595