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