-- Generated by gen_protocol.lua

---@meta
error('Cannot require a meta file')

---@class CDP._ClientContainer
---@field client CDP.Client

---Console message.
---@class CDP.Console.ConsoleMessage
---@field source "xml" | "javascript" | "network" | "console-api" | "storage" | "appcache" | "rendering" | "security" | "other" | "deprecation" | "worker" Message source.
---@field level "log" | "warning" | "error" | "debug" | "info" Message severity.
---@field text string Message text.
---@field url? string URL of the message origin.
---@field line? integer Line number in the resource that generated this message (1-based).
---@field column? integer Column number in the resource that generated this message (1-based).
---@class CDP.Console.messageAdded_event
---@field message CDP.Console.ConsoleMessage Console message that has been added.
---This domain is deprecated - use Runtime or Log instead.
---@deprecated
---@class CDP.Console: CDP._ClientContainer
---Does nothing.
---@field clearMessages fun(self: CDP._ClientContainer): CDP.Error?
---Disables console domain, prevents further console messages from being reported to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables console domain, sends the messages collected so far to the client by means of the
---`messageAdded` notification.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Issued when new console message is added.
---@field messageAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.Console.messageAdded_event)): CDP.Error?

---@alias CDP.Debugger.BreakpointId string Breakpoint identifier.
---@alias CDP.Debugger.CallFrameId string Call frame identifier.
---Location in the source code.
---@class CDP.Debugger.Location
---@field scriptId CDP.Runtime.ScriptId Script identifier as reported in the `Debugger.scriptParsed`.
---@field lineNumber integer Line number in the script (0-based).
---@field columnNumber? integer Column number in the script (0-based).
---Location in the source code.
---@class CDP.Debugger.ScriptPosition
---@field lineNumber integer
---@field columnNumber integer
---Location range within one script.
---@class CDP.Debugger.LocationRange
---@field scriptId CDP.Runtime.ScriptId
---@field start CDP.Debugger.ScriptPosition
---@field end CDP.Debugger.ScriptPosition
---JavaScript call frame. Array of call frames form the call stack.
---@class CDP.Debugger.CallFrame
---@field callFrameId CDP.Debugger.CallFrameId Call frame identifier. This identifier is only valid while the virtual machine is paused.
---@field functionName string Name of the JavaScript function called on this call frame.
---@field functionLocation? CDP.Debugger.Location Location in the source code.
---@field location CDP.Debugger.Location Location in the source code.
---@field url string JavaScript script name or url.<br>Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously<br>sent `Debugger.scriptParsed` event.
---@field scopeChain CDP.Debugger.Scope[] Scope chain for this call frame.
---@field this CDP.Runtime.RemoteObject `this` object for this call frame.
---@field returnValue? CDP.Runtime.RemoteObject The value being returned, if the function is at return point.
---@field canBeRestarted? boolean Valid only while the VM is paused and indicates whether this frame<br>can be restarted or not. Note that a `true` value here does not<br>guarantee that Debugger#restartFrame with this CallFrameId will be<br>successful, but it is very likely.
---Scope description.
---@class CDP.Debugger.Scope
---@field type "global" | "local" | "with" | "closure" | "catch" | "block" | "script" | "eval" | "module" | "wasm-expression-stack" Scope type.
---@field object CDP.Runtime.RemoteObject Object representing the scope. For `global` and `with` scopes it represents the actual<br>object; for the rest of the scopes, it is artificial transient object enumerating scope<br>variables as its properties.
---@field name? string
---@field startLocation? CDP.Debugger.Location Location in the source code where scope starts
---@field endLocation? CDP.Debugger.Location Location in the source code where scope ends
---Search match for resource.
---@class CDP.Debugger.SearchMatch
---@field lineNumber number Line number in resource content.
---@field lineContent string Line with match content.
---@class CDP.Debugger.BreakLocation
---@field scriptId CDP.Runtime.ScriptId Script identifier as reported in the `Debugger.scriptParsed`.
---@field lineNumber integer Line number in the script (0-based).
---@field columnNumber? integer Column number in the script (0-based).
---@field type? "debuggerStatement" | "call" | "return"
---@class CDP.Debugger.WasmDisassemblyChunk
---@field lines string[] The next chunk of disassembled lines.
---@field bytecodeOffsets integer[] The bytecode offsets describing the start of each line.
---@alias CDP.Debugger.ScriptLanguage "JavaScript" | "WebAssembly" Enum of possible script languages.
---Debug symbols available for a wasm script.
---@class CDP.Debugger.DebugSymbols
---@field type "None" | "SourceMap" | "EmbeddedDWARF" | "ExternalDWARF" Type of the debug symbols.
---@field externalURL? string URL of the external symbol source.
---@class CDP.Debugger.continueToLocation_parameters
---@field location CDP.Debugger.Location Location to continue to.
---@field targetCallFrames? "any" | "current"
---@class CDP.Debugger.enable_parameters
---@field maxScriptsCacheSize? number The maximum size in bytes of collected scripts (not referenced by other heap objects)<br>the debugger can hold. Puts no limit if parameter is omitted.
---@class CDP.Debugger.enable_return
---@field debuggerId CDP.Runtime.UniqueDebuggerId Unique identifier of the debugger.
---@class CDP.Debugger.evaluateOnCallFrame_parameters
---@field callFrameId CDP.Debugger.CallFrameId Call frame identifier to evaluate on.
---@field expression string Expression to evaluate.
---@field objectGroup? string String object group name to put result into (allows rapid releasing resulting object handles<br>using `releaseObjectGroup`).
---@field includeCommandLineAPI? boolean Specifies whether command line API should be available to the evaluated expression, defaults<br>to false.
---@field silent? boolean In silent mode exceptions thrown during evaluation are not reported and do not pause<br>execution. Overrides `setPauseOnException` state.
---@field returnByValue? boolean Whether the result is expected to be a JSON object that should be sent by value.
---@field generatePreview? boolean Whether preview should be generated for the result.
---@field throwOnSideEffect? boolean Whether to throw an exception if side effect cannot be ruled out during evaluation.
---@field timeout? CDP.Runtime.TimeDelta Terminate execution after timing out (number of milliseconds).
---@class CDP.Debugger.evaluateOnCallFrame_return
---@field result CDP.Runtime.RemoteObject Object wrapper for the evaluation result.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Debugger.getPossibleBreakpoints_parameters
---@field start CDP.Debugger.Location Start of range to search possible breakpoint locations in.
---@field end? CDP.Debugger.Location End of range to search possible breakpoint locations in (excluding). When not specified, end<br>of scripts is used as end of range.
---@field restrictToFunction? boolean Only consider locations which are in the same (non-nested) function as start.
---@class CDP.Debugger.getPossibleBreakpoints_return
---@field locations CDP.Debugger.BreakLocation[] List of the possible breakpoint locations.
---@class CDP.Debugger.getScriptSource_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script to get source for.
---@class CDP.Debugger.getScriptSource_return
---@field scriptSource string Script source (empty in case of Wasm bytecode).
---@field bytecode? string Wasm bytecode. (Encoded as a base64 string when passed over JSON)
---@class CDP.Debugger.disassembleWasmModule_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script to disassemble
---@class CDP.Debugger.disassembleWasmModule_return
---@field streamId? string For large modules, return a stream from which additional chunks of<br>disassembly can be read successively.
---@field totalNumberOfLines integer The total number of lines in the disassembly text.
---@field functionBodyOffsets integer[] The offsets of all function bodies, in the format [start1, end1,<br>start2, end2, ...] where all ends are exclusive.
---@field chunk CDP.Debugger.WasmDisassemblyChunk The first chunk of disassembly.
---@class CDP.Debugger.nextWasmDisassemblyChunk_parameters
---@field streamId string
---@class CDP.Debugger.nextWasmDisassemblyChunk_return
---@field chunk CDP.Debugger.WasmDisassemblyChunk The next chunk of disassembly.
---@class CDP.Debugger.getWasmBytecode_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the Wasm script to get source for.
---@class CDP.Debugger.getWasmBytecode_return
---@field bytecode string Script source. (Encoded as a base64 string when passed over JSON)
---@class CDP.Debugger.getStackTrace_parameters
---@field stackTraceId CDP.Runtime.StackTraceId
---@class CDP.Debugger.getStackTrace_return
---@field stackTrace CDP.Runtime.StackTrace
---@class CDP.Debugger.pauseOnAsyncCall_parameters
---@field parentStackTraceId CDP.Runtime.StackTraceId Debugger will pause when async call with given stack trace is started.
---@class CDP.Debugger.removeBreakpoint_parameters
---@field breakpointId CDP.Debugger.BreakpointId
---@class CDP.Debugger.restartFrame_parameters
---@field callFrameId CDP.Debugger.CallFrameId Call frame identifier to evaluate on.
---@field mode? "StepInto" The `mode` parameter must be present and set to 'StepInto', otherwise<br>`restartFrame` will error out.
---@class CDP.Debugger.restartFrame_return
---@field callFrames CDP.Debugger.CallFrame[] New stack trace.
---@field asyncStackTrace? CDP.Runtime.StackTrace Async stack trace, if any.
---@field asyncStackTraceId? CDP.Runtime.StackTraceId Async stack trace, if any.
---@class CDP.Debugger.resume_parameters
---@field terminateOnResume? boolean Set to true to terminate execution upon resuming execution. In contrast<br>to Runtime.terminateExecution, this will allows to execute further<br>JavaScript (i.e. via evaluation) until execution of the paused code<br>is actually resumed, at which point termination is triggered.<br>If execution is currently not paused, this parameter has no effect.
---@class CDP.Debugger.searchInContent_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script to search in.
---@field query string String to search for.
---@field caseSensitive? boolean If true, search is case sensitive.
---@field isRegex? boolean If true, treats string parameter as regex.
---@class CDP.Debugger.searchInContent_return
---@field result CDP.Debugger.SearchMatch[] List of search matches.
---@class CDP.Debugger.setAsyncCallStackDepth_parameters
---@field maxDepth integer Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async<br>call stacks (default).
---@class CDP.Debugger.setBlackboxPatterns_parameters
---@field patterns string[] Array of regexps that will be used to check script url for blackbox state.
---@class CDP.Debugger.setBlackboxedRanges_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script.
---@field positions CDP.Debugger.ScriptPosition[]
---@class CDP.Debugger.setBreakpoint_parameters
---@field location CDP.Debugger.Location Location to set breakpoint in.
---@field condition? string Expression to use as a breakpoint condition. When specified, debugger will only stop on the<br>breakpoint if this expression evaluates to true.
---@class CDP.Debugger.setBreakpoint_return
---@field breakpointId CDP.Debugger.BreakpointId Id of the created breakpoint for further reference.
---@field actualLocation CDP.Debugger.Location Location this breakpoint resolved into.
---@class CDP.Debugger.setInstrumentationBreakpoint_parameters
---@field instrumentation "beforeScriptExecution" | "beforeScriptWithSourceMapExecution" Instrumentation name.
---@class CDP.Debugger.setInstrumentationBreakpoint_return
---@field breakpointId CDP.Debugger.BreakpointId Id of the created breakpoint for further reference.
---@class CDP.Debugger.setBreakpointByUrl_parameters
---@field lineNumber integer Line number to set breakpoint at.
---@field url? string URL of the resources to set breakpoint on.
---@field urlRegex? string Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or<br>`urlRegex` must be specified.
---@field scriptHash? string Script hash of the resources to set breakpoint on.
---@field columnNumber? integer Offset in the line to set breakpoint at.
---@field condition? string Expression to use as a breakpoint condition. When specified, debugger will only stop on the<br>breakpoint if this expression evaluates to true.
---@class CDP.Debugger.setBreakpointByUrl_return
---@field breakpointId CDP.Debugger.BreakpointId Id of the created breakpoint for further reference.
---@field locations CDP.Debugger.Location[] List of the locations this breakpoint resolved into upon addition.
---@class CDP.Debugger.setBreakpointOnFunctionCall_parameters
---@field objectId CDP.Runtime.RemoteObjectId Function object id.
---@field condition? string Expression to use as a breakpoint condition. When specified, debugger will<br>stop on the breakpoint if this expression evaluates to true.
---@class CDP.Debugger.setBreakpointOnFunctionCall_return
---@field breakpointId CDP.Debugger.BreakpointId Id of the created breakpoint for further reference.
---@class CDP.Debugger.setBreakpointsActive_parameters
---@field active boolean New value for breakpoints active state.
---@class CDP.Debugger.setPauseOnExceptions_parameters
---@field state "none" | "caught" | "uncaught" | "all" Pause on exceptions mode.
---@class CDP.Debugger.setReturnValue_parameters
---@field newValue CDP.Runtime.CallArgument New return value.
---@class CDP.Debugger.setScriptSource_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script to edit.
---@field scriptSource string New content of the script.
---@field dryRun? boolean If true the change will not actually be applied. Dry run may be used to get result<br>description without actually modifying the code.
---@field allowTopFrameEditing? boolean If true, then `scriptSource` is allowed to change the function on top of the stack<br>as long as the top-most stack frame is the only activation of that function.
---@class CDP.Debugger.setScriptSource_return
---@field callFrames? CDP.Debugger.CallFrame[] New stack trace in case editing has happened while VM was stopped.
---@field stackChanged? boolean Whether current call stack  was modified after applying the changes.
---@field asyncStackTrace? CDP.Runtime.StackTrace Async stack trace, if any.
---@field asyncStackTraceId? CDP.Runtime.StackTraceId Async stack trace, if any.
---@field status "Ok" | "CompileError" | "BlockedByActiveGenerator" | "BlockedByActiveFunction" | "BlockedByTopLevelEsModuleChange" Whether the operation was successful or not. Only `Ok` denotes a<br>successful live edit while the other enum variants denote why<br>the live edit failed.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details if any. Only present when `status` is `CompileError`.
---@class CDP.Debugger.setSkipAllPauses_parameters
---@field skip boolean New value for skip pauses state.
---@class CDP.Debugger.setVariableValue_parameters
---@field scopeNumber integer 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'<br>scope types are allowed. Other scopes could be manipulated manually.
---@field variableName string Variable name.
---@field newValue CDP.Runtime.CallArgument New variable value.
---@field callFrameId CDP.Debugger.CallFrameId Id of callframe that holds variable.
---@class CDP.Debugger.stepInto_parameters
---@field breakOnAsyncCall? boolean Debugger will pause on the execution of the first async task which was scheduled<br>before next pause.
---@field skipList? CDP.Debugger.LocationRange[] The skipList specifies location ranges that should be skipped on step into.
---@class CDP.Debugger.stepOver_parameters
---@field skipList? CDP.Debugger.LocationRange[] The skipList specifies location ranges that should be skipped on step over.
---@class CDP.Debugger.breakpointResolved_event
---@field breakpointId CDP.Debugger.BreakpointId Breakpoint unique identifier.
---@field location CDP.Debugger.Location Actual breakpoint location.
---@class CDP.Debugger.paused_event
---@field callFrames CDP.Debugger.CallFrame[] Call stack the virtual machine stopped on.
---@field reason "ambiguous" | "assert" | "CSPViolation" | "debugCommand" | "DOM" | "EventListener" | "exception" | "instrumentation" | "OOM" | "other" | "promiseRejection" | "XHR" | "step" Pause reason.
---@field data? table Object containing break-specific auxiliary properties.
---@field hitBreakpoints? string[] Hit breakpoints IDs
---@field asyncStackTrace? CDP.Runtime.StackTrace Async stack trace, if any.
---@field asyncStackTraceId? CDP.Runtime.StackTraceId Async stack trace, if any.
---@field asyncCallStackTraceId? CDP.Runtime.StackTraceId Never present, will be removed.
---@class CDP.Debugger.scriptFailedToParse_event
---@field scriptId CDP.Runtime.ScriptId Identifier of the script parsed.
---@field url string URL or name of the script parsed (if any).
---@field startLine integer Line offset of the script within the resource with given URL (for script tags).
---@field startColumn integer Column offset of the script within the resource with given URL.
---@field endLine integer Last line of the script.
---@field endColumn integer Length of the last line of the script.
---@field executionContextId CDP.Runtime.ExecutionContextId Specifies script creation context.
---@field hash string Content hash of the script, SHA-256.
---@field executionContextAuxData? table Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
---@field sourceMapURL? string URL of source map associated with script (if any).
---@field hasSourceURL? boolean True, if this script has sourceURL.
---@field isModule? boolean True, if this script is ES6 module.
---@field length? integer This script length.
---@field stackTrace? CDP.Runtime.StackTrace JavaScript top stack frame of where the script parsed event was triggered if available.
---@field codeOffset? integer If the scriptLanguage is WebAssembly, the code section offset in the module.
---@field scriptLanguage? CDP.Debugger.ScriptLanguage The language of the script.
---@field embedderName? string The name the embedder supplied for this script.
---@class CDP.Debugger.scriptParsed_event
---@field scriptId CDP.Runtime.ScriptId Identifier of the script parsed.
---@field url string URL or name of the script parsed (if any).
---@field startLine integer Line offset of the script within the resource with given URL (for script tags).
---@field startColumn integer Column offset of the script within the resource with given URL.
---@field endLine integer Last line of the script.
---@field endColumn integer Length of the last line of the script.
---@field executionContextId CDP.Runtime.ExecutionContextId Specifies script creation context.
---@field hash string Content hash of the script, SHA-256.
---@field executionContextAuxData? table Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
---@field isLiveEdit? boolean True, if this script is generated as a result of the live edit operation.
---@field sourceMapURL? string URL of source map associated with script (if any).
---@field hasSourceURL? boolean True, if this script has sourceURL.
---@field isModule? boolean True, if this script is ES6 module.
---@field length? integer This script length.
---@field stackTrace? CDP.Runtime.StackTrace JavaScript top stack frame of where the script parsed event was triggered if available.
---@field codeOffset? integer If the scriptLanguage is WebAssembly, the code section offset in the module.
---@field scriptLanguage? CDP.Debugger.ScriptLanguage The language of the script.
---@field debugSymbols? CDP.Debugger.DebugSymbols If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
---@field embedderName? string The name the embedder supplied for this script.
---Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
---breakpoints, stepping through execution, exploring stack traces, etc.
---@class CDP.Debugger: CDP._ClientContainer
---Continues execution until specific location is reached.
---@field continueToLocation fun(self: CDP._ClientContainer, params: CDP.Debugger.continueToLocation_parameters): CDP.Error?
---Disables debugger for given page.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables debugger for the given page. Clients should not assume that the debugging has been
---enabled until the result for this command is received.
---@field enable fun(self: CDP._ClientContainer, params: CDP.Debugger.enable_parameters): CDP.Error?, CDP.Debugger.enable_return?
---Evaluates expression on a given call frame.
---@field evaluateOnCallFrame fun(self: CDP._ClientContainer, params: CDP.Debugger.evaluateOnCallFrame_parameters): CDP.Error?, CDP.Debugger.evaluateOnCallFrame_return?
---Returns possible locations for breakpoint. scriptId in start and end range locations should be
---the same.
---@field getPossibleBreakpoints fun(self: CDP._ClientContainer, params: CDP.Debugger.getPossibleBreakpoints_parameters): CDP.Error?, CDP.Debugger.getPossibleBreakpoints_return?
---Returns source for the script with given id.
---@field getScriptSource fun(self: CDP._ClientContainer, params: CDP.Debugger.getScriptSource_parameters): CDP.Error?, CDP.Debugger.getScriptSource_return?
---@field disassembleWasmModule fun(self: CDP._ClientContainer, params: CDP.Debugger.disassembleWasmModule_parameters): CDP.Error?, CDP.Debugger.disassembleWasmModule_return?
---Disassemble the next chunk of lines for the module corresponding to the
---stream. If disassembly is complete, this API will invalidate the streamId
---and return an empty chunk. Any subsequent calls for the now invalid stream
---will return errors.
---@field nextWasmDisassemblyChunk fun(self: CDP._ClientContainer, params: CDP.Debugger.nextWasmDisassemblyChunk_parameters): CDP.Error?, CDP.Debugger.nextWasmDisassemblyChunk_return?
---This command is deprecated. Use getScriptSource instead.
---@field getWasmBytecode fun(self: CDP._ClientContainer, params: CDP.Debugger.getWasmBytecode_parameters): CDP.Error?, CDP.Debugger.getWasmBytecode_return?
---Returns stack trace with given `stackTraceId`.
---@field getStackTrace fun(self: CDP._ClientContainer, params: CDP.Debugger.getStackTrace_parameters): CDP.Error?, CDP.Debugger.getStackTrace_return?
---Stops on the next JavaScript statement.
---@field pause fun(self: CDP._ClientContainer): CDP.Error?
---@field pauseOnAsyncCall fun(self: CDP._ClientContainer, params: CDP.Debugger.pauseOnAsyncCall_parameters): CDP.Error?
---Removes JavaScript breakpoint.
---@field removeBreakpoint fun(self: CDP._ClientContainer, params: CDP.Debugger.removeBreakpoint_parameters): CDP.Error?
---Restarts particular call frame from the beginning. The old, deprecated
---behavior of `restartFrame` is to stay paused and allow further CDP commands
---after a restart was scheduled. This can cause problems with restarting, so
---we now continue execution immediatly after it has been scheduled until we
---reach the beginning of the restarted frame.
---
---To stay back-wards compatible, `restartFrame` now expects a `mode`
---parameter to be present. If the `mode` parameter is missing, `restartFrame`
---errors out.
---
---The various return values are deprecated and `callFrames` is always empty.
---Use the call frames from the `Debugger#paused` events instead, that fires
---once V8 pauses at the beginning of the restarted function.
---@field restartFrame fun(self: CDP._ClientContainer, params: CDP.Debugger.restartFrame_parameters): CDP.Error?, CDP.Debugger.restartFrame_return?
---Resumes JavaScript execution.
---@field resume fun(self: CDP._ClientContainer, params: CDP.Debugger.resume_parameters): CDP.Error?
---Searches for given string in script content.
---@field searchInContent fun(self: CDP._ClientContainer, params: CDP.Debugger.searchInContent_parameters): CDP.Error?, CDP.Debugger.searchInContent_return?
---Enables or disables async call stacks tracking.
---@field setAsyncCallStackDepth fun(self: CDP._ClientContainer, params: CDP.Debugger.setAsyncCallStackDepth_parameters): CDP.Error?
---Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
---scripts with url matching one of the patterns. VM will try to leave blackboxed script by
---performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
---@field setBlackboxPatterns fun(self: CDP._ClientContainer, params: CDP.Debugger.setBlackboxPatterns_parameters): CDP.Error?
---Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
---scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
---Positions array contains positions where blackbox state is changed. First interval isn't
---blackboxed. Array should be sorted.
---@field setBlackboxedRanges fun(self: CDP._ClientContainer, params: CDP.Debugger.setBlackboxedRanges_parameters): CDP.Error?
---Sets JavaScript breakpoint at a given location.
---@field setBreakpoint fun(self: CDP._ClientContainer, params: CDP.Debugger.setBreakpoint_parameters): CDP.Error?, CDP.Debugger.setBreakpoint_return?
---Sets instrumentation breakpoint.
---@field setInstrumentationBreakpoint fun(self: CDP._ClientContainer, params: CDP.Debugger.setInstrumentationBreakpoint_parameters): CDP.Error?, CDP.Debugger.setInstrumentationBreakpoint_return?
---Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
---command is issued, all existing parsed scripts will have breakpoints resolved and returned in
---`locations` property. Further matching script parsing will result in subsequent
---`breakpointResolved` events issued. This logical breakpoint will survive page reloads.
---@field setBreakpointByUrl fun(self: CDP._ClientContainer, params: CDP.Debugger.setBreakpointByUrl_parameters): CDP.Error?, CDP.Debugger.setBreakpointByUrl_return?
---Sets JavaScript breakpoint before each call to the given function.
---If another function was created from the same source as a given one,
---calling it will also trigger the breakpoint.
---@field setBreakpointOnFunctionCall fun(self: CDP._ClientContainer, params: CDP.Debugger.setBreakpointOnFunctionCall_parameters): CDP.Error?, CDP.Debugger.setBreakpointOnFunctionCall_return?
---Activates / deactivates all breakpoints on the page.
---@field setBreakpointsActive fun(self: CDP._ClientContainer, params: CDP.Debugger.setBreakpointsActive_parameters): CDP.Error?
---Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
---or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
---@field setPauseOnExceptions fun(self: CDP._ClientContainer, params: CDP.Debugger.setPauseOnExceptions_parameters): CDP.Error?
---Changes return value in top frame. Available only at return break position.
---@field setReturnValue fun(self: CDP._ClientContainer, params: CDP.Debugger.setReturnValue_parameters): CDP.Error?
---Edits JavaScript source live.
---
---In general, functions that are currently on the stack can not be edited with
---a single exception: If the edited function is the top-most stack frame and
---that is the only activation of that function on the stack. In this case
---the live edit will be successful and a `Debugger.restartFrame` for the
---top-most function is automatically triggered.
---@field setScriptSource fun(self: CDP._ClientContainer, params: CDP.Debugger.setScriptSource_parameters): CDP.Error?, CDP.Debugger.setScriptSource_return?
---Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
---@field setSkipAllPauses fun(self: CDP._ClientContainer, params: CDP.Debugger.setSkipAllPauses_parameters): CDP.Error?
---Changes value of variable in a callframe. Object-based scopes are not supported and must be
---mutated manually.
---@field setVariableValue fun(self: CDP._ClientContainer, params: CDP.Debugger.setVariableValue_parameters): CDP.Error?
---Steps into the function call.
---@field stepInto fun(self: CDP._ClientContainer, params: CDP.Debugger.stepInto_parameters): CDP.Error?
---Steps out of the function call.
---@field stepOut fun(self: CDP._ClientContainer): CDP.Error?
---Steps over the statement.
---@field stepOver fun(self: CDP._ClientContainer, params: CDP.Debugger.stepOver_parameters): CDP.Error?
---Fired when breakpoint is resolved to an actual script and location.
---@field breakpointResolved fun(self: CDP._ClientContainer, cb: fun(event: CDP.Debugger.breakpointResolved_event)): CDP.Error?
---Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
---@field paused fun(self: CDP._ClientContainer, cb: fun(event: CDP.Debugger.paused_event)): CDP.Error?
---Fired when the virtual machine resumed execution.
---@field resumed fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when virtual machine fails to parse the script.
---@field scriptFailedToParse fun(self: CDP._ClientContainer, cb: fun(event: CDP.Debugger.scriptFailedToParse_event)): CDP.Error?
---Fired when virtual machine parses script. This event is also fired for all known and uncollected
---scripts upon enabling debugger.
---@field scriptParsed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Debugger.scriptParsed_event)): CDP.Error?

---@alias CDP.HeapProfiler.HeapSnapshotObjectId string Heap snapshot object id.
---Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
---@class CDP.HeapProfiler.SamplingHeapProfileNode
---@field callFrame CDP.Runtime.CallFrame Function location.
---@field selfSize number Allocations size in bytes for the node excluding children.
---@field id integer Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
---@field children CDP.HeapProfiler.SamplingHeapProfileNode[] Child nodes.
---A single sample from a sampling profile.
---@class CDP.HeapProfiler.SamplingHeapProfileSample
---@field size number Allocation size in bytes attributed to the sample.
---@field nodeId integer Id of the corresponding profile tree node.
---@field ordinal number Time-ordered sample ordinal number. It is unique across all profiles retrieved<br>between startSampling and stopSampling.
---Sampling profile.
---@class CDP.HeapProfiler.SamplingHeapProfile
---@field head CDP.HeapProfiler.SamplingHeapProfileNode
---@field samples CDP.HeapProfiler.SamplingHeapProfileSample[]
---@class CDP.HeapProfiler.addInspectedHeapObject_parameters
---@field heapObjectId CDP.HeapProfiler.HeapSnapshotObjectId Heap snapshot object id to be accessible by means of $x command line API.
---@class CDP.HeapProfiler.getHeapObjectId_parameters
---@field objectId CDP.Runtime.RemoteObjectId Identifier of the object to get heap object id for.
---@class CDP.HeapProfiler.getHeapObjectId_return
---@field heapSnapshotObjectId CDP.HeapProfiler.HeapSnapshotObjectId Id of the heap snapshot object corresponding to the passed remote object id.
---@class CDP.HeapProfiler.getObjectByHeapObjectId_parameters
---@field objectId CDP.HeapProfiler.HeapSnapshotObjectId
---@field objectGroup? string Symbolic group name that can be used to release multiple objects.
---@class CDP.HeapProfiler.getObjectByHeapObjectId_return
---@field result CDP.Runtime.RemoteObject Evaluation result.
---@class CDP.HeapProfiler.getSamplingProfile_return
---@field profile CDP.HeapProfiler.SamplingHeapProfile Return the sampling profile being collected.
---@class CDP.HeapProfiler.startSampling_parameters
---@field samplingInterval? number Average sample interval in bytes. Poisson distribution is used for the intervals. The<br>default value is 32768 bytes.
---@field includeObjectsCollectedByMajorGC? boolean By default, the sampling heap profiler reports only objects which are<br>still alive when the profile is returned via getSamplingProfile or<br>stopSampling, which is useful for determining what functions contribute<br>the most to steady-state memory usage. This flag instructs the sampling<br>heap profiler to also include information about objects discarded by<br>major GC, which will show which functions cause large temporary memory<br>usage or long GC pauses.
---@field includeObjectsCollectedByMinorGC? boolean By default, the sampling heap profiler reports only objects which are<br>still alive when the profile is returned via getSamplingProfile or<br>stopSampling, which is useful for determining what functions contribute<br>the most to steady-state memory usage. This flag instructs the sampling<br>heap profiler to also include information about objects discarded by<br>minor GC, which is useful when tuning a latency-sensitive application<br>for minimal GC activity.
---@class CDP.HeapProfiler.startTrackingHeapObjects_parameters
---@field trackAllocations? boolean
---@class CDP.HeapProfiler.stopSampling_return
---@field profile CDP.HeapProfiler.SamplingHeapProfile Recorded sampling heap profile.
---@class CDP.HeapProfiler.stopTrackingHeapObjects_parameters
---@field reportProgress? boolean If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken<br>when the tracking is stopped.
---@field treatGlobalObjectsAsRoots? boolean Deprecated in favor of `exposeInternals`.
---@field captureNumericValue? boolean If true, numerical values are included in the snapshot
---@field exposeInternals? boolean If true, exposes internals of the snapshot.
---@class CDP.HeapProfiler.takeHeapSnapshot_parameters
---@field reportProgress? boolean If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
---@field treatGlobalObjectsAsRoots? boolean If true, a raw snapshot without artificial roots will be generated.<br>Deprecated in favor of `exposeInternals`.
---@field captureNumericValue? boolean If true, numerical values are included in the snapshot
---@field exposeInternals? boolean If true, exposes internals of the snapshot.
---@class CDP.HeapProfiler.addHeapSnapshotChunk_event
---@field chunk string
---@class CDP.HeapProfiler.heapStatsUpdate_event
---@field statsUpdate integer[] An array of triplets. Each triplet describes a fragment. The first integer is the fragment<br>index, the second integer is a total count of objects for the fragment, the third integer is<br>a total size of the objects for the fragment.
---@class CDP.HeapProfiler.lastSeenObjectId_event
---@field lastSeenObjectId integer
---@field timestamp number
---@class CDP.HeapProfiler.reportHeapSnapshotProgress_event
---@field done integer
---@field total integer
---@field finished? boolean
---@class CDP.HeapProfiler: CDP._ClientContainer
---Enables console to refer to the node with given id via $x (see Command Line API for more details
---$x functions).
---@field addInspectedHeapObject fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.addInspectedHeapObject_parameters): CDP.Error?
---@field collectGarbage fun(self: CDP._ClientContainer): CDP.Error?
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field getHeapObjectId fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.getHeapObjectId_parameters): CDP.Error?, CDP.HeapProfiler.getHeapObjectId_return?
---@field getObjectByHeapObjectId fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.getObjectByHeapObjectId_parameters): CDP.Error?, CDP.HeapProfiler.getObjectByHeapObjectId_return?
---@field getSamplingProfile fun(self: CDP._ClientContainer): CDP.Error?, CDP.HeapProfiler.getSamplingProfile_return?
---@field startSampling fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.startSampling_parameters): CDP.Error?
---@field startTrackingHeapObjects fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.startTrackingHeapObjects_parameters): CDP.Error?
---@field stopSampling fun(self: CDP._ClientContainer): CDP.Error?, CDP.HeapProfiler.stopSampling_return?
---@field stopTrackingHeapObjects fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.stopTrackingHeapObjects_parameters): CDP.Error?
---@field takeHeapSnapshot fun(self: CDP._ClientContainer, params: CDP.HeapProfiler.takeHeapSnapshot_parameters): CDP.Error?
---@field addHeapSnapshotChunk fun(self: CDP._ClientContainer, cb: fun(event: CDP.HeapProfiler.addHeapSnapshotChunk_event)): CDP.Error?
---If heap objects tracking has been started then backend may send update for one or more fragments
---@field heapStatsUpdate fun(self: CDP._ClientContainer, cb: fun(event: CDP.HeapProfiler.heapStatsUpdate_event)): CDP.Error?
---If heap objects tracking has been started then backend regularly sends a current value for last
---seen object id and corresponding timestamp. If the were changes in the heap since last event
---then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
---@field lastSeenObjectId fun(self: CDP._ClientContainer, cb: fun(event: CDP.HeapProfiler.lastSeenObjectId_event)): CDP.Error?
---@field reportHeapSnapshotProgress fun(self: CDP._ClientContainer, cb: fun(event: CDP.HeapProfiler.reportHeapSnapshotProgress_event)): CDP.Error?
---@field resetProfiles fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?

---Profile node. Holds callsite information, execution statistics and child nodes.
---@class CDP.Profiler.ProfileNode
---@field id integer Unique id of the node.
---@field callFrame CDP.Runtime.CallFrame Function location.
---@field hitCount? integer Number of samples where this node was on top of the call stack.
---@field children? integer[] Child node ids.
---@field deoptReason? string The reason of being not optimized. The function may be deoptimized or marked as don't<br>optimize.
---@field positionTicks? CDP.Profiler.PositionTickInfo[] An array of source position ticks.
---Profile.
---@class CDP.Profiler.Profile
---@field nodes CDP.Profiler.ProfileNode[] The list of profile nodes. First item is the root node.
---@field startTime number Profiling start timestamp in microseconds.
---@field endTime number Profiling end timestamp in microseconds.
---@field samples? integer[] Ids of samples top nodes.
---@field timeDeltas? integer[] Time intervals between adjacent samples in microseconds. The first delta is relative to the<br>profile startTime.
---Specifies a number of samples attributed to a certain source position.
---@class CDP.Profiler.PositionTickInfo
---@field line integer Source line number (1-based).
---@field ticks integer Number of samples attributed to the source line.
---Coverage data for a source range.
---@class CDP.Profiler.CoverageRange
---@field startOffset integer JavaScript script source offset for the range start.
---@field endOffset integer JavaScript script source offset for the range end.
---@field count integer Collected execution count of the source range.
---Coverage data for a JavaScript function.
---@class CDP.Profiler.FunctionCoverage
---@field functionName string JavaScript function name.
---@field ranges CDP.Profiler.CoverageRange[] Source ranges inside the function with coverage data.
---@field isBlockCoverage boolean Whether coverage data for this function has block granularity.
---Coverage data for a JavaScript script.
---@class CDP.Profiler.ScriptCoverage
---@field scriptId CDP.Runtime.ScriptId JavaScript script id.
---@field url string JavaScript script name or url.
---@field functions CDP.Profiler.FunctionCoverage[] Functions contained in the script that has coverage data.
---@class CDP.Profiler.getBestEffortCoverage_return
---@field result CDP.Profiler.ScriptCoverage[] Coverage data for the current isolate.
---@class CDP.Profiler.setSamplingInterval_parameters
---@field interval integer New sampling interval in microseconds.
---@class CDP.Profiler.startPreciseCoverage_parameters
---@field callCount? boolean Collect accurate call counts beyond simple 'covered' or 'not covered'.
---@field detailed? boolean Collect block-based coverage.
---@field allowTriggeredUpdates? boolean Allow the backend to send updates on its own initiative
---@class CDP.Profiler.startPreciseCoverage_return
---@field timestamp number Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
---@class CDP.Profiler.stop_return
---@field profile CDP.Profiler.Profile Recorded profile.
---@class CDP.Profiler.takePreciseCoverage_return
---@field result CDP.Profiler.ScriptCoverage[] Coverage data for the current isolate.
---@field timestamp number Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
---@class CDP.Profiler.consoleProfileFinished_event
---@field id string
---@field location CDP.Debugger.Location Location of console.profileEnd().
---@field profile CDP.Profiler.Profile
---@field title? string Profile title passed as an argument to console.profile().
---@class CDP.Profiler.consoleProfileStarted_event
---@field id string
---@field location CDP.Debugger.Location Location of console.profile().
---@field title? string Profile title passed as an argument to console.profile().
---@class CDP.Profiler.preciseCoverageDeltaUpdate_event
---@field timestamp number Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
---@field occasion string Identifier for distinguishing coverage events.
---@field result CDP.Profiler.ScriptCoverage[] Coverage data for the current isolate.
---@class CDP.Profiler: CDP._ClientContainer
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Collect coverage data for the current isolate. The coverage data may be incomplete due to
---garbage collection.
---@field getBestEffortCoverage fun(self: CDP._ClientContainer): CDP.Error?, CDP.Profiler.getBestEffortCoverage_return?
---Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
---@field setSamplingInterval fun(self: CDP._ClientContainer, params: CDP.Profiler.setSamplingInterval_parameters): CDP.Error?
---@field start fun(self: CDP._ClientContainer): CDP.Error?
---Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
---coverage may be incomplete. Enabling prevents running optimized code and resets execution
---counters.
---@field startPreciseCoverage fun(self: CDP._ClientContainer, params: CDP.Profiler.startPreciseCoverage_parameters): CDP.Error?, CDP.Profiler.startPreciseCoverage_return?
---@field stop fun(self: CDP._ClientContainer): CDP.Error?, CDP.Profiler.stop_return?
---Disable precise code coverage. Disabling releases unnecessary execution count records and allows
---executing optimized code.
---@field stopPreciseCoverage fun(self: CDP._ClientContainer): CDP.Error?
---Collect coverage data for the current isolate, and resets execution counters. Precise code
---coverage needs to have started.
---@field takePreciseCoverage fun(self: CDP._ClientContainer): CDP.Error?, CDP.Profiler.takePreciseCoverage_return?
---@field consoleProfileFinished fun(self: CDP._ClientContainer, cb: fun(event: CDP.Profiler.consoleProfileFinished_event)): CDP.Error?
---Sent when new profile recording is started using console.profile() call.
---@field consoleProfileStarted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Profiler.consoleProfileStarted_event)): CDP.Error?
---Reports coverage delta since the last poll (either from an event like this, or from
---`takePreciseCoverage` for the current isolate. May only be sent if precise code
---coverage has been started. This event can be trigged by the embedder to, for example,
---trigger collection of coverage data immediately at a certain point in time.
---@field preciseCoverageDeltaUpdate fun(self: CDP._ClientContainer, cb: fun(event: CDP.Profiler.preciseCoverageDeltaUpdate_event)): CDP.Error?

---@alias CDP.Runtime.ScriptId string Unique script identifier.
---Represents options for serialization. Overrides `generatePreview`, `returnByValue` and
---`generateWebDriverValue`.
---@class CDP.Runtime.SerializationOptions
---@field serialization "deep" | "json" | "idOnly"
---@field maxDepth? integer Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
---@field additionalParameters? table Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM<br>serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`.<br>Values can be only of type string or integer.
---Represents deep serialized value.
---@class CDP.Runtime.DeepSerializedValue
---@field type "undefined" | "null" | "string" | "number" | "boolean" | "bigint" | "regexp" | "date" | "symbol" | "array" | "object" | "function" | "map" | "set" | "weakmap" | "weakset" | "error" | "proxy" | "promise" | "typedarray" | "arraybuffer" | "node" | "window"
---@field value? any
---@field objectId? string
---@field weakLocalObjectReference? integer Set if value reference met more then once during serialization. In such<br>case, value is provided only to one of the serialized values. Unique<br>per value in the scope of one CDP call.
---@alias CDP.Runtime.RemoteObjectId string Unique object identifier.
---@alias CDP.Runtime.UnserializableValue string Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,<br>`-Infinity`, and bigint literals.
---Mirror object referencing original JavaScript object.
---@class CDP.Runtime.RemoteObject
---@field type "object" | "function" | "undefined" | "string" | "number" | "boolean" | "symbol" | "bigint" Object type.
---@field subtype? "array" | "null" | "node" | "regexp" | "date" | "map" | "set" | "weakmap" | "weakset" | "iterator" | "generator" | "error" | "proxy" | "promise" | "typedarray" | "arraybuffer" | "dataview" | "webassemblymemory" | "wasmvalue" Object subtype hint. Specified for `object` type values only.<br>NOTE: If you change anything here, make sure to also update<br>`subtype` in `ObjectPreview` and `PropertyPreview` below.
---@field className? string Object class (constructor) name. Specified for `object` type values only.
---@field value? any Remote object value in case of primitive values or JSON values (if it was requested).
---@field unserializableValue? CDP.Runtime.UnserializableValue Primitive value which can not be JSON-stringified does not have `value`, but gets this<br>property.
---@field description? string String representation of the object.
---@field webDriverValue? CDP.Runtime.DeepSerializedValue Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value.
---@field deepSerializedValue? CDP.Runtime.DeepSerializedValue Deep serialized value.
---@field objectId? CDP.Runtime.RemoteObjectId Unique object identifier (for non-primitive values).
---@field preview? CDP.Runtime.ObjectPreview Preview containing abbreviated property values. Specified for `object` type values only.
---@field customPreview? CDP.Runtime.CustomPreview
---@class CDP.Runtime.CustomPreview
---@field header string The JSON-stringified result of formatter.header(object, config) call.<br>It contains json ML array that represents RemoteObject.
---@field bodyGetterId? CDP.Runtime.RemoteObjectId If formatter returns true as a result of formatter.hasBody call then bodyGetterId will<br>contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.<br>The result value is json ML array.
---Object containing abbreviated remote object value.
---@class CDP.Runtime.ObjectPreview
---@field type "object" | "function" | "undefined" | "string" | "number" | "boolean" | "symbol" | "bigint" Object type.
---@field subtype? "array" | "null" | "node" | "regexp" | "date" | "map" | "set" | "weakmap" | "weakset" | "iterator" | "generator" | "error" | "proxy" | "promise" | "typedarray" | "arraybuffer" | "dataview" | "webassemblymemory" | "wasmvalue" Object subtype hint. Specified for `object` type values only.
---@field description? string String representation of the object.
---@field overflow boolean True iff some of the properties or entries of the original object did not fit.
---@field properties CDP.Runtime.PropertyPreview[] List of the properties.
---@field entries? CDP.Runtime.EntryPreview[] List of the entries. Specified for `map` and `set` subtype values only.
---@class CDP.Runtime.PropertyPreview
---@field name string Property name.
---@field type "object" | "function" | "undefined" | "string" | "number" | "boolean" | "symbol" | "accessor" | "bigint" Object type. Accessor means that the property itself is an accessor property.
---@field value? string User-friendly property value string.
---@field valuePreview? CDP.Runtime.ObjectPreview Nested value preview.
---@field subtype? "array" | "null" | "node" | "regexp" | "date" | "map" | "set" | "weakmap" | "weakset" | "iterator" | "generator" | "error" | "proxy" | "promise" | "typedarray" | "arraybuffer" | "dataview" | "webassemblymemory" | "wasmvalue" Object subtype hint. Specified for `object` type values only.
---@class CDP.Runtime.EntryPreview
---@field key? CDP.Runtime.ObjectPreview Preview of the key. Specified for map-like collection entries.
---@field value CDP.Runtime.ObjectPreview Preview of the value.
---Object property descriptor.
---@class CDP.Runtime.PropertyDescriptor
---@field name string Property name or symbol description.
---@field value? CDP.Runtime.RemoteObject The value associated with the property.
---@field writable? boolean True if the value associated with the property may be changed (data descriptors only).
---@field get? CDP.Runtime.RemoteObject A function which serves as a getter for the property, or `undefined` if there is no getter<br>(accessor descriptors only).
---@field set? CDP.Runtime.RemoteObject A function which serves as a setter for the property, or `undefined` if there is no setter<br>(accessor descriptors only).
---@field configurable boolean True if the type of this property descriptor may be changed and if the property may be<br>deleted from the corresponding object.
---@field enumerable boolean True if this property shows up during enumeration of the properties on the corresponding<br>object.
---@field wasThrown? boolean True if the result was thrown during the evaluation.
---@field isOwn? boolean True if the property is owned for the object.
---@field symbol? CDP.Runtime.RemoteObject Property symbol object, if the property is of the `symbol` type.
---Object internal property descriptor. This property isn't normally visible in JavaScript code.
---@class CDP.Runtime.InternalPropertyDescriptor
---@field name string Conventional property name.
---@field value? CDP.Runtime.RemoteObject The value associated with the property.
---Object private field descriptor.
---@class CDP.Runtime.PrivatePropertyDescriptor
---@field name string Private property name.
---@field value? CDP.Runtime.RemoteObject The value associated with the private property.
---@field get? CDP.Runtime.RemoteObject A function which serves as a getter for the private property,<br>or `undefined` if there is no getter (accessor descriptors only).
---@field set? CDP.Runtime.RemoteObject A function which serves as a setter for the private property,<br>or `undefined` if there is no setter (accessor descriptors only).
---Represents function call argument. Either remote object id `objectId`, primitive `value`,
---unserializable primitive value or neither of (for undefined) them should be specified.
---@class CDP.Runtime.CallArgument
---@field value? any Primitive value or serializable javascript object.
---@field unserializableValue? CDP.Runtime.UnserializableValue Primitive value which can not be JSON-stringified.
---@field objectId? CDP.Runtime.RemoteObjectId Remote object handle.
---@alias CDP.Runtime.ExecutionContextId integer Id of an execution context.
---Description of an isolated world.
---@class CDP.Runtime.ExecutionContextDescription
---@field id CDP.Runtime.ExecutionContextId Unique id of the execution context. It can be used to specify in which execution context<br>script evaluation should be performed.
---@field origin string Execution context origin.
---@field name string Human readable name describing given context.
---@field uniqueId string A system-unique execution context identifier. Unlike the id, this is unique across<br>multiple processes, so can be reliably used to identify specific context while backend<br>performs a cross-process navigation.
---@field auxData? table Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
---Detailed information about exception (or error) that was thrown during script compilation or
---execution.
---@class CDP.Runtime.ExceptionDetails
---@field exceptionId integer Exception id.
---@field text string Exception text, which should be used together with exception object when available.
---@field lineNumber integer Line number of the exception location (0-based).
---@field columnNumber integer Column number of the exception location (0-based).
---@field scriptId? CDP.Runtime.ScriptId Script ID of the exception location.
---@field url? string URL of the exception location, to be used when the script was not reported.
---@field stackTrace? CDP.Runtime.StackTrace JavaScript stack trace if available.
---@field exception? CDP.Runtime.RemoteObject Exception object if available.
---@field executionContextId? CDP.Runtime.ExecutionContextId Identifier of the context where exception happened.
---@field exceptionMetaData? table Dictionary with entries of meta data that the client associated<br>with this exception, such as information about associated network<br>requests, etc.
---@alias CDP.Runtime.Timestamp number Number of milliseconds since epoch.
---@alias CDP.Runtime.TimeDelta number Number of milliseconds.
---Stack entry for runtime errors and assertions.
---@class CDP.Runtime.CallFrame
---@field functionName string JavaScript function name.
---@field scriptId CDP.Runtime.ScriptId JavaScript script id.
---@field url string JavaScript script name or url.
---@field lineNumber integer JavaScript script line number (0-based).
---@field columnNumber integer JavaScript script column number (0-based).
---Call frames for assertions or error messages.
---@class CDP.Runtime.StackTrace
---@field description? string String label of this stack trace. For async traces this may be a name of the function that<br>initiated the async call.
---@field callFrames CDP.Runtime.CallFrame[] JavaScript function name.
---@field parent? CDP.Runtime.StackTrace Asynchronous JavaScript stack trace that preceded this stack, if available.
---@field parentId? CDP.Runtime.StackTraceId Asynchronous JavaScript stack trace that preceded this stack, if available.
---@alias CDP.Runtime.UniqueDebuggerId string Unique identifier of current debugger.
---If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
---allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
---@class CDP.Runtime.StackTraceId
---@field id string
---@field debuggerId? CDP.Runtime.UniqueDebuggerId
---@class CDP.Runtime.awaitPromise_parameters
---@field promiseObjectId CDP.Runtime.RemoteObjectId Identifier of the promise.
---@field returnByValue? boolean Whether the result is expected to be a JSON object that should be sent by value.
---@field generatePreview? boolean Whether preview should be generated for the result.
---@class CDP.Runtime.awaitPromise_return
---@field result CDP.Runtime.RemoteObject Promise result. Will contain rejected value if promise was rejected.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details if stack strace is available.
---@class CDP.Runtime.callFunctionOn_parameters
---@field functionDeclaration string Declaration of the function to call.
---@field objectId? CDP.Runtime.RemoteObjectId Identifier of the object to call function on. Either objectId or executionContextId should<br>be specified.
---@field arguments? CDP.Runtime.CallArgument[] Call arguments. All call arguments must belong to the same JavaScript world as the target<br>object.
---@field silent? boolean In silent mode exceptions thrown during evaluation are not reported and do not pause<br>execution. Overrides `setPauseOnException` state.
---@field returnByValue? boolean Whether the result is expected to be a JSON object which should be sent by value.<br>Can be overriden by `serializationOptions`.
---@field generatePreview? boolean Whether preview should be generated for the result.
---@field userGesture? boolean Whether execution should be treated as initiated by user in the UI.
---@field awaitPromise? boolean Whether execution should `await` for resulting value and return once awaited promise is<br>resolved.
---@field executionContextId? CDP.Runtime.ExecutionContextId Specifies execution context which global object will be used to call function on. Either<br>executionContextId or objectId should be specified.
---@field objectGroup? string Symbolic group name that can be used to release multiple objects. If objectGroup is not<br>specified and objectId is, objectGroup will be inherited from object.
---@field throwOnSideEffect? boolean Whether to throw an exception if side effect cannot be ruled out during evaluation.
---@field uniqueContextId? string An alternative way to specify the execution context to call function on.<br>Compared to contextId that may be reused across processes, this is guaranteed to be<br>system-unique, so it can be used to prevent accidental function call<br>in context different than intended (e.g. as a result of navigation across process<br>boundaries).<br>This is mutually exclusive with `executionContextId`.
---@field generateWebDriverValue? boolean Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.<br>Whether the result should contain `webDriverValue`, serialized according to<br>https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but<br>resulting `objectId` is still provided.
---@field serializationOptions? CDP.Runtime.SerializationOptions Specifies the result serialization. If provided, overrides<br>`generatePreview`, `returnByValue` and `generateWebDriverValue`.
---@class CDP.Runtime.callFunctionOn_return
---@field result CDP.Runtime.RemoteObject Call result.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Runtime.compileScript_parameters
---@field expression string Expression to compile.
---@field sourceURL string Source url to be set for the script.
---@field persistScript boolean Specifies whether the compiled script should be persisted.
---@field executionContextId? CDP.Runtime.ExecutionContextId Specifies in which execution context to perform script run. If the parameter is omitted the<br>evaluation will be performed in the context of the inspected page.
---@class CDP.Runtime.compileScript_return
---@field scriptId? CDP.Runtime.ScriptId Id of the script.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Runtime.evaluate_parameters
---@field expression string Expression to evaluate.
---@field objectGroup? string Symbolic group name that can be used to release multiple objects.
---@field includeCommandLineAPI? boolean Determines whether Command Line API should be available during the evaluation.
---@field silent? boolean In silent mode exceptions thrown during evaluation are not reported and do not pause<br>execution. Overrides `setPauseOnException` state.
---@field contextId? CDP.Runtime.ExecutionContextId Specifies in which execution context to perform evaluation. If the parameter is omitted the<br>evaluation will be performed in the context of the inspected page.<br>This is mutually exclusive with `uniqueContextId`, which offers an<br>alternative way to identify the execution context that is more reliable<br>in a multi-process environment.
---@field returnByValue? boolean Whether the result is expected to be a JSON object that should be sent by value.
---@field generatePreview? boolean Whether preview should be generated for the result.
---@field userGesture? boolean Whether execution should be treated as initiated by user in the UI.
---@field awaitPromise? boolean Whether execution should `await` for resulting value and return once awaited promise is<br>resolved.
---@field throwOnSideEffect? boolean Whether to throw an exception if side effect cannot be ruled out during evaluation.<br>This implies `disableBreaks` below.
---@field timeout? CDP.Runtime.TimeDelta Terminate execution after timing out (number of milliseconds).
---@field disableBreaks? boolean Disable breakpoints during execution.
---@field replMode? boolean Setting this flag to true enables `let` re-declaration and top-level `await`.<br>Note that `let` variables can only be re-declared if they originate from<br>`replMode` themselves.
---@field allowUnsafeEvalBlockedByCSP? boolean The Content Security Policy (CSP) for the target might block 'unsafe-eval'<br>which includes eval(), Function(), setTimeout() and setInterval()<br>when called with non-callable arguments. This flag bypasses CSP for this<br>evaluation and allows unsafe-eval. Defaults to true.
---@field uniqueContextId? string An alternative way to specify the execution context to evaluate in.<br>Compared to contextId that may be reused across processes, this is guaranteed to be<br>system-unique, so it can be used to prevent accidental evaluation of the expression<br>in context different than intended (e.g. as a result of navigation across process<br>boundaries).<br>This is mutually exclusive with `contextId`.
---@field generateWebDriverValue? boolean Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.<br>Whether the result should contain `webDriverValue`, serialized<br>according to<br>https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but<br>resulting `objectId` is still provided.
---@field serializationOptions? CDP.Runtime.SerializationOptions Specifies the result serialization. If provided, overrides<br>`generatePreview`, `returnByValue` and `generateWebDriverValue`.
---@class CDP.Runtime.evaluate_return
---@field result CDP.Runtime.RemoteObject Evaluation result.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Runtime.getIsolateId_return
---@field id string The isolate id.
---@class CDP.Runtime.getHeapUsage_return
---@field usedSize number Used heap size in bytes.
---@field totalSize number Allocated heap size in bytes.
---@class CDP.Runtime.getProperties_parameters
---@field objectId CDP.Runtime.RemoteObjectId Identifier of the object to return properties for.
---@field ownProperties? boolean If true, returns properties belonging only to the element itself, not to its prototype<br>chain.
---@field accessorPropertiesOnly? boolean If true, returns accessor properties (with getter/setter) only; internal properties are not<br>returned either.
---@field generatePreview? boolean Whether preview should be generated for the results.
---@field nonIndexedPropertiesOnly? boolean If true, returns non-indexed properties only.
---@class CDP.Runtime.getProperties_return
---@field result CDP.Runtime.PropertyDescriptor[] Object properties.
---@field internalProperties? CDP.Runtime.InternalPropertyDescriptor[] Internal object properties (only of the element itself).
---@field privateProperties? CDP.Runtime.PrivatePropertyDescriptor[] Object private properties.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Runtime.globalLexicalScopeNames_parameters
---@field executionContextId? CDP.Runtime.ExecutionContextId Specifies in which execution context to lookup global scope variables.
---@class CDP.Runtime.globalLexicalScopeNames_return
---@field names string[]
---@class CDP.Runtime.queryObjects_parameters
---@field prototypeObjectId CDP.Runtime.RemoteObjectId Identifier of the prototype to return objects for.
---@field objectGroup? string Symbolic group name that can be used to release the results.
---@class CDP.Runtime.queryObjects_return
---@field objects CDP.Runtime.RemoteObject Array with objects.
---@class CDP.Runtime.releaseObject_parameters
---@field objectId CDP.Runtime.RemoteObjectId Identifier of the object to release.
---@class CDP.Runtime.releaseObjectGroup_parameters
---@field objectGroup string Symbolic object group name.
---@class CDP.Runtime.runScript_parameters
---@field scriptId CDP.Runtime.ScriptId Id of the script to run.
---@field executionContextId? CDP.Runtime.ExecutionContextId Specifies in which execution context to perform script run. If the parameter is omitted the<br>evaluation will be performed in the context of the inspected page.
---@field objectGroup? string Symbolic group name that can be used to release multiple objects.
---@field silent? boolean In silent mode exceptions thrown during evaluation are not reported and do not pause<br>execution. Overrides `setPauseOnException` state.
---@field includeCommandLineAPI? boolean Determines whether Command Line API should be available during the evaluation.
---@field returnByValue? boolean Whether the result is expected to be a JSON object which should be sent by value.
---@field generatePreview? boolean Whether preview should be generated for the result.
---@field awaitPromise? boolean Whether execution should `await` for resulting value and return once awaited promise is<br>resolved.
---@class CDP.Runtime.runScript_return
---@field result CDP.Runtime.RemoteObject Run result.
---@field exceptionDetails? CDP.Runtime.ExceptionDetails Exception details.
---@class CDP.Runtime.setAsyncCallStackDepth_parameters
---@field maxDepth integer Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async<br>call stacks (default).
---@class CDP.Runtime.setCustomObjectFormatterEnabled_parameters
---@field enabled boolean
---@class CDP.Runtime.setMaxCallStackSizeToCapture_parameters
---@field size integer
---@class CDP.Runtime.addBinding_parameters
---@field name string
---@field executionContextId? CDP.Runtime.ExecutionContextId If specified, the binding would only be exposed to the specified<br>execution context. If omitted and `executionContextName` is not set,<br>the binding is exposed to all execution contexts of the target.<br>This parameter is mutually exclusive with `executionContextName`.<br>Deprecated in favor of `executionContextName` due to an unclear use case<br>and bugs in implementation (crbug.com/1169639). `executionContextId` will be<br>removed in the future.
---@field executionContextName? string If specified, the binding is exposed to the executionContext with<br>matching name, even for contexts created after the binding is added.<br>See also `ExecutionContext.name` and `worldName` parameter to<br>`Page.addScriptToEvaluateOnNewDocument`.<br>This parameter is mutually exclusive with `executionContextId`.
---@class CDP.Runtime.removeBinding_parameters
---@field name string
---@class CDP.Runtime.getExceptionDetails_parameters
---@field errorObjectId CDP.Runtime.RemoteObjectId The error object for which to resolve the exception details.
---@class CDP.Runtime.getExceptionDetails_return
---@field exceptionDetails? CDP.Runtime.ExceptionDetails
---@class CDP.Runtime.bindingCalled_event
---@field name string
---@field payload string
---@field executionContextId CDP.Runtime.ExecutionContextId Identifier of the context where the call was made.
---@class CDP.Runtime.consoleAPICalled_event
---@field type "log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd" Type of the call.
---@field args CDP.Runtime.RemoteObject[] Call arguments.
---@field executionContextId CDP.Runtime.ExecutionContextId Identifier of the context where the call was made.
---@field timestamp CDP.Runtime.Timestamp Call timestamp.
---@field stackTrace? CDP.Runtime.StackTrace Stack trace captured when the call was made. The async stack chain is automatically reported for<br>the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call<br>chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
---@field context? string Console context descriptor for calls on non-default console context (not console.*):<br>'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call<br>on named context.
---@class CDP.Runtime.exceptionRevoked_event
---@field reason string Reason describing why exception was revoked.
---@field exceptionId integer The id of revoked exception, as reported in `exceptionThrown`.
---@class CDP.Runtime.exceptionThrown_event
---@field timestamp CDP.Runtime.Timestamp Timestamp of the exception.
---@field exceptionDetails CDP.Runtime.ExceptionDetails
---@class CDP.Runtime.executionContextCreated_event
---@field context CDP.Runtime.ExecutionContextDescription A newly created execution context.
---@class CDP.Runtime.executionContextDestroyed_event
---@field executionContextId CDP.Runtime.ExecutionContextId Id of the destroyed context
---@field executionContextUniqueId string Unique Id of the destroyed context
---@class CDP.Runtime.inspectRequested_event
---@field object CDP.Runtime.RemoteObject
---@field hints table
---@field executionContextId? CDP.Runtime.ExecutionContextId Identifier of the context where the call was made.
---Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
---Evaluation results are returned as mirror object that expose object type, string representation
---and unique identifier that can be used for further object reference. Original objects are
---maintained in memory unless they are either explicitly released or are released along with the
---other objects in their object group.
---@class CDP.Runtime: CDP._ClientContainer
---Add handler to promise with given promise object id.
---@field awaitPromise fun(self: CDP._ClientContainer, params: CDP.Runtime.awaitPromise_parameters): CDP.Error?, CDP.Runtime.awaitPromise_return?
---Calls function with given declaration on the given object. Object group of the result is
---inherited from the target object.
---@field callFunctionOn fun(self: CDP._ClientContainer, params: CDP.Runtime.callFunctionOn_parameters): CDP.Error?, CDP.Runtime.callFunctionOn_return?
---Compiles expression.
---@field compileScript fun(self: CDP._ClientContainer, params: CDP.Runtime.compileScript_parameters): CDP.Error?, CDP.Runtime.compileScript_return?
---Disables reporting of execution contexts creation.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Discards collected exceptions and console API calls.
---@field discardConsoleEntries fun(self: CDP._ClientContainer): CDP.Error?
---Enables reporting of execution contexts creation by means of `executionContextCreated` event.
---When the reporting gets enabled the event will be sent immediately for each existing execution
---context.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Evaluates expression on global object.
---@field evaluate fun(self: CDP._ClientContainer, params: CDP.Runtime.evaluate_parameters): CDP.Error?, CDP.Runtime.evaluate_return?
---Returns the isolate id.
---@field getIsolateId fun(self: CDP._ClientContainer): CDP.Error?, CDP.Runtime.getIsolateId_return?
---Returns the JavaScript heap usage.
---It is the total usage of the corresponding isolate not scoped to a particular Runtime.
---@field getHeapUsage fun(self: CDP._ClientContainer): CDP.Error?, CDP.Runtime.getHeapUsage_return?
---Returns properties of a given object. Object group of the result is inherited from the target
---object.
---@field getProperties fun(self: CDP._ClientContainer, params: CDP.Runtime.getProperties_parameters): CDP.Error?, CDP.Runtime.getProperties_return?
---Returns all let, const and class variables from global scope.
---@field globalLexicalScopeNames fun(self: CDP._ClientContainer, params: CDP.Runtime.globalLexicalScopeNames_parameters): CDP.Error?, CDP.Runtime.globalLexicalScopeNames_return?
---@field queryObjects fun(self: CDP._ClientContainer, params: CDP.Runtime.queryObjects_parameters): CDP.Error?, CDP.Runtime.queryObjects_return?
---Releases remote object with given id.
---@field releaseObject fun(self: CDP._ClientContainer, params: CDP.Runtime.releaseObject_parameters): CDP.Error?
---Releases all remote objects that belong to a given group.
---@field releaseObjectGroup fun(self: CDP._ClientContainer, params: CDP.Runtime.releaseObjectGroup_parameters): CDP.Error?
---Tells inspected instance to run if it was waiting for debugger to attach.
---@field runIfWaitingForDebugger fun(self: CDP._ClientContainer): CDP.Error?
---Runs script with given id in a given context.
---@field runScript fun(self: CDP._ClientContainer, params: CDP.Runtime.runScript_parameters): CDP.Error?, CDP.Runtime.runScript_return?
---Enables or disables async call stacks tracking.
---@field setAsyncCallStackDepth fun(self: CDP._ClientContainer, params: CDP.Runtime.setAsyncCallStackDepth_parameters): CDP.Error?
---@field setCustomObjectFormatterEnabled fun(self: CDP._ClientContainer, params: CDP.Runtime.setCustomObjectFormatterEnabled_parameters): CDP.Error?
---@field setMaxCallStackSizeToCapture fun(self: CDP._ClientContainer, params: CDP.Runtime.setMaxCallStackSizeToCapture_parameters): CDP.Error?
---Terminate current or next JavaScript execution.
---Will cancel the termination when the outer-most script execution ends.
---@field terminateExecution fun(self: CDP._ClientContainer): CDP.Error?
---If executionContextId is empty, adds binding with the given name on the
---global objects of all inspected contexts, including those created later,
---bindings survive reloads.
---Binding function takes exactly one argument, this argument should be string,
---in case of any other input, function throws an exception.
---Each binding function call produces Runtime.bindingCalled notification.
---@field addBinding fun(self: CDP._ClientContainer, params: CDP.Runtime.addBinding_parameters): CDP.Error?
---This method does not remove binding function from global object but
---unsubscribes current runtime agent from Runtime.bindingCalled notifications.
---@field removeBinding fun(self: CDP._ClientContainer, params: CDP.Runtime.removeBinding_parameters): CDP.Error?
---This method tries to lookup and populate exception details for a
---JavaScript Error object.
---Note that the stackTrace portion of the resulting exceptionDetails will
---only be populated if the Runtime domain was enabled at the time when the
---Error was thrown.
---@field getExceptionDetails fun(self: CDP._ClientContainer, params: CDP.Runtime.getExceptionDetails_parameters): CDP.Error?, CDP.Runtime.getExceptionDetails_return?
---Notification is issued every time when binding is called.
---@field bindingCalled fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.bindingCalled_event)): CDP.Error?
---Issued when console API was called.
---@field consoleAPICalled fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.consoleAPICalled_event)): CDP.Error?
---Issued when unhandled exception was revoked.
---@field exceptionRevoked fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.exceptionRevoked_event)): CDP.Error?
---Issued when exception was thrown and unhandled.
---@field exceptionThrown fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.exceptionThrown_event)): CDP.Error?
---Issued when new execution context is created.
---@field executionContextCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.executionContextCreated_event)): CDP.Error?
---Issued when execution context is destroyed.
---@field executionContextDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.executionContextDestroyed_event)): CDP.Error?
---Issued when all executionContexts were cleared in browser
---@field executionContextsCleared fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Issued when object should be inspected (for example, as a result of inspect() command line API
---call).
---@field inspectRequested fun(self: CDP._ClientContainer, cb: fun(event: CDP.Runtime.inspectRequested_event)): CDP.Error?

---Description of the protocol domain.
---@class CDP.Schema.Domain
---@field name string Domain name.
---@field version string Domain version.
---@class CDP.Schema.getDomains_return
---@field domains CDP.Schema.Domain[] List of supported domains.
---This domain is deprecated.
---@deprecated
---@class CDP.Schema: CDP._ClientContainer
---Returns supported domains.
---@field getDomains fun(self: CDP._ClientContainer): CDP.Error?, CDP.Schema.getDomains_return?

---@alias CDP.Accessibility.AXNodeId string Unique accessibility node identifier.
---@alias CDP.Accessibility.AXValueType "boolean" | "tristate" | "booleanOrUndefined" | "idref" | "idrefList" | "integer" | "node" | "nodeList" | "number" | "string" | "computedString" | "token" | "tokenList" | "domRelation" | "role" | "internalRole" | "valueUndefined" Enum of possible property types.
---@alias CDP.Accessibility.AXValueSourceType "attribute" | "implicit" | "style" | "contents" | "placeholder" | "relatedElement" Enum of possible property sources.
---@alias CDP.Accessibility.AXValueNativeSourceType "description" | "figcaption" | "label" | "labelfor" | "labelwrapped" | "legend" | "rubyannotation" | "tablecaption" | "title" | "other" Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
---A single source for a computed AX property.
---@class CDP.Accessibility.AXValueSource
---@field type CDP.Accessibility.AXValueSourceType What type of source this is.
---@field value? CDP.Accessibility.AXValue The value of this property source.
---@field attribute? string The name of the relevant attribute, if any.
---@field attributeValue? CDP.Accessibility.AXValue The value of the relevant attribute, if any.
---@field superseded? boolean Whether this source is superseded by a higher priority source.
---@field nativeSource? CDP.Accessibility.AXValueNativeSourceType The native markup source for this value, e.g. a `<label>` element.
---@field nativeSourceValue? CDP.Accessibility.AXValue The value, such as a node or node list, of the native source.
---@field invalid? boolean Whether the value for this property is invalid.
---@field invalidReason? string Reason for the value being invalid, if it is.
---@class CDP.Accessibility.AXRelatedNode
---@field backendDOMNodeId CDP.DOM.BackendNodeId The BackendNodeId of the related DOM node.
---@field idref? string The IDRef value provided, if any.
---@field text? string The text alternative of this node in the current context.
---@class CDP.Accessibility.AXProperty
---@field name CDP.Accessibility.AXPropertyName The name of this property.
---@field value CDP.Accessibility.AXValue The value of this property.
---A single computed AX property.
---@class CDP.Accessibility.AXValue
---@field type CDP.Accessibility.AXValueType The type of this value.
---@field value? any The computed value of this property.
---@field relatedNodes? CDP.Accessibility.AXRelatedNode[] One or more related nodes, if applicable.
---@field sources? CDP.Accessibility.AXValueSource[] The sources which contributed to the computation of this property.
---@alias CDP.Accessibility.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" Values of AXProperty name:<br>- from 'busy' to 'roledescription': states which apply to every AX node<br>- from 'live' to 'root': attributes which apply to nodes in live regions<br>- from 'autocomplete' to 'valuetext': attributes which apply to widgets<br>- from 'checked' to 'selected': states which apply to widgets<br>- from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
---A node in the accessibility tree.
---@class CDP.Accessibility.AXNode
---@field nodeId CDP.Accessibility.AXNodeId Unique identifier for this node.
---@field ignored boolean Whether this node is ignored for accessibility
---@field ignoredReasons? CDP.Accessibility.AXProperty[] Collection of reasons why this node is hidden.
---@field role? CDP.Accessibility.AXValue This `Node`'s role, whether explicit or implicit.
---@field chromeRole? CDP.Accessibility.AXValue This `Node`'s Chrome raw role.
---@field name? CDP.Accessibility.AXValue The accessible name for this `Node`.
---@field description? CDP.Accessibility.AXValue The accessible description for this `Node`.
---@field value? CDP.Accessibility.AXValue The value for this `Node`.
---@field properties? CDP.Accessibility.AXProperty[] All other properties
---@field parentId? CDP.Accessibility.AXNodeId ID for this node's parent.
---@field childIds? CDP.Accessibility.AXNodeId[] IDs for each of this node's child nodes.
---@field backendDOMNodeId? CDP.DOM.BackendNodeId The backend ID for the associated DOM node, if any.
---@field frameId? CDP.Page.FrameId The frame ID for the frame associated with this nodes document.
---@class CDP.Accessibility.getPartialAXTree_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node to get the partial accessibility tree for.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node to get the partial accessibility tree for.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper to get the partial accessibility tree for.
---@field fetchRelatives? boolean Whether to fetch this node's ancestors, siblings and children. Defaults to true.
---@class CDP.Accessibility.getPartialAXTree_return
---@field nodes CDP.Accessibility.AXNode[] The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and<br>children, if requested.
---@class CDP.Accessibility.getFullAXTree_parameters
---@field depth? integer The maximum depth at which descendants of the root node should be retrieved.<br>If omitted, the full tree is returned.
---@field frameId? CDP.Page.FrameId The frame for whose document the AX tree should be retrieved.<br>If omited, the root frame is used.
---@class CDP.Accessibility.getFullAXTree_return
---@field nodes CDP.Accessibility.AXNode[]
---@class CDP.Accessibility.getRootAXNode_parameters
---@field frameId? CDP.Page.FrameId The frame in whose document the node resides.<br>If omitted, the root frame is used.
---@class CDP.Accessibility.getRootAXNode_return
---@field node CDP.Accessibility.AXNode
---@class CDP.Accessibility.getAXNodeAndAncestors_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node to get.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node to get.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper to get.
---@class CDP.Accessibility.getAXNodeAndAncestors_return
---@field nodes CDP.Accessibility.AXNode[]
---@class CDP.Accessibility.getChildAXNodes_parameters
---@field id CDP.Accessibility.AXNodeId
---@field frameId? CDP.Page.FrameId The frame in whose document the node resides.<br>If omitted, the root frame is used.
---@class CDP.Accessibility.getChildAXNodes_return
---@field nodes CDP.Accessibility.AXNode[]
---@class CDP.Accessibility.queryAXTree_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node for the root to query.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node for the root to query.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper for the root to query.
---@field accessibleName? string Find nodes with this computed name.
---@field role? string Find nodes with this computed role.
---@class CDP.Accessibility.queryAXTree_return
---@field nodes CDP.Accessibility.AXNode[] A list of `Accessibility.AXNode` matching the specified attributes,<br>including nodes that are ignored for accessibility.
---@class CDP.Accessibility.loadComplete_event
---@field root CDP.Accessibility.AXNode New document root node.
---@class CDP.Accessibility.nodesUpdated_event
---@field nodes CDP.Accessibility.AXNode[] Updated node data.
---@class CDP.Accessibility: CDP._ClientContainer
---Disables the accessibility domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
---This turns on accessibility for the page, which can impact performance until accessibility is disabled.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
---@field getPartialAXTree fun(self: CDP._ClientContainer, params: CDP.Accessibility.getPartialAXTree_parameters): CDP.Error?, CDP.Accessibility.getPartialAXTree_return?
---Fetches the entire accessibility tree for the root Document
---@field getFullAXTree fun(self: CDP._ClientContainer, params: CDP.Accessibility.getFullAXTree_parameters): CDP.Error?, CDP.Accessibility.getFullAXTree_return?
---Fetches the root node.
---Requires `enable()` to have been called previously.
---@field getRootAXNode fun(self: CDP._ClientContainer, params: CDP.Accessibility.getRootAXNode_parameters): CDP.Error?, CDP.Accessibility.getRootAXNode_return?
---Fetches a node and all ancestors up to and including the root.
---Requires `enable()` to have been called previously.
---@field getAXNodeAndAncestors fun(self: CDP._ClientContainer, params: CDP.Accessibility.getAXNodeAndAncestors_parameters): CDP.Error?, CDP.Accessibility.getAXNodeAndAncestors_return?
---Fetches a particular accessibility node by AXNodeId.
---Requires `enable()` to have been called previously.
---@field getChildAXNodes fun(self: CDP._ClientContainer, params: CDP.Accessibility.getChildAXNodes_parameters): CDP.Error?, CDP.Accessibility.getChildAXNodes_return?
---Query a DOM node's accessibility subtree for accessible name and role.
---This command computes the name and role for all nodes in the subtree, including those that are
---ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
---node is specified, or the DOM node does not exist, the command returns an error. If neither
---`accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
---@field queryAXTree fun(self: CDP._ClientContainer, params: CDP.Accessibility.queryAXTree_parameters): CDP.Error?, CDP.Accessibility.queryAXTree_return?
---The loadComplete event mirrors the load complete event sent by the browser to assistive
---technology when the web page has finished loading.
---@field loadComplete fun(self: CDP._ClientContainer, cb: fun(event: CDP.Accessibility.loadComplete_event)): CDP.Error?
---The nodesUpdated event is sent every time a previously requested node has changed the in tree.
---@field nodesUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Accessibility.nodesUpdated_event)): CDP.Error?

---Animation instance.
---@class CDP.Animation.Animation
---@field id string `Animation`'s id.
---@field name string `Animation`'s name.
---@field pausedState boolean `Animation`'s internal paused state.
---@field playState string `Animation`'s play state.
---@field playbackRate number `Animation`'s playback rate.
---@field startTime number `Animation`'s start time.
---@field currentTime number `Animation`'s current time.
---@field type "CSSTransition" | "CSSAnimation" | "WebAnimation" Animation type of `Animation`.
---@field source? CDP.Animation.AnimationEffect `Animation`'s source animation node.
---@field cssId? string A unique ID for `Animation` representing the sources that triggered this CSS<br>animation/transition.
---AnimationEffect instance
---@class CDP.Animation.AnimationEffect
---@field delay number `AnimationEffect`'s delay.
---@field endDelay number `AnimationEffect`'s end delay.
---@field iterationStart number `AnimationEffect`'s iteration start.
---@field iterations number `AnimationEffect`'s iterations.
---@field duration number `AnimationEffect`'s iteration duration.
---@field direction string `AnimationEffect`'s playback direction.
---@field fill string `AnimationEffect`'s fill mode.
---@field backendNodeId? CDP.DOM.BackendNodeId `AnimationEffect`'s target node.
---@field keyframesRule? CDP.Animation.KeyframesRule `AnimationEffect`'s keyframes.
---@field easing string `AnimationEffect`'s timing function.
---Keyframes Rule
---@class CDP.Animation.KeyframesRule
---@field name? string CSS keyframed animation's name.
---@field keyframes CDP.Animation.KeyframeStyle[] List of animation keyframes.
---Keyframe Style
---@class CDP.Animation.KeyframeStyle
---@field offset string Keyframe's time offset.
---@field easing string `AnimationEffect`'s timing function.
---@class CDP.Animation.getCurrentTime_parameters
---@field id string Id of animation.
---@class CDP.Animation.getCurrentTime_return
---@field currentTime number Current time of the page.
---@class CDP.Animation.getPlaybackRate_return
---@field playbackRate number Playback rate for animations on page.
---@class CDP.Animation.releaseAnimations_parameters
---@field animations string[] List of animation ids to seek.
---@class CDP.Animation.resolveAnimation_parameters
---@field animationId string Animation id.
---@class CDP.Animation.resolveAnimation_return
---@field remoteObject CDP.Runtime.RemoteObject Corresponding remote object.
---@class CDP.Animation.seekAnimations_parameters
---@field animations string[] List of animation ids to seek.
---@field currentTime number Set the current time of each animation.
---@class CDP.Animation.setPaused_parameters
---@field animations string[] Animations to set the pause state of.
---@field paused boolean Paused state to set to.
---@class CDP.Animation.setPlaybackRate_parameters
---@field playbackRate number Playback rate for animations on page
---@class CDP.Animation.setTiming_parameters
---@field animationId string Animation id.
---@field duration number Duration of the animation.
---@field delay number Delay of the animation.
---@class CDP.Animation.animationCanceled_event
---@field id string Id of the animation that was cancelled.
---@class CDP.Animation.animationCreated_event
---@field id string Id of the animation that was created.
---@class CDP.Animation.animationStarted_event
---@field animation CDP.Animation.Animation Animation that was started.
---@class CDP.Animation: CDP._ClientContainer
---Disables animation domain notifications.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables animation domain notifications.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Returns the current time of the an animation.
---@field getCurrentTime fun(self: CDP._ClientContainer, params: CDP.Animation.getCurrentTime_parameters): CDP.Error?, CDP.Animation.getCurrentTime_return?
---Gets the playback rate of the document timeline.
---@field getPlaybackRate fun(self: CDP._ClientContainer): CDP.Error?, CDP.Animation.getPlaybackRate_return?
---Releases a set of animations to no longer be manipulated.
---@field releaseAnimations fun(self: CDP._ClientContainer, params: CDP.Animation.releaseAnimations_parameters): CDP.Error?
---Gets the remote object of the Animation.
---@field resolveAnimation fun(self: CDP._ClientContainer, params: CDP.Animation.resolveAnimation_parameters): CDP.Error?, CDP.Animation.resolveAnimation_return?
---Seek a set of animations to a particular time within each animation.
---@field seekAnimations fun(self: CDP._ClientContainer, params: CDP.Animation.seekAnimations_parameters): CDP.Error?
---Sets the paused state of a set of animations.
---@field setPaused fun(self: CDP._ClientContainer, params: CDP.Animation.setPaused_parameters): CDP.Error?
---Sets the playback rate of the document timeline.
---@field setPlaybackRate fun(self: CDP._ClientContainer, params: CDP.Animation.setPlaybackRate_parameters): CDP.Error?
---Sets the timing of an animation node.
---@field setTiming fun(self: CDP._ClientContainer, params: CDP.Animation.setTiming_parameters): CDP.Error?
---Event for when an animation has been cancelled.
---@field animationCanceled fun(self: CDP._ClientContainer, cb: fun(event: CDP.Animation.animationCanceled_event)): CDP.Error?
---Event for each animation that has been created.
---@field animationCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Animation.animationCreated_event)): CDP.Error?
---Event for animation that has been started.
---@field animationStarted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Animation.animationStarted_event)): CDP.Error?

---Information about a cookie that is affected by an inspector issue.
---@class CDP.Audits.AffectedCookie
---@field name string The following three properties uniquely identify a cookie
---@field path string
---@field domain string
---Information about a request that is affected by an inspector issue.
---@class CDP.Audits.AffectedRequest
---@field requestId CDP.Network.RequestId The unique request id.
---@field url? string
---Information about the frame affected by an inspector issue.
---@class CDP.Audits.AffectedFrame
---@field frameId CDP.Page.FrameId
---@alias CDP.Audits.CookieExclusionReason "ExcludeSameSiteUnspecifiedTreatedAsLax" | "ExcludeSameSiteNoneInsecure" | "ExcludeSameSiteLax" | "ExcludeSameSiteStrict" | "ExcludeInvalidSameParty" | "ExcludeSamePartyCrossPartyContext" | "ExcludeDomainNonASCII" | "ExcludeThirdPartyCookieBlockedInFirstPartySet" | "ExcludeThirdPartyPhaseout"
---@alias CDP.Audits.CookieWarningReason "WarnSameSiteUnspecifiedCrossSiteContext" | "WarnSameSiteNoneInsecure" | "WarnSameSiteUnspecifiedLaxAllowUnsafe" | "WarnSameSiteStrictLaxDowngradeStrict" | "WarnSameSiteStrictCrossDowngradeStrict" | "WarnSameSiteStrictCrossDowngradeLax" | "WarnSameSiteLaxCrossDowngradeStrict" | "WarnSameSiteLaxCrossDowngradeLax" | "WarnAttributeValueExceedsMaxSize" | "WarnDomainNonASCII" | "WarnThirdPartyPhaseout"
---@alias CDP.Audits.CookieOperation "SetCookie" | "ReadCookie"
---This information is currently necessary, as the front-end has a difficult
---time finding a specific cookie. With this, we can convey specific error
---information without the cookie.
---@class CDP.Audits.CookieIssueDetails
---@field cookie? CDP.Audits.AffectedCookie If AffectedCookie is not set then rawCookieLine contains the raw<br>Set-Cookie header string. This hints at a problem where the<br>cookie line is syntactically or semantically malformed in a way<br>that no valid cookie could be created.
---@field rawCookieLine? string
---@field cookieWarningReasons CDP.Audits.CookieWarningReason[]
---@field cookieExclusionReasons CDP.Audits.CookieExclusionReason[]
---@field operation CDP.Audits.CookieOperation Optionally identifies the site-for-cookies and the cookie url, which<br>may be used by the front-end as additional context.
---@field siteForCookies? string
---@field cookieUrl? string
---@field request? CDP.Audits.AffectedRequest
---@alias CDP.Audits.MixedContentResolutionStatus "MixedContentBlocked" | "MixedContentAutomaticallyUpgraded" | "MixedContentWarning"
---@alias CDP.Audits.MixedContentResourceType "AttributionSrc" | "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"
---@class CDP.Audits.MixedContentIssueDetails
---@field resourceType? CDP.Audits.MixedContentResourceType The type of resource causing the mixed content issue (css, js, iframe,<br>form,...). Marked as optional because it is mapped to from<br>blink::mojom::RequestContextType, which will be replaced<br>by network::mojom::RequestDestination
---@field resolutionStatus CDP.Audits.MixedContentResolutionStatus The way the mixed content issue is being resolved.
---@field insecureURL string The unsafe http url causing the mixed content issue.
---@field mainResourceURL string The url responsible for the call to an unsafe url.
---@field request? CDP.Audits.AffectedRequest The mixed content request.<br>Does not always exist (e.g. for unsafe form submission urls).
---@field frame? CDP.Audits.AffectedFrame Optional because not every mixed content issue is necessarily linked to a frame.
---@alias CDP.Audits.BlockedByResponseReason "CoepFrameResourceNeedsCoepHeader" | "CoopSandboxedIFrameCannotNavigateToCoopPage" | "CorpNotSameOrigin" | "CorpNotSameOriginAfterDefaultedToSameOriginByCoep" | "CorpNotSameSite" Enum indicating the reason a response has been blocked. These reasons are<br>refinements of the net error BLOCKED_BY_RESPONSE.
---Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
---code. Currently only used for COEP/COOP, but may be extended to include
---some CSP errors in the future.
---@class CDP.Audits.BlockedByResponseIssueDetails
---@field request CDP.Audits.AffectedRequest
---@field parentFrame? CDP.Audits.AffectedFrame
---@field blockedFrame? CDP.Audits.AffectedFrame
---@field reason CDP.Audits.BlockedByResponseReason
---@alias CDP.Audits.HeavyAdResolutionStatus "HeavyAdBlocked" | "HeavyAdWarning"
---@alias CDP.Audits.HeavyAdReason "NetworkTotalLimit" | "CpuTotalLimit" | "CpuPeakLimit"
---@class CDP.Audits.HeavyAdIssueDetails
---@field resolution CDP.Audits.HeavyAdResolutionStatus The resolution status, either blocking the content or warning.
---@field reason CDP.Audits.HeavyAdReason The reason the ad was blocked, total network or cpu or peak cpu.
---@field frame CDP.Audits.AffectedFrame The frame that was blocked.
---@alias CDP.Audits.ContentSecurityPolicyViolationType "kInlineViolation" | "kEvalViolation" | "kURLViolation" | "kTrustedTypesSinkViolation" | "kTrustedTypesPolicyViolation" | "kWasmEvalViolation"
---@class CDP.Audits.SourceCodeLocation
---@field scriptId? CDP.Runtime.ScriptId
---@field url string
---@field lineNumber integer
---@field columnNumber integer
---@class CDP.Audits.ContentSecurityPolicyIssueDetails
---@field blockedURL? string The url not included in allowed sources.
---@field violatedDirective string Specific directive that is violated, causing the CSP issue.
---@field isReportOnly boolean
---@field contentSecurityPolicyViolationType CDP.Audits.ContentSecurityPolicyViolationType
---@field frameAncestor? CDP.Audits.AffectedFrame
---@field sourceCodeLocation? CDP.Audits.SourceCodeLocation
---@field violatingNodeId? CDP.DOM.BackendNodeId
---@alias CDP.Audits.SharedArrayBufferIssueType "TransferIssue" | "CreationIssue"
---Details for a issue arising from an SAB being instantiated in, or
---transferred to a context that is not cross-origin isolated.
---@class CDP.Audits.SharedArrayBufferIssueDetails
---@field sourceCodeLocation CDP.Audits.SourceCodeLocation
---@field isWarning boolean
---@field type CDP.Audits.SharedArrayBufferIssueType
---@class CDP.Audits.LowTextContrastIssueDetails
---@field violatingNodeId CDP.DOM.BackendNodeId
---@field violatingNodeSelector string
---@field contrastRatio number
---@field thresholdAA number
---@field thresholdAAA number
---@field fontSize string
---@field fontWeight string
---Details for a CORS related issue, e.g. a warning or error related to
---CORS RFC1918 enforcement.
---@class CDP.Audits.CorsIssueDetails
---@field corsErrorStatus CDP.Network.CorsErrorStatus
---@field isWarning boolean
---@field request CDP.Audits.AffectedRequest
---@field location? CDP.Audits.SourceCodeLocation
---@field initiatorOrigin? string
---@field resourceIPAddressSpace? CDP.Network.IPAddressSpace
---@field clientSecurityState? CDP.Network.ClientSecurityState
---@alias CDP.Audits.AttributionReportingIssueType "PermissionPolicyDisabled" | "UntrustworthyReportingOrigin" | "InsecureContext" | "InvalidHeader" | "InvalidRegisterTriggerHeader" | "SourceAndTriggerHeaders" | "SourceIgnored" | "TriggerIgnored" | "OsSourceIgnored" | "OsTriggerIgnored" | "InvalidRegisterOsSourceHeader" | "InvalidRegisterOsTriggerHeader" | "WebAndOsHeaders" | "NoWebOrOsSupport" | "NavigationRegistrationWithoutTransientUserActivation"
---Details for issues around "Attribution Reporting API" usage.
---Explainer: https://github.com/WICG/attribution-reporting-api
---@class CDP.Audits.AttributionReportingIssueDetails
---@field violationType CDP.Audits.AttributionReportingIssueType
---@field request? CDP.Audits.AffectedRequest
---@field violatingNodeId? CDP.DOM.BackendNodeId
---@field invalidParameter? string
---Details for issues about documents in Quirks Mode
---or Limited Quirks Mode that affects page layouting.
---@class CDP.Audits.QuirksModeIssueDetails
---@field isLimitedQuirksMode boolean If false, it means the document's mode is "quirks"<br>instead of "limited-quirks".
---@field documentNodeId CDP.DOM.BackendNodeId
---@field url string
---@field frameId CDP.Page.FrameId
---@field loaderId CDP.Network.LoaderId
---@deprecated
---@class CDP.Audits.NavigatorUserAgentIssueDetails
---@field url string
---@field location? CDP.Audits.SourceCodeLocation
---@alias CDP.Audits.GenericIssueErrorType "CrossOriginPortalPostMessageError" | "FormLabelForNameError" | "FormDuplicateIdForInputError" | "FormInputWithNoLabelError" | "FormAutocompleteAttributeEmptyError" | "FormEmptyIdAndNameAttributesForInputError" | "FormAriaLabelledByToNonExistingId" | "FormInputAssignedAutocompleteValueToIdOrNameAttributeError" | "FormLabelHasNeitherForNorNestedInput" | "FormLabelForMatchesNonExistingIdError" | "FormInputHasWrongButWellIntendedAutocompleteValueError" | "ResponseWasBlockedByORB"
---Depending on the concrete errorType, different properties are set.
---@class CDP.Audits.GenericIssueDetails
---@field errorType CDP.Audits.GenericIssueErrorType Issues with the same errorType are aggregated in the frontend.
---@field frameId? CDP.Page.FrameId
---@field violatingNodeId? CDP.DOM.BackendNodeId
---@field violatingNodeAttribute? string
---@field request? CDP.Audits.AffectedRequest
---This issue tracks information needed to print a deprecation message.
---https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
---@class CDP.Audits.DeprecationIssueDetails
---@field affectedFrame? CDP.Audits.AffectedFrame
---@field sourceCodeLocation CDP.Audits.SourceCodeLocation
---@field type string One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
---This issue warns about sites in the redirect chain of a finished navigation
---that may be flagged as trackers and have their state cleared if they don't
---receive a user interaction. Note that in this context 'site' means eTLD+1.
---For example, if the URL `https://example.test:80/bounce` was in the
---redirect chain, the site reported would be `example.test`.
---@class CDP.Audits.BounceTrackingIssueDetails
---@field trackingSites string[]
---@alias CDP.Audits.ClientHintIssueReason "MetaTagAllowListInvalidOrigin" | "MetaTagModifiedHTML"
---@class CDP.Audits.FederatedAuthRequestIssueDetails
---@field federatedAuthRequestIssueReason CDP.Audits.FederatedAuthRequestIssueReason
---@alias CDP.Audits.FederatedAuthRequestIssueReason "ShouldEmbargo" | "TooManyRequests" | "WellKnownHttpNotFound" | "WellKnownNoResponse" | "WellKnownInvalidResponse" | "WellKnownListEmpty" | "WellKnownInvalidContentType" | "ConfigNotInWellKnown" | "WellKnownTooBig" | "ConfigHttpNotFound" | "ConfigNoResponse" | "ConfigInvalidResponse" | "ConfigInvalidContentType" | "ClientMetadataHttpNotFound" | "ClientMetadataNoResponse" | "ClientMetadataInvalidResponse" | "ClientMetadataInvalidContentType" | "DisabledInSettings" | "ErrorFetchingSignin" | "InvalidSigninResponse" | "AccountsHttpNotFound" | "AccountsNoResponse" | "AccountsInvalidResponse" | "AccountsListEmpty" | "AccountsInvalidContentType" | "IdTokenHttpNotFound" | "IdTokenNoResponse" | "IdTokenInvalidResponse" | "IdTokenInvalidRequest" | "IdTokenInvalidContentType" | "ErrorIdToken" | "Canceled" | "RpPageNotVisible" | "SilentMediationFailure" | "ThirdPartyCookiesBlocked" Represents the failure reason when a federated authentication reason fails.<br>Should be updated alongside RequestIdTokenStatus in<br>third_party/blink/public/mojom/devtools/inspector_issue.mojom to include<br>all cases except for success.
---@class CDP.Audits.FederatedAuthUserInfoRequestIssueDetails
---@field federatedAuthUserInfoRequestIssueReason CDP.Audits.FederatedAuthUserInfoRequestIssueReason
---@alias CDP.Audits.FederatedAuthUserInfoRequestIssueReason "NotSameOrigin" | "NotIframe" | "NotPotentiallyTrustworthy" | "NoApiPermission" | "NotSignedInWithIdp" | "NoAccountSharingPermission" | "InvalidConfigOrWellKnown" | "InvalidAccountsResponse" | "NoReturningUserFromFetchedAccounts" Represents the failure reason when a getUserInfo() call fails.<br>Should be updated alongside FederatedAuthUserInfoRequestResult in<br>third_party/blink/public/mojom/devtools/inspector_issue.mojom.
---This issue tracks client hints related issues. It's used to deprecate old
---features, encourage the use of new ones, and provide general guidance.
---@class CDP.Audits.ClientHintIssueDetails
---@field sourceCodeLocation CDP.Audits.SourceCodeLocation
---@field clientHintIssueReason CDP.Audits.ClientHintIssueReason
---@class CDP.Audits.FailedRequestInfo
---@field url string The URL that failed to load.
---@field failureMessage string The failure message for the failed request.
---@field requestId? CDP.Network.RequestId
---@alias CDP.Audits.StyleSheetLoadingIssueReason "LateImportRule" | "RequestFailed"
---This issue warns when a referenced stylesheet couldn't be loaded.
---@class CDP.Audits.StylesheetLoadingIssueDetails
---@field sourceCodeLocation CDP.Audits.SourceCodeLocation Source code position that referenced the failing stylesheet.
---@field styleSheetLoadingIssueReason CDP.Audits.StyleSheetLoadingIssueReason Reason why the stylesheet couldn't be loaded.
---@field failedRequestInfo? CDP.Audits.FailedRequestInfo Contains additional info when the failure was due to a request.
---@alias CDP.Audits.InspectorIssueCode "CookieIssue" | "MixedContentIssue" | "BlockedByResponseIssue" | "HeavyAdIssue" | "ContentSecurityPolicyIssue" | "SharedArrayBufferIssue" | "LowTextContrastIssue" | "CorsIssue" | "AttributionReportingIssue" | "QuirksModeIssue" | "NavigatorUserAgentIssue" | "GenericIssue" | "DeprecationIssue" | "ClientHintIssue" | "FederatedAuthRequestIssue" | "BounceTrackingIssue" | "StylesheetLoadingIssue" | "FederatedAuthUserInfoRequestIssue" A unique identifier for the type of issue. Each type may use one of the<br>optional fields in InspectorIssueDetails to convey more specific<br>information about the kind of issue.
---This struct holds a list of optional fields with additional information
---specific to the kind of issue. When adding a new issue code, please also
---add a new optional field to this type.
---@class CDP.Audits.InspectorIssueDetails
---@field cookieIssueDetails? CDP.Audits.CookieIssueDetails
---@field mixedContentIssueDetails? CDP.Audits.MixedContentIssueDetails
---@field blockedByResponseIssueDetails? CDP.Audits.BlockedByResponseIssueDetails
---@field heavyAdIssueDetails? CDP.Audits.HeavyAdIssueDetails
---@field contentSecurityPolicyIssueDetails? CDP.Audits.ContentSecurityPolicyIssueDetails
---@field sharedArrayBufferIssueDetails? CDP.Audits.SharedArrayBufferIssueDetails
---@field lowTextContrastIssueDetails? CDP.Audits.LowTextContrastIssueDetails
---@field corsIssueDetails? CDP.Audits.CorsIssueDetails
---@field attributionReportingIssueDetails? CDP.Audits.AttributionReportingIssueDetails
---@field quirksModeIssueDetails? CDP.Audits.QuirksModeIssueDetails
---@field navigatorUserAgentIssueDetails? CDP.Audits.NavigatorUserAgentIssueDetails
---@field genericIssueDetails? CDP.Audits.GenericIssueDetails
---@field deprecationIssueDetails? CDP.Audits.DeprecationIssueDetails
---@field clientHintIssueDetails? CDP.Audits.ClientHintIssueDetails
---@field federatedAuthRequestIssueDetails? CDP.Audits.FederatedAuthRequestIssueDetails
---@field bounceTrackingIssueDetails? CDP.Audits.BounceTrackingIssueDetails
---@field stylesheetLoadingIssueDetails? CDP.Audits.StylesheetLoadingIssueDetails
---@field federatedAuthUserInfoRequestIssueDetails? CDP.Audits.FederatedAuthUserInfoRequestIssueDetails
---@alias CDP.Audits.IssueId string A unique id for a DevTools inspector issue. Allows other entities (e.g.<br>exceptions, CDP message, console messages, etc.) to reference an issue.
---An inspector issue reported from the back-end.
---@class CDP.Audits.InspectorIssue
---@field code CDP.Audits.InspectorIssueCode
---@field details CDP.Audits.InspectorIssueDetails
---@field issueId? CDP.Audits.IssueId A unique id for this issue. May be omitted if no other entity (e.g.<br>exception, CDP message, etc.) is referencing this issue.
---@class CDP.Audits.getEncodedResponse_parameters
---@field requestId CDP.Network.RequestId Identifier of the network request to get content for.
---@field encoding "webp" | "jpeg" | "png" The encoding to use.
---@field quality? number The quality of the encoding (0-1). (defaults to 1)
---@field sizeOnly? boolean Whether to only return the size information (defaults to false).
---@class CDP.Audits.getEncodedResponse_return
---@field body? string The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)
---@field originalSize integer Size before re-encoding.
---@field encodedSize integer Size after re-encoding.
---@class CDP.Audits.checkContrast_parameters
---@field reportAAA? boolean Whether to report WCAG AAA level issues. Default is false.
---@class CDP.Audits.checkFormsIssues_return
---@field formIssues CDP.Audits.GenericIssueDetails[]
---@class CDP.Audits.issueAdded_event
---@field issue CDP.Audits.InspectorIssue
---Audits domain allows investigation of page violations and possible improvements.
---@class CDP.Audits: CDP._ClientContainer
---Returns the response body and size if it were re-encoded with the specified settings. Only
---applies to images.
---@field getEncodedResponse fun(self: CDP._ClientContainer, params: CDP.Audits.getEncodedResponse_parameters): CDP.Error?, CDP.Audits.getEncodedResponse_return?
---Disables issues domain, prevents further issues from being reported to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables issues domain, sends the issues collected so far to the client by means of the
---`issueAdded` event.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Runs the contrast check for the target page. Found issues are reported
---using Audits.issueAdded event.
---@field checkContrast fun(self: CDP._ClientContainer, params: CDP.Audits.checkContrast_parameters): CDP.Error?
---Runs the form issues check for the target page. Found issues are reported
---using Audits.issueAdded event.
---@field checkFormsIssues fun(self: CDP._ClientContainer): CDP.Error?, CDP.Audits.checkFormsIssues_return?
---@field issueAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.Audits.issueAdded_event)): CDP.Error?

---@class CDP.Autofill.CreditCard
---@field number string 16-digit credit card number.
---@field name string Name of the credit card owner.
---@field expiryMonth string 2-digit expiry month.
---@field expiryYear string 4-digit expiry year.
---@field cvc string 3-digit card verification code.
---@class CDP.Autofill.AddressField
---@field name string address field name, for example GIVEN_NAME.
---@field value string address field value, for example Jon Doe.
---A list of address fields.
---@class CDP.Autofill.AddressFields
---@field fields CDP.Autofill.AddressField[]
---@class CDP.Autofill.Address
---@field fields CDP.Autofill.AddressField[] fields and values defining an address.
---Defines how an address can be displayed like in chrome://settings/addresses.
---Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such.
---The following address UI for instance:
---[[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]]
---should allow the receiver to render:
---Jon Doe
---Munich 81456
---@class CDP.Autofill.AddressUI
---@field addressFields CDP.Autofill.AddressFields[] A two dimension array containing the repesentation of values from an address profile.
---@alias CDP.Autofill.FillingStrategy "autocompleteAttribute" | "autofillInferred" Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
---@class CDP.Autofill.FilledField
---@field htmlType string The type of the field, e.g text, password etc.
---@field id string the html id
---@field name string the html name
---@field value string the field value
---@field autofillType string The actual field type, e.g FAMILY_NAME
---@field fillingStrategy CDP.Autofill.FillingStrategy The filling strategy
---@class CDP.Autofill.trigger_parameters
---@field fieldId CDP.DOM.BackendNodeId Identifies a field that serves as an anchor for autofill.
---@field frameId? CDP.Page.FrameId Identifies the frame that field belongs to.
---@field card CDP.Autofill.CreditCard Credit card information to fill out the form. Credit card data is not saved.
---@class CDP.Autofill.setAddresses_parameters
---@field addresses CDP.Autofill.Address[]
---@class CDP.Autofill.addressFormFilled_event
---@field filledFields CDP.Autofill.FilledField[] Information about the fields that were filled
---@field addressUi CDP.Autofill.AddressUI An UI representation of the address used to fill the form.<br>Consists of a 2D array where each child represents an address/profile line.
---Defines commands and events for Autofill.
---@class CDP.Autofill: CDP._ClientContainer
---Trigger autofill on a form identified by the fieldId.
---If the field and related form cannot be autofilled, returns an error.
---@field trigger fun(self: CDP._ClientContainer, params: CDP.Autofill.trigger_parameters): CDP.Error?
---Set addresses so that developers can verify their forms implementation.
---@field setAddresses fun(self: CDP._ClientContainer, params: CDP.Autofill.setAddresses_parameters): CDP.Error?
---Disables autofill domain notifications.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables autofill domain notifications.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Emitted when an address form is filled.
---@field addressFormFilled fun(self: CDP._ClientContainer, cb: fun(event: CDP.Autofill.addressFormFilled_event)): CDP.Error?

---@alias CDP.BackgroundService.ServiceName "backgroundFetch" | "backgroundSync" | "pushMessaging" | "notifications" | "paymentHandler" | "periodicBackgroundSync" The Background Service that will be associated with the commands/events.<br>Every Background Service operates independently, but they share the same<br>API.
---A key-value pair for additional event information to pass along.
---@class CDP.BackgroundService.EventMetadata
---@field key string
---@field value string
---@class CDP.BackgroundService.BackgroundServiceEvent
---@field timestamp CDP.Network.TimeSinceEpoch Timestamp of the event (in seconds).
---@field origin string The origin this event belongs to.
---@field serviceWorkerRegistrationId CDP.ServiceWorker.RegistrationID The Service Worker ID that initiated the event.
---@field service CDP.BackgroundService.ServiceName The Background Service this event belongs to.
---@field eventName string A description of the event.
---@field instanceId string An identifier that groups related events together.
---@field eventMetadata CDP.BackgroundService.EventMetadata[] A list of event-specific information.
---@field storageKey string Storage key this event belongs to.
---@class CDP.BackgroundService.startObserving_parameters
---@field service CDP.BackgroundService.ServiceName
---@class CDP.BackgroundService.stopObserving_parameters
---@field service CDP.BackgroundService.ServiceName
---@class CDP.BackgroundService.setRecording_parameters
---@field shouldRecord boolean
---@field service CDP.BackgroundService.ServiceName
---@class CDP.BackgroundService.clearEvents_parameters
---@field service CDP.BackgroundService.ServiceName
---@class CDP.BackgroundService.recordingStateChanged_event
---@field isRecording boolean
---@field service CDP.BackgroundService.ServiceName
---@class CDP.BackgroundService.backgroundServiceEventReceived_event
---@field backgroundServiceEvent CDP.BackgroundService.BackgroundServiceEvent
---Defines events for background web platform features.
---@class CDP.BackgroundService: CDP._ClientContainer
---Enables event updates for the service.
---@field startObserving fun(self: CDP._ClientContainer, params: CDP.BackgroundService.startObserving_parameters): CDP.Error?
---Disables event updates for the service.
---@field stopObserving fun(self: CDP._ClientContainer, params: CDP.BackgroundService.stopObserving_parameters): CDP.Error?
---Set the recording state for the service.
---@field setRecording fun(self: CDP._ClientContainer, params: CDP.BackgroundService.setRecording_parameters): CDP.Error?
---Clears all stored data for the service.
---@field clearEvents fun(self: CDP._ClientContainer, params: CDP.BackgroundService.clearEvents_parameters): CDP.Error?
---Called when the recording state for the service has been updated.
---@field recordingStateChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.BackgroundService.recordingStateChanged_event)): CDP.Error?
---Called with all existing backgroundServiceEvents when enabled, and all new
---events afterwards if enabled and recording.
---@field backgroundServiceEventReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.BackgroundService.backgroundServiceEventReceived_event)): CDP.Error?

---@alias CDP.Browser.BrowserContextID string
---@alias CDP.Browser.WindowID integer
---@alias CDP.Browser.WindowState "normal" | "minimized" | "maximized" | "fullscreen" The state of the browser window.
---Browser window bounds information
---@class CDP.Browser.Bounds
---@field left? integer The offset from the left edge of the screen to the window in pixels.
---@field top? integer The offset from the top edge of the screen to the window in pixels.
---@field width? integer The window width in pixels.
---@field height? integer The window height in pixels.
---@field windowState? CDP.Browser.WindowState The window state. Default to normal.
---@alias CDP.Browser.PermissionType "accessibilityEvents" | "audioCapture" | "backgroundSync" | "backgroundFetch" | "clipboardReadWrite" | "clipboardSanitizedWrite" | "displayCapture" | "durableStorage" | "flash" | "geolocation" | "idleDetection" | "localFonts" | "midi" | "midiSysex" | "nfc" | "notifications" | "paymentHandler" | "periodicBackgroundSync" | "protectedMediaIdentifier" | "sensors" | "storageAccess" | "topLevelStorageAccess" | "videoCapture" | "videoCapturePanTiltZoom" | "wakeLockScreen" | "wakeLockSystem" | "windowManagement"
---@alias CDP.Browser.PermissionSetting "granted" | "denied" | "prompt"
---Definition of PermissionDescriptor defined in the Permissions API:
---https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
---@class CDP.Browser.PermissionDescriptor
---@field name string Name of permission.<br>See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
---@field sysex? boolean For "midi" permission, may also specify sysex control.
---@field userVisibleOnly? boolean For "push" permission, may specify userVisibleOnly.<br>Note that userVisibleOnly = true is the only currently supported type.
---@field allowWithoutSanitization? boolean For "clipboard" permission, may specify allowWithoutSanitization.
---@field panTiltZoom? boolean For "camera" permission, may specify panTiltZoom.
---@alias CDP.Browser.BrowserCommandId "openTabSearch" | "closeTabSearch" Browser command ids used by executeBrowserCommand.
---Chrome histogram bucket.
---@class CDP.Browser.Bucket
---@field low integer Minimum value (inclusive).
---@field high integer Maximum value (exclusive).
---@field count integer Number of samples.
---Chrome histogram.
---@class CDP.Browser.Histogram
---@field name string Name.
---@field sum integer Sum of sample values.
---@field count integer Total number of samples.
---@field buckets CDP.Browser.Bucket[] Buckets.
---@class CDP.Browser.setPermission_parameters
---@field permission CDP.Browser.PermissionDescriptor Descriptor of permission to override.
---@field setting CDP.Browser.PermissionSetting Setting of the permission.
---@field origin? string Origin the permission applies to, all origins if not specified.
---@field browserContextId? CDP.Browser.BrowserContextID Context to override. When omitted, default browser context is used.
---@class CDP.Browser.grantPermissions_parameters
---@field permissions CDP.Browser.PermissionType[]
---@field origin? string Origin the permission applies to, all origins if not specified.
---@field browserContextId? CDP.Browser.BrowserContextID BrowserContext to override permissions. When omitted, default browser context is used.
---@class CDP.Browser.resetPermissions_parameters
---@field browserContextId? CDP.Browser.BrowserContextID BrowserContext to reset permissions. When omitted, default browser context is used.
---@class CDP.Browser.setDownloadBehavior_parameters
---@field behavior "deny" | "allow" | "allowAndName" | "default" Whether to allow all or deny all download requests, or use default Chrome behavior if<br>available (otherwise deny). |allowAndName| allows download and names files according to<br>their dowmload guids.
---@field browserContextId? CDP.Browser.BrowserContextID BrowserContext to set download behavior. When omitted, default browser context is used.
---@field downloadPath? string The default path to save downloaded files to. This is required if behavior is set to 'allow'<br>or 'allowAndName'.
---@field eventsEnabled? boolean Whether to emit download events (defaults to false).
---@class CDP.Browser.cancelDownload_parameters
---@field guid string Global unique identifier of the download.
---@field browserContextId? CDP.Browser.BrowserContextID BrowserContext to perform the action in. When omitted, default browser context is used.
---@class CDP.Browser.getVersion_return
---@field protocolVersion string Protocol version.
---@field product string Product name.
---@field revision string Product revision.
---@field userAgent string User-Agent.
---@field jsVersion string V8 version.
---@class CDP.Browser.getBrowserCommandLine_return
---@field arguments string[] Commandline parameters
---@class CDP.Browser.getHistograms_parameters
---@field query? string Requested substring in name. Only histograms which have query as a<br>substring in their name are extracted. An empty or absent query returns<br>all histograms.
---@field delta? boolean If true, retrieve delta since last delta call.
---@class CDP.Browser.getHistograms_return
---@field histograms CDP.Browser.Histogram[] Histograms.
---@class CDP.Browser.getHistogram_parameters
---@field name string Requested histogram name.
---@field delta? boolean If true, retrieve delta since last delta call.
---@class CDP.Browser.getHistogram_return
---@field histogram CDP.Browser.Histogram Histogram.
---@class CDP.Browser.getWindowBounds_parameters
---@field windowId CDP.Browser.WindowID Browser window id.
---@class CDP.Browser.getWindowBounds_return
---@field bounds CDP.Browser.Bounds Bounds information of the window. When window state is 'minimized', the restored window<br>position and size are returned.
---@class CDP.Browser.getWindowForTarget_parameters
---@field targetId? CDP.Target.TargetID Devtools agent host id. If called as a part of the session, associated targetId is used.
---@class CDP.Browser.getWindowForTarget_return
---@field windowId CDP.Browser.WindowID Browser window id.
---@field bounds CDP.Browser.Bounds Bounds information of the window. When window state is 'minimized', the restored window<br>position and size are returned.
---@class CDP.Browser.setWindowBounds_parameters
---@field windowId CDP.Browser.WindowID Browser window id.
---@field bounds CDP.Browser.Bounds New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined<br>with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
---@class CDP.Browser.setDockTile_parameters
---@field badgeLabel? string
---@field image? string Png encoded image. (Encoded as a base64 string when passed over JSON)
---@class CDP.Browser.executeBrowserCommand_parameters
---@field commandId CDP.Browser.BrowserCommandId
---@class CDP.Browser.addPrivacySandboxEnrollmentOverride_parameters
---@field url string
---@class CDP.Browser.downloadWillBegin_event
---@field frameId CDP.Page.FrameId Id of the frame that caused the download to begin.
---@field guid string Global unique identifier of the download.
---@field url string URL of the resource being downloaded.
---@field suggestedFilename string Suggested file name of the resource (the actual name of the file saved on disk may differ).
---@class CDP.Browser.downloadProgress_event
---@field guid string Global unique identifier of the download.
---@field totalBytes number Total expected bytes to download.
---@field receivedBytes number Total bytes received.
---@field state "inProgress" | "completed" | "canceled" Download status.
---The Browser domain defines methods and events for browser managing.
---@class CDP.Browser: CDP._ClientContainer
---Set permission settings for given origin.
---@field setPermission fun(self: CDP._ClientContainer, params: CDP.Browser.setPermission_parameters): CDP.Error?
---Grant specific permissions to the given origin and reject all others.
---@field grantPermissions fun(self: CDP._ClientContainer, params: CDP.Browser.grantPermissions_parameters): CDP.Error?
---Reset all permission management for all origins.
---@field resetPermissions fun(self: CDP._ClientContainer, params: CDP.Browser.resetPermissions_parameters): CDP.Error?
---Set the behavior when downloading a file.
---@field setDownloadBehavior fun(self: CDP._ClientContainer, params: CDP.Browser.setDownloadBehavior_parameters): CDP.Error?
---Cancel a download if in progress
---@field cancelDownload fun(self: CDP._ClientContainer, params: CDP.Browser.cancelDownload_parameters): CDP.Error?
---Close browser gracefully.
---@field close fun(self: CDP._ClientContainer): CDP.Error?
---Crashes browser on the main thread.
---@field crash fun(self: CDP._ClientContainer): CDP.Error?
---Crashes GPU process.
---@field crashGpuProcess fun(self: CDP._ClientContainer): CDP.Error?
---Returns version information.
---@field getVersion fun(self: CDP._ClientContainer): CDP.Error?, CDP.Browser.getVersion_return?
---Returns the command line switches for the browser process if, and only if
-----enable-automation is on the commandline.
---@field getBrowserCommandLine fun(self: CDP._ClientContainer): CDP.Error?, CDP.Browser.getBrowserCommandLine_return?
---Get Chrome histograms.
---@field getHistograms fun(self: CDP._ClientContainer, params: CDP.Browser.getHistograms_parameters): CDP.Error?, CDP.Browser.getHistograms_return?
---Get a Chrome histogram by name.
---@field getHistogram fun(self: CDP._ClientContainer, params: CDP.Browser.getHistogram_parameters): CDP.Error?, CDP.Browser.getHistogram_return?
---Get position and size of the browser window.
---@field getWindowBounds fun(self: CDP._ClientContainer, params: CDP.Browser.getWindowBounds_parameters): CDP.Error?, CDP.Browser.getWindowBounds_return?
---Get the browser window that contains the devtools target.
---@field getWindowForTarget fun(self: CDP._ClientContainer, params: CDP.Browser.getWindowForTarget_parameters): CDP.Error?, CDP.Browser.getWindowForTarget_return?
---Set position and/or size of the browser window.
---@field setWindowBounds fun(self: CDP._ClientContainer, params: CDP.Browser.setWindowBounds_parameters): CDP.Error?
---Set dock tile details, platform-specific.
---@field setDockTile fun(self: CDP._ClientContainer, params: CDP.Browser.setDockTile_parameters): CDP.Error?
---Invoke custom browser commands used by telemetry.
---@field executeBrowserCommand fun(self: CDP._ClientContainer, params: CDP.Browser.executeBrowserCommand_parameters): CDP.Error?
---Allows a site to use privacy sandbox features that require enrollment
---without the site actually being enrolled. Only supported on page targets.
---@field addPrivacySandboxEnrollmentOverride fun(self: CDP._ClientContainer, params: CDP.Browser.addPrivacySandboxEnrollmentOverride_parameters): CDP.Error?
---Fired when page is about to start a download.
---@field downloadWillBegin fun(self: CDP._ClientContainer, cb: fun(event: CDP.Browser.downloadWillBegin_event)): CDP.Error?
---Fired when download makes progress. Last call has |done| == true.
---@field downloadProgress fun(self: CDP._ClientContainer, cb: fun(event: CDP.Browser.downloadProgress_event)): CDP.Error?

---@alias CDP.CSS.StyleSheetId string
---@alias CDP.CSS.StyleSheetOrigin "injected" | "user-agent" | "inspector" | "regular" Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent<br>stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via<br>inspector" rules), "regular" for regular stylesheets.
---CSS rule collection for a single pseudo style.
---@class CDP.CSS.PseudoElementMatches
---@field pseudoType CDP.DOM.PseudoType Pseudo element type.
---@field pseudoIdentifier? string Pseudo element custom ident.
---@field matches CDP.CSS.RuleMatch[] Matches of CSS rules applicable to the pseudo style.
---Inherited CSS rule collection from ancestor node.
---@class CDP.CSS.InheritedStyleEntry
---@field inlineStyle? CDP.CSS.CSSStyle The ancestor node's inline style, if any, in the style inheritance chain.
---@field matchedCSSRules CDP.CSS.RuleMatch[] Matches of CSS rules matching the ancestor node in the style inheritance chain.
---Inherited pseudo element matches from pseudos of an ancestor node.
---@class CDP.CSS.InheritedPseudoElementMatches
---@field pseudoElements CDP.CSS.PseudoElementMatches[] Matches of pseudo styles from the pseudos of an ancestor node.
---Match data for a CSS rule.
---@class CDP.CSS.RuleMatch
---@field rule CDP.CSS.CSSRule CSS rule in the match.
---@field matchingSelectors integer[] Matching selector indices in the rule's selectorList selectors (0-based).
---Data for a simple selector (these are delimited by commas in a selector list).
---@class CDP.CSS.Value
---@field text string Value text.
---@field range? CDP.CSS.SourceRange Value range in the underlying resource (if available).
---@field specificity? CDP.CSS.Specificity Specificity of the selector.
---Specificity:
---https://drafts.csswg.org/selectors/#specificity-rules
---@class CDP.CSS.Specificity
---@field a integer The a component, which represents the number of ID selectors.
---@field b integer The b component, which represents the number of class selectors, attributes selectors, and<br>pseudo-classes.
---@field c integer The c component, which represents the number of type selectors and pseudo-elements.
---Selector list data.
---@class CDP.CSS.SelectorList
---@field selectors CDP.CSS.Value[] Selectors in the list.
---@field text string Rule selector text.
---CSS stylesheet metainformation.
---@class CDP.CSS.CSSStyleSheetHeader
---@field styleSheetId CDP.CSS.StyleSheetId The stylesheet identifier.
---@field frameId CDP.Page.FrameId Owner frame identifier.
---@field sourceURL string Stylesheet resource URL. Empty if this is a constructed stylesheet created using<br>new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported<br>as a CSS module script).
---@field sourceMapURL? string URL of source map associated with the stylesheet (if any).
---@field origin CDP.CSS.StyleSheetOrigin Stylesheet origin.
---@field title string Stylesheet title.
---@field ownerNode? CDP.DOM.BackendNodeId The backend id for the owner node of the stylesheet.
---@field disabled boolean Denotes whether the stylesheet is disabled.
---@field hasSourceURL? boolean Whether the sourceURL field value comes from the sourceURL comment.
---@field isInline boolean Whether this stylesheet is created for STYLE tag by parser. This flag is not set for<br>document.written STYLE tags.
---@field isMutable boolean Whether this stylesheet is mutable. Inline stylesheets become mutable<br>after they have been modified via CSSOM API.<br>`<link>` element's stylesheets become mutable only if DevTools modifies them.<br>Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
---@field isConstructed boolean True if this stylesheet is created through new CSSStyleSheet() or imported as a<br>CSS module script.
---@field startLine number Line offset of the stylesheet within the resource (zero based).
---@field startColumn number Column offset of the stylesheet within the resource (zero based).
---@field length number Size of the content (in characters).
---@field endLine number Line offset of the end of the stylesheet within the resource (zero based).
---@field endColumn number Column offset of the end of the stylesheet within the resource (zero based).
---@field loadingFailed? boolean If the style sheet was loaded from a network resource, this indicates when the resource failed to load
---CSS rule representation.
---@class CDP.CSS.CSSRule
---@field styleSheetId? CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field selectorList CDP.CSS.SelectorList Rule selector data.
---@field nestingSelectors? string[] Array of selectors from ancestor style rules, sorted by distance from the current rule.
---@field origin CDP.CSS.StyleSheetOrigin Parent stylesheet's origin.
---@field style CDP.CSS.CSSStyle Associated style declaration.
---@field media? CDP.CSS.CSSMedia[] Media list array (for rules involving media queries). The array enumerates media queries<br>starting with the innermost one, going outwards.
---@field containerQueries? CDP.CSS.CSSContainerQuery[] Container query list array (for rules involving container queries).<br>The array enumerates container queries starting with the innermost one, going outwards.
---@field supports? CDP.CSS.CSSSupports[] @supports CSS at-rule array.<br>The array enumerates @supports at-rules starting with the innermost one, going outwards.
---@field layers? CDP.CSS.CSSLayer[] Cascade layer array. Contains the layer hierarchy that this rule belongs to starting<br>with the innermost layer and going outwards.
---@field scopes? CDP.CSS.CSSScope[] @scope CSS at-rule array.<br>The array enumerates @scope at-rules starting with the innermost one, going outwards.
---@field ruleTypes? CDP.CSS.CSSRuleType[] The array keeps the types of ancestor CSSRules from the innermost going outwards.
---@alias CDP.CSS.CSSRuleType "MediaRule" | "SupportsRule" | "ContainerRule" | "LayerRule" | "ScopeRule" | "StyleRule" Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.<br>This list only contains rule types that are collected during the ancestor rule collection.
---CSS coverage information.
---@class CDP.CSS.RuleUsage
---@field styleSheetId CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field startOffset number Offset of the start of the rule (including selector) from the beginning of the stylesheet.
---@field endOffset number Offset of the end of the rule body from the beginning of the stylesheet.
---@field used boolean Indicates whether the rule was actually used by some element in the page.
---Text range within a resource. All numbers are zero-based.
---@class CDP.CSS.SourceRange
---@field startLine integer Start line of range.
---@field startColumn integer Start column of range (inclusive).
---@field endLine integer End line of range
---@field endColumn integer End column of range (exclusive).
---@class CDP.CSS.ShorthandEntry
---@field name string Shorthand name.
---@field value string Shorthand value.
---@field important? boolean Whether the property has "!important" annotation (implies `false` if absent).
---@class CDP.CSS.CSSComputedStyleProperty
---@field name string Computed style property name.
---@field value string Computed style property value.
---CSS style representation.
---@class CDP.CSS.CSSStyle
---@field styleSheetId? CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field cssProperties CDP.CSS.CSSProperty[] CSS properties in the style.
---@field shorthandEntries CDP.CSS.ShorthandEntry[] Computed values for all shorthands found in the style.
---@field cssText? string Style declaration text (if available).
---@field range? CDP.CSS.SourceRange Style declaration range in the enclosing stylesheet (if available).
---CSS property declaration data.
---@class CDP.CSS.CSSProperty
---@field name string The property name.
---@field value string The property value.
---@field important? boolean Whether the property has "!important" annotation (implies `false` if absent).
---@field implicit? boolean Whether the property is implicit (implies `false` if absent).
---@field text? string The full property text as specified in the style.
---@field parsedOk? boolean Whether the property is understood by the browser (implies `true` if absent).
---@field disabled? boolean Whether the property is disabled by the user (present for source-based properties only).
---@field range? CDP.CSS.SourceRange The entire property range in the enclosing style declaration (if available).
---@field longhandProperties? CDP.CSS.CSSProperty[] Parsed longhand components of this property if it is a shorthand.<br>This field will be empty if the given property is not a shorthand.
---CSS media rule descriptor.
---@class CDP.CSS.CSSMedia
---@field text string Media query text.
---@field source "mediaRule" | "importRule" | "linkedSheet" | "inlineSheet" Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if<br>specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked<br>stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline<br>stylesheet's STYLE tag.
---@field sourceURL? string URL of the document containing the media query description.
---@field range? CDP.CSS.SourceRange The associated rule (@media or @import) header range in the enclosing stylesheet (if<br>available).
---@field styleSheetId? CDP.CSS.StyleSheetId Identifier of the stylesheet containing this object (if exists).
---@field mediaList? CDP.CSS.MediaQuery[] Array of media queries.
---Media query descriptor.
---@class CDP.CSS.MediaQuery
---@field expressions CDP.CSS.MediaQueryExpression[] Array of media query expressions.
---@field active boolean Whether the media query condition is satisfied.
---Media query expression descriptor.
---@class CDP.CSS.MediaQueryExpression
---@field value number Media query expression value.
---@field unit string Media query expression units.
---@field feature string Media query expression feature.
---@field valueRange? CDP.CSS.SourceRange The associated range of the value text in the enclosing stylesheet (if available).
---@field computedLength? number Computed length of media query expression (if applicable).
---CSS container query rule descriptor.
---@class CDP.CSS.CSSContainerQuery
---@field text string Container query text.
---@field range? CDP.CSS.SourceRange The associated rule header range in the enclosing stylesheet (if<br>available).
---@field styleSheetId? CDP.CSS.StyleSheetId Identifier of the stylesheet containing this object (if exists).
---@field name? string Optional name for the container.
---@field physicalAxes? CDP.DOM.PhysicalAxes Optional physical axes queried for the container.
---@field logicalAxes? CDP.DOM.LogicalAxes Optional logical axes queried for the container.
---CSS Supports at-rule descriptor.
---@class CDP.CSS.CSSSupports
---@field text string Supports rule text.
---@field active boolean Whether the supports condition is satisfied.
---@field range? CDP.CSS.SourceRange The associated rule header range in the enclosing stylesheet (if<br>available).
---@field styleSheetId? CDP.CSS.StyleSheetId Identifier of the stylesheet containing this object (if exists).
---CSS Scope at-rule descriptor.
---@class CDP.CSS.CSSScope
---@field text string Scope rule text.
---@field range? CDP.CSS.SourceRange The associated rule header range in the enclosing stylesheet (if<br>available).
---@field styleSheetId? CDP.CSS.StyleSheetId Identifier of the stylesheet containing this object (if exists).
---CSS Layer at-rule descriptor.
---@class CDP.CSS.CSSLayer
---@field text string Layer name.
---@field range? CDP.CSS.SourceRange The associated rule header range in the enclosing stylesheet (if<br>available).
---@field styleSheetId? CDP.CSS.StyleSheetId Identifier of the stylesheet containing this object (if exists).
---CSS Layer data.
---@class CDP.CSS.CSSLayerData
---@field name string Layer name.
---@field subLayers? CDP.CSS.CSSLayerData[] Direct sub-layers
---@field order number Layer order. The order determines the order of the layer in the cascade order.<br>A higher number has higher priority in the cascade order.
---Information about amount of glyphs that were rendered with given font.
---@class CDP.CSS.PlatformFontUsage
---@field familyName string Font's family name reported by platform.
---@field isCustomFont boolean Indicates if the font was downloaded or resolved locally.
---@field glyphCount number Amount of glyphs that were rendered with this font.
---Information about font variation axes for variable fonts
---@class CDP.CSS.FontVariationAxis
---@field tag string The font-variation-setting tag (a.k.a. "axis tag").
---@field name string Human-readable variation name in the default language (normally, "en").
---@field minValue number The minimum value (inclusive) the font supports for this tag.
---@field maxValue number The maximum value (inclusive) the font supports for this tag.
---@field defaultValue number The default value.
---Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
---and additional information such as platformFontFamily and fontVariationAxes.
---@class CDP.CSS.FontFace
---@field fontFamily string The font-family.
---@field fontStyle string The font-style.
---@field fontVariant string The font-variant.
---@field fontWeight string The font-weight.
---@field fontStretch string The font-stretch.
---@field fontDisplay string The font-display.
---@field unicodeRange string The unicode-range.
---@field src string The src.
---@field platformFontFamily string The resolved platform font family
---@field fontVariationAxes? CDP.CSS.FontVariationAxis[] Available variation settings (a.k.a. "axes").
---CSS try rule representation.
---@class CDP.CSS.CSSTryRule
---@field styleSheetId? CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field origin CDP.CSS.StyleSheetOrigin Parent stylesheet's origin.
---@field style CDP.CSS.CSSStyle Associated style declaration.
---CSS position-fallback rule representation.
---@class CDP.CSS.CSSPositionFallbackRule
---@field name CDP.CSS.Value
---@field tryRules CDP.CSS.CSSTryRule[] List of keyframes.
---CSS keyframes rule representation.
---@class CDP.CSS.CSSKeyframesRule
---@field animationName CDP.CSS.Value Animation name.
---@field keyframes CDP.CSS.CSSKeyframeRule[] List of keyframes.
---Representation of a custom property registration through CSS.registerProperty
---@class CDP.CSS.CSSPropertyRegistration
---@field propertyName string
---@field initialValue? CDP.CSS.Value
---@field inherits boolean
---@field syntax string
---CSS property at-rule representation.
---@class CDP.CSS.CSSPropertyRule
---@field styleSheetId? CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field origin CDP.CSS.StyleSheetOrigin Parent stylesheet's origin.
---@field propertyName CDP.CSS.Value Associated property name.
---@field style CDP.CSS.CSSStyle Associated style declaration.
---CSS keyframe rule representation.
---@class CDP.CSS.CSSKeyframeRule
---@field styleSheetId? CDP.CSS.StyleSheetId The css style sheet identifier (absent for user agent stylesheet and user-specified<br>stylesheet rules) this rule came from.
---@field origin CDP.CSS.StyleSheetOrigin Parent stylesheet's origin.
---@field keyText CDP.CSS.Value Associated key text.
---@field style CDP.CSS.CSSStyle Associated style declaration.
---A descriptor of operation to mutate style declaration text.
---@class CDP.CSS.StyleDeclarationEdit
---@field styleSheetId CDP.CSS.StyleSheetId The css style sheet identifier.
---@field range CDP.CSS.SourceRange The range of the style text in the enclosing stylesheet.
---@field text string New style text.
---@class CDP.CSS.addRule_parameters
---@field styleSheetId CDP.CSS.StyleSheetId The css style sheet identifier where a new rule should be inserted.
---@field ruleText string The text of a new rule.
---@field location CDP.CSS.SourceRange Text position of a new rule in the target style sheet.
---@class CDP.CSS.addRule_return
---@field rule CDP.CSS.CSSRule The newly created rule.
---@class CDP.CSS.collectClassNames_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@class CDP.CSS.collectClassNames_return
---@field classNames string[] Class name list.
---@class CDP.CSS.createStyleSheet_parameters
---@field frameId CDP.Page.FrameId Identifier of the frame where "via-inspector" stylesheet should be created.
---@class CDP.CSS.createStyleSheet_return
---@field styleSheetId CDP.CSS.StyleSheetId Identifier of the created "via-inspector" stylesheet.
---@class CDP.CSS.forcePseudoState_parameters
---@field nodeId CDP.DOM.NodeId The element id for which to force the pseudo state.
---@field forcedPseudoClasses string[] Element pseudo classes to force when computing the element's style.
---@class CDP.CSS.getBackgroundColors_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to get background colors for.
---@class CDP.CSS.getBackgroundColors_return
---@field backgroundColors? string[] The range of background colors behind this element, if it contains any visible text. If no<br>visible text is present, this will be undefined. In the case of a flat background color,<br>this will consist of simply that color. In the case of a gradient, this will consist of each<br>of the color stops. For anything more complicated, this will be an empty array. Images will<br>be ignored (as if the image had failed to load).
---@field computedFontSize? string The computed font size for this node, as a CSS computed value string (e.g. '12px').
---@field computedFontWeight? string The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or<br>'100').
---@class CDP.CSS.getComputedStyleForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@class CDP.CSS.getComputedStyleForNode_return
---@field computedStyle CDP.CSS.CSSComputedStyleProperty[] Computed style for the specified DOM node.
---@class CDP.CSS.getInlineStylesForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@class CDP.CSS.getInlineStylesForNode_return
---@field inlineStyle? CDP.CSS.CSSStyle Inline style for the specified DOM node.
---@field attributesStyle? CDP.CSS.CSSStyle Attribute-defined element style (e.g. resulting from "width=20 height=100%").
---@class CDP.CSS.getMatchedStylesForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@class CDP.CSS.getMatchedStylesForNode_return
---@field inlineStyle? CDP.CSS.CSSStyle Inline style for the specified DOM node.
---@field attributesStyle? CDP.CSS.CSSStyle Attribute-defined element style (e.g. resulting from "width=20 height=100%").
---@field matchedCSSRules? CDP.CSS.RuleMatch[] CSS rules matching this node, from all applicable stylesheets.
---@field pseudoElements? CDP.CSS.PseudoElementMatches[] Pseudo style matches for this node.
---@field inherited? CDP.CSS.InheritedStyleEntry[] A chain of inherited styles (from the immediate node parent up to the DOM tree root).
---@field inheritedPseudoElements? CDP.CSS.InheritedPseudoElementMatches[] A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
---@field cssKeyframesRules? CDP.CSS.CSSKeyframesRule[] A list of CSS keyframed animations matching this node.
---@field cssPositionFallbackRules? CDP.CSS.CSSPositionFallbackRule[] A list of CSS position fallbacks matching this node.
---@field cssPropertyRules? CDP.CSS.CSSPropertyRule[] A list of CSS at-property rules matching this node.
---@field cssPropertyRegistrations? CDP.CSS.CSSPropertyRegistration[] A list of CSS property registrations matching this node.
---@field parentLayoutNodeId? CDP.DOM.NodeId Id of the first parent element that does not have display: contents.
---@class CDP.CSS.getMediaQueries_return
---@field medias CDP.CSS.CSSMedia[]
---@class CDP.CSS.getPlatformFontsForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@class CDP.CSS.getPlatformFontsForNode_return
---@field fonts CDP.CSS.PlatformFontUsage[] Usage statistics for every employed platform font.
---@class CDP.CSS.getStyleSheetText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@class CDP.CSS.getStyleSheetText_return
---@field text string The stylesheet text.
---@class CDP.CSS.getLayersForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@class CDP.CSS.getLayersForNode_return
---@field rootLayer CDP.CSS.CSSLayerData
---@class CDP.CSS.trackComputedStyleUpdates_parameters
---@field propertiesToTrack CDP.CSS.CSSComputedStyleProperty[]
---@class CDP.CSS.takeComputedStyleUpdates_return
---@field nodeIds CDP.DOM.NodeId[] The list of node Ids that have their tracked computed styles updated.
---@class CDP.CSS.setEffectivePropertyValueForNode_parameters
---@field nodeId CDP.DOM.NodeId The element id for which to set property.
---@field propertyName string
---@field value string
---@class CDP.CSS.setKeyframeKey_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field keyText string
---@class CDP.CSS.setKeyframeKey_return
---@field keyText CDP.CSS.Value The resulting key text after modification.
---@class CDP.CSS.setMediaText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field text string
---@class CDP.CSS.setMediaText_return
---@field media CDP.CSS.CSSMedia The resulting CSS media rule after modification.
---@class CDP.CSS.setContainerQueryText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field text string
---@class CDP.CSS.setContainerQueryText_return
---@field containerQuery CDP.CSS.CSSContainerQuery The resulting CSS container query rule after modification.
---@class CDP.CSS.setSupportsText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field text string
---@class CDP.CSS.setSupportsText_return
---@field supports CDP.CSS.CSSSupports The resulting CSS Supports rule after modification.
---@class CDP.CSS.setScopeText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field text string
---@class CDP.CSS.setScopeText_return
---@field scope CDP.CSS.CSSScope The resulting CSS Scope rule after modification.
---@class CDP.CSS.setRuleSelector_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field range CDP.CSS.SourceRange
---@field selector string
---@class CDP.CSS.setRuleSelector_return
---@field selectorList CDP.CSS.SelectorList The resulting selector list after modification.
---@class CDP.CSS.setStyleSheetText_parameters
---@field styleSheetId CDP.CSS.StyleSheetId
---@field text string
---@class CDP.CSS.setStyleSheetText_return
---@field sourceMapURL? string URL of source map associated with script (if any).
---@class CDP.CSS.setStyleTexts_parameters
---@field edits CDP.CSS.StyleDeclarationEdit[]
---@class CDP.CSS.setStyleTexts_return
---@field styles CDP.CSS.CSSStyle[] The resulting styles after modification.
---@class CDP.CSS.stopRuleUsageTracking_return
---@field ruleUsage CDP.CSS.RuleUsage[]
---@class CDP.CSS.takeCoverageDelta_return
---@field coverage CDP.CSS.RuleUsage[]
---@field timestamp number Monotonically increasing time, in seconds.
---@class CDP.CSS.setLocalFontsEnabled_parameters
---@field enabled boolean Whether rendering of local fonts is enabled.
---@class CDP.CSS.fontsUpdated_event
---@field font? CDP.CSS.FontFace The web font that has loaded.
---@class CDP.CSS.styleSheetAdded_event
---@field header CDP.CSS.CSSStyleSheetHeader Added stylesheet metainfo.
---@class CDP.CSS.styleSheetChanged_event
---@field styleSheetId CDP.CSS.StyleSheetId
---@class CDP.CSS.styleSheetRemoved_event
---@field styleSheetId CDP.CSS.StyleSheetId Identifier of the removed stylesheet.
---This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
---have an associated `id` used in subsequent operations on the related object. Each object type has
---a specific `id` structure, and those are not interchangeable between objects of different kinds.
---CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
---can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
---subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
---@class CDP.CSS: CDP._ClientContainer
---Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
---position specified by `location`.
---@field addRule fun(self: CDP._ClientContainer, params: CDP.CSS.addRule_parameters): CDP.Error?, CDP.CSS.addRule_return?
---Returns all class names from specified stylesheet.
---@field collectClassNames fun(self: CDP._ClientContainer, params: CDP.CSS.collectClassNames_parameters): CDP.Error?, CDP.CSS.collectClassNames_return?
---Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
---@field createStyleSheet fun(self: CDP._ClientContainer, params: CDP.CSS.createStyleSheet_parameters): CDP.Error?, CDP.CSS.createStyleSheet_return?
---Disables the CSS agent for the given page.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
---enabled until the result of this command is received.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Ensures that the given node will have specified pseudo-classes whenever its style is computed by
---the browser.
---@field forcePseudoState fun(self: CDP._ClientContainer, params: CDP.CSS.forcePseudoState_parameters): CDP.Error?
---@field getBackgroundColors fun(self: CDP._ClientContainer, params: CDP.CSS.getBackgroundColors_parameters): CDP.Error?, CDP.CSS.getBackgroundColors_return?
---Returns the computed style for a DOM node identified by `nodeId`.
---@field getComputedStyleForNode fun(self: CDP._ClientContainer, params: CDP.CSS.getComputedStyleForNode_parameters): CDP.Error?, CDP.CSS.getComputedStyleForNode_return?
---Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
---attributes) for a DOM node identified by `nodeId`.
---@field getInlineStylesForNode fun(self: CDP._ClientContainer, params: CDP.CSS.getInlineStylesForNode_parameters): CDP.Error?, CDP.CSS.getInlineStylesForNode_return?
---Returns requested styles for a DOM node identified by `nodeId`.
---@field getMatchedStylesForNode fun(self: CDP._ClientContainer, params: CDP.CSS.getMatchedStylesForNode_parameters): CDP.Error?, CDP.CSS.getMatchedStylesForNode_return?
---Returns all media queries parsed by the rendering engine.
---@field getMediaQueries fun(self: CDP._ClientContainer): CDP.Error?, CDP.CSS.getMediaQueries_return?
---Requests information about platform fonts which we used to render child TextNodes in the given
---node.
---@field getPlatformFontsForNode fun(self: CDP._ClientContainer, params: CDP.CSS.getPlatformFontsForNode_parameters): CDP.Error?, CDP.CSS.getPlatformFontsForNode_return?
---Returns the current textual content for a stylesheet.
---@field getStyleSheetText fun(self: CDP._ClientContainer, params: CDP.CSS.getStyleSheetText_parameters): CDP.Error?, CDP.CSS.getStyleSheetText_return?
---Returns all layers parsed by the rendering engine for the tree scope of a node.
---Given a DOM element identified by nodeId, getLayersForNode returns the root
---layer for the nearest ancestor document or shadow root. The layer root contains
---the full layer tree for the tree scope and their ordering.
---@field getLayersForNode fun(self: CDP._ClientContainer, params: CDP.CSS.getLayersForNode_parameters): CDP.Error?, CDP.CSS.getLayersForNode_return?
---Starts tracking the given computed styles for updates. The specified array of properties
---replaces the one previously specified. Pass empty array to disable tracking.
---Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
---The changes to computed style properties are only tracked for nodes pushed to the front-end
---by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
---to the front-end, no updates will be issued for the node.
---@field trackComputedStyleUpdates fun(self: CDP._ClientContainer, params: CDP.CSS.trackComputedStyleUpdates_parameters): CDP.Error?
---Polls the next batch of computed style updates.
---@field takeComputedStyleUpdates fun(self: CDP._ClientContainer): CDP.Error?, CDP.CSS.takeComputedStyleUpdates_return?
---Find a rule with the given active property for the given node and set the new value for this
---property
---@field setEffectivePropertyValueForNode fun(self: CDP._ClientContainer, params: CDP.CSS.setEffectivePropertyValueForNode_parameters): CDP.Error?
---Modifies the keyframe rule key text.
---@field setKeyframeKey fun(self: CDP._ClientContainer, params: CDP.CSS.setKeyframeKey_parameters): CDP.Error?, CDP.CSS.setKeyframeKey_return?
---Modifies the rule selector.
---@field setMediaText fun(self: CDP._ClientContainer, params: CDP.CSS.setMediaText_parameters): CDP.Error?, CDP.CSS.setMediaText_return?
---Modifies the expression of a container query.
---@field setContainerQueryText fun(self: CDP._ClientContainer, params: CDP.CSS.setContainerQueryText_parameters): CDP.Error?, CDP.CSS.setContainerQueryText_return?
---Modifies the expression of a supports at-rule.
---@field setSupportsText fun(self: CDP._ClientContainer, params: CDP.CSS.setSupportsText_parameters): CDP.Error?, CDP.CSS.setSupportsText_return?
---Modifies the expression of a scope at-rule.
---@field setScopeText fun(self: CDP._ClientContainer, params: CDP.CSS.setScopeText_parameters): CDP.Error?, CDP.CSS.setScopeText_return?
---Modifies the rule selector.
---@field setRuleSelector fun(self: CDP._ClientContainer, params: CDP.CSS.setRuleSelector_parameters): CDP.Error?, CDP.CSS.setRuleSelector_return?
---Sets the new stylesheet text.
---@field setStyleSheetText fun(self: CDP._ClientContainer, params: CDP.CSS.setStyleSheetText_parameters): CDP.Error?, CDP.CSS.setStyleSheetText_return?
---Applies specified style edits one after another in the given order.
---@field setStyleTexts fun(self: CDP._ClientContainer, params: CDP.CSS.setStyleTexts_parameters): CDP.Error?, CDP.CSS.setStyleTexts_return?
---Enables the selector recording.
---@field startRuleUsageTracking fun(self: CDP._ClientContainer): CDP.Error?
---Stop tracking rule usage and return the list of rules that were used since last call to
---`takeCoverageDelta` (or since start of coverage instrumentation).
---@field stopRuleUsageTracking fun(self: CDP._ClientContainer): CDP.Error?, CDP.CSS.stopRuleUsageTracking_return?
---Obtain list of rules that became used since last call to this method (or since start of coverage
---instrumentation).
---@field takeCoverageDelta fun(self: CDP._ClientContainer): CDP.Error?, CDP.CSS.takeCoverageDelta_return?
---Enables/disables rendering of local CSS fonts (enabled by default).
---@field setLocalFontsEnabled fun(self: CDP._ClientContainer, params: CDP.CSS.setLocalFontsEnabled_parameters): CDP.Error?
---Fires whenever a web font is updated.  A non-empty font parameter indicates a successfully loaded
---web font.
---@field fontsUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.CSS.fontsUpdated_event)): CDP.Error?
---Fires whenever a MediaQuery result changes (for example, after a browser window has been
---resized.) The current implementation considers only viewport-dependent media features.
---@field mediaQueryResultChanged fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired whenever an active document stylesheet is added.
---@field styleSheetAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.CSS.styleSheetAdded_event)): CDP.Error?
---Fired whenever a stylesheet is changed as a result of the client operation.
---@field styleSheetChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.CSS.styleSheetChanged_event)): CDP.Error?
---Fired whenever an active document stylesheet is removed.
---@field styleSheetRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.CSS.styleSheetRemoved_event)): CDP.Error?

---@alias CDP.CacheStorage.CacheId string Unique identifier of the Cache object.
---@alias CDP.CacheStorage.CachedResponseType "basic" | "cors" | "default" | "error" | "opaqueResponse" | "opaqueRedirect" type of HTTP response cached
---Data entry.
---@class CDP.CacheStorage.DataEntry
---@field requestURL string Request URL.
---@field requestMethod string Request method.
---@field requestHeaders CDP.CacheStorage.Header[] Request headers
---@field responseTime number Number of seconds since epoch.
---@field responseStatus integer HTTP response status code.
---@field responseStatusText string HTTP response status text.
---@field responseType CDP.CacheStorage.CachedResponseType HTTP response type
---@field responseHeaders CDP.CacheStorage.Header[] Response headers
---Cache identifier.
---@class CDP.CacheStorage.Cache
---@field cacheId CDP.CacheStorage.CacheId An opaque unique id of the cache.
---@field securityOrigin string Security origin of the cache.
---@field storageKey string Storage key of the cache.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket of the cache.
---@field cacheName string The name of the cache.
---@class CDP.CacheStorage.Header
---@field name string
---@field value string
---Cached response
---@class CDP.CacheStorage.CachedResponse
---@field body string Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)
---@class CDP.CacheStorage.deleteCache_parameters
---@field cacheId CDP.CacheStorage.CacheId Id of cache for deletion.
---@class CDP.CacheStorage.deleteEntry_parameters
---@field cacheId CDP.CacheStorage.CacheId Id of cache where the entry will be deleted.
---@field request string URL spec of the request.
---@class CDP.CacheStorage.requestCacheNames_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@class CDP.CacheStorage.requestCacheNames_return
---@field caches CDP.CacheStorage.Cache[] Caches for the security origin.
---@class CDP.CacheStorage.requestCachedResponse_parameters
---@field cacheId CDP.CacheStorage.CacheId Id of cache that contains the entry.
---@field requestURL string URL spec of the request.
---@field requestHeaders CDP.CacheStorage.Header[] headers of the request.
---@class CDP.CacheStorage.requestCachedResponse_return
---@field response CDP.CacheStorage.CachedResponse Response read from the cache.
---@class CDP.CacheStorage.requestEntries_parameters
---@field cacheId CDP.CacheStorage.CacheId ID of cache to get entries from.
---@field skipCount? integer Number of records to skip.
---@field pageSize? integer Number of records to fetch.
---@field pathFilter? string If present, only return the entries containing this substring in the path
---@class CDP.CacheStorage.requestEntries_return
---@field cacheDataEntries CDP.CacheStorage.DataEntry[] Array of object store data entries.
---@field returnCount number Count of returned entries from this storage. If pathFilter is empty, it<br>is the count of all entries from this storage.
---@class CDP.CacheStorage: CDP._ClientContainer
---Deletes a cache.
---@field deleteCache fun(self: CDP._ClientContainer, params: CDP.CacheStorage.deleteCache_parameters): CDP.Error?
---Deletes a cache entry.
---@field deleteEntry fun(self: CDP._ClientContainer, params: CDP.CacheStorage.deleteEntry_parameters): CDP.Error?
---Requests cache names.
---@field requestCacheNames fun(self: CDP._ClientContainer, params: CDP.CacheStorage.requestCacheNames_parameters): CDP.Error?, CDP.CacheStorage.requestCacheNames_return?
---Fetches cache entry.
---@field requestCachedResponse fun(self: CDP._ClientContainer, params: CDP.CacheStorage.requestCachedResponse_parameters): CDP.Error?, CDP.CacheStorage.requestCachedResponse_return?
---Requests data from cache.
---@field requestEntries fun(self: CDP._ClientContainer, params: CDP.CacheStorage.requestEntries_parameters): CDP.Error?, CDP.CacheStorage.requestEntries_return?

---@class CDP.Cast.Sink
---@field name string
---@field id string
---@field session? string Text describing the current session. Present only if there is an active<br>session on the sink.
---@class CDP.Cast.enable_parameters
---@field presentationUrl? string
---@class CDP.Cast.setSinkToUse_parameters
---@field sinkName string
---@class CDP.Cast.startDesktopMirroring_parameters
---@field sinkName string
---@class CDP.Cast.startTabMirroring_parameters
---@field sinkName string
---@class CDP.Cast.stopCasting_parameters
---@field sinkName string
---@class CDP.Cast.sinksUpdated_event
---@field sinks CDP.Cast.Sink[]
---@class CDP.Cast.issueUpdated_event
---@field issueMessage string
---A domain for interacting with Cast, Presentation API, and Remote Playback API
---functionalities.
---@class CDP.Cast: CDP._ClientContainer
---Starts observing for sinks that can be used for tab mirroring, and if set,
---sinks compatible with |presentationUrl| as well. When sinks are found, a
---`|sinksUpdated| event is fired.
---Also starts observing for issue messages. When an issue is added or removed,
---an |issueUpdated| event is fired.
---@field enable fun(self: CDP._ClientContainer, params: CDP.Cast.enable_parameters): CDP.Error?
---Stops observing for sinks and issues.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Sets a sink to be used when the web page requests the browser to choose a
---sink via Presentation API, Remote Playback API, or Cast SDK.
---@field setSinkToUse fun(self: CDP._ClientContainer, params: CDP.Cast.setSinkToUse_parameters): CDP.Error?
---Starts mirroring the desktop to the sink.
---@field startDesktopMirroring fun(self: CDP._ClientContainer, params: CDP.Cast.startDesktopMirroring_parameters): CDP.Error?
---Starts mirroring the tab to the sink.
---@field startTabMirroring fun(self: CDP._ClientContainer, params: CDP.Cast.startTabMirroring_parameters): CDP.Error?
---Stops the active Cast session on the sink.
---@field stopCasting fun(self: CDP._ClientContainer, params: CDP.Cast.stopCasting_parameters): CDP.Error?
---This is fired whenever the list of available sinks changes. A sink is a
---device or a software surface that you can cast to.
---@field sinksUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Cast.sinksUpdated_event)): CDP.Error?
---This is fired whenever the outstanding issue/error message changes.
---`|issueMessage| is empty if there is no issue.
---@field issueUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Cast.issueUpdated_event)): CDP.Error?

---@alias CDP.DOM.NodeId integer Unique DOM node identifier.
---@alias CDP.DOM.BackendNodeId integer Unique DOM node identifier used to reference a node that may not have been pushed to the<br>front-end.
---Backend node with a friendly name.
---@class CDP.DOM.BackendNode
---@field nodeType integer `Node`'s nodeType.
---@field nodeName string `Node`'s nodeName.
---@field backendNodeId CDP.DOM.BackendNodeId
---@alias CDP.DOM.PseudoType "first-line" | "first-letter" | "before" | "after" | "marker" | "backdrop" | "selection" | "target-text" | "spelling-error" | "grammar-error" | "highlight" | "first-line-inherited" | "scrollbar" | "scrollbar-thumb" | "scrollbar-button" | "scrollbar-track" | "scrollbar-track-piece" | "scrollbar-corner" | "resizer" | "input-list-button" | "view-transition" | "view-transition-group" | "view-transition-image-pair" | "view-transition-old" | "view-transition-new" Pseudo element type.
---@alias CDP.DOM.ShadowRootType "user-agent" | "open" | "closed" Shadow root type.
---@alias CDP.DOM.CompatibilityMode "QuirksMode" | "LimitedQuirksMode" | "NoQuirksMode" Document compatibility mode.
---@alias CDP.DOM.PhysicalAxes "Horizontal" | "Vertical" | "Both" ContainerSelector physical axes
---@alias CDP.DOM.LogicalAxes "Inline" | "Block" | "Both" ContainerSelector logical axes
---DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
---DOMNode is a base node mirror type.
---@class CDP.DOM.Node
---@field nodeId CDP.DOM.NodeId Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend<br>will only push node with given `id` once. It is aware of all requested nodes and will only<br>fire DOM events for nodes known to the client.
---@field parentId? CDP.DOM.NodeId The id of the parent node if any.
---@field backendNodeId CDP.DOM.BackendNodeId The BackendNodeId for this node.
---@field nodeType integer `Node`'s nodeType.
---@field nodeName string `Node`'s nodeName.
---@field localName string `Node`'s localName.
---@field nodeValue string `Node`'s nodeValue.
---@field childNodeCount? integer Child count for `Container` nodes.
---@field children? CDP.DOM.Node[] Child nodes of this node when requested with children.
---@field attributes? string[] Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
---@field documentURL? string Document URL that `Document` or `FrameOwner` node points to.
---@field baseURL? string Base URL that `Document` or `FrameOwner` node uses for URL completion.
---@field publicId? string `DocumentType`'s publicId.
---@field systemId? string `DocumentType`'s systemId.
---@field internalSubset? string `DocumentType`'s internalSubset.
---@field xmlVersion? string `Document`'s XML version in case of XML documents.
---@field name? string `Attr`'s name.
---@field value? string `Attr`'s value.
---@field pseudoType? CDP.DOM.PseudoType Pseudo element type for this node.
---@field pseudoIdentifier? string Pseudo element identifier for this node. Only present if there is a<br>valid pseudoType.
---@field shadowRootType? CDP.DOM.ShadowRootType Shadow root type.
---@field frameId? CDP.Page.FrameId Frame ID for frame owner elements.
---@field contentDocument? CDP.DOM.Node Content document for frame owner elements.
---@field shadowRoots? CDP.DOM.Node[] Shadow root list for given element host.
---@field templateContent? CDP.DOM.Node Content document fragment for template elements.
---@field pseudoElements? CDP.DOM.Node[] Pseudo elements associated with this node.
---@field importedDocument? CDP.DOM.Node Deprecated, as the HTML Imports API has been removed (crbug.com/937746).<br>This property used to return the imported document for the HTMLImport links.<br>The property is always undefined now.
---@field distributedNodes? CDP.DOM.BackendNode[] Distributed nodes for given insertion point.
---@field isSVG? boolean Whether the node is SVG.
---@field compatibilityMode? CDP.DOM.CompatibilityMode
---@field assignedSlot? CDP.DOM.BackendNode
---A structure holding an RGBA color.
---@class CDP.DOM.RGBA
---@field r integer The red component, in the [0-255] range.
---@field g integer The green component, in the [0-255] range.
---@field b integer The blue component, in the [0-255] range.
---@field a? number The alpha component, in the [0-1] range (default: 1).
---@alias CDP.DOM.Quad number[] An array of quad vertices, x immediately followed by y for each point, points clock-wise.
---Box model.
---@class CDP.DOM.BoxModel
---@field content CDP.DOM.Quad Content box
---@field padding CDP.DOM.Quad Padding box
---@field border CDP.DOM.Quad Border box
---@field margin CDP.DOM.Quad Margin box
---@field width integer Node width
---@field height integer Node height
---@field shapeOutside? CDP.DOM.ShapeOutsideInfo Shape outside coordinates
---CSS Shape Outside details.
---@class CDP.DOM.ShapeOutsideInfo
---@field bounds CDP.DOM.Quad Shape bounds
---@field shape any[] Shape coordinate details
---@field marginShape any[] Margin shape bounds
---Rectangle.
---@class CDP.DOM.Rect
---@field x number X coordinate
---@field y number Y coordinate
---@field width number Rectangle width
---@field height number Rectangle height
---@class CDP.DOM.CSSComputedStyleProperty
---@field name string Computed style property name.
---@field value string Computed style property value.
---@class CDP.DOM.collectClassNamesFromSubtree_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to collect class names.
---@class CDP.DOM.collectClassNamesFromSubtree_return
---@field classNames string[] Class name list.
---@class CDP.DOM.copyTo_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to copy.
---@field targetNodeId CDP.DOM.NodeId Id of the element to drop the copy into.
---@field insertBeforeNodeId? CDP.DOM.NodeId Drop the copy before this node (if absent, the copy becomes the last child of<br>`targetNodeId`).
---@class CDP.DOM.copyTo_return
---@field nodeId CDP.DOM.NodeId Id of the node clone.
---@class CDP.DOM.describeNode_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@field depth? integer The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the<br>entire subtree or provide an integer larger than 0.
---@field pierce? boolean Whether or not iframes and shadow roots should be traversed when returning the subtree<br>(default is false).
---@class CDP.DOM.describeNode_return
---@field node CDP.DOM.Node Node description.
---@class CDP.DOM.scrollIntoViewIfNeeded_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@field rect? CDP.DOM.Rect The rect to be scrolled into view, relative to the node's border box, in CSS pixels.<br>When omitted, center of the node will be used, similar to Element.scrollIntoView.
---@class CDP.DOM.discardSearchResults_parameters
---@field searchId string Unique search session identifier.
---@class CDP.DOM.enable_parameters
---@field includeWhitespace? "none" | "all" Whether to include whitespaces in the children array of returned Nodes.
---@class CDP.DOM.focus_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.getAttributes_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to retrieve attibutes for.
---@class CDP.DOM.getAttributes_return
---@field attributes string[] An interleaved array of node attribute names and values.
---@class CDP.DOM.getBoxModel_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.getBoxModel_return
---@field model CDP.DOM.BoxModel Box model for the node.
---@class CDP.DOM.getContentQuads_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.getContentQuads_return
---@field quads CDP.DOM.Quad[] Quads that describe node layout relative to viewport.
---@class CDP.DOM.getDocument_parameters
---@field depth? integer The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the<br>entire subtree or provide an integer larger than 0.
---@field pierce? boolean Whether or not iframes and shadow roots should be traversed when returning the subtree<br>(default is false).
---@class CDP.DOM.getDocument_return
---@field root CDP.DOM.Node Resulting node.
---@class CDP.DOM.getFlattenedDocument_parameters
---@field depth? integer The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the<br>entire subtree or provide an integer larger than 0.
---@field pierce? boolean Whether or not iframes and shadow roots should be traversed when returning the subtree<br>(default is false).
---@class CDP.DOM.getFlattenedDocument_return
---@field nodes CDP.DOM.Node[] Resulting node.
---@class CDP.DOM.getNodesForSubtreeByStyle_parameters
---@field nodeId CDP.DOM.NodeId Node ID pointing to the root of a subtree.
---@field computedStyles CDP.DOM.CSSComputedStyleProperty[] The style to filter nodes by (includes nodes if any of properties matches).
---@field pierce? boolean Whether or not iframes and shadow roots in the same target should be traversed when returning the<br>results (default is false).
---@class CDP.DOM.getNodesForSubtreeByStyle_return
---@field nodeIds CDP.DOM.NodeId[] Resulting nodes.
---@class CDP.DOM.getNodeForLocation_parameters
---@field x integer X coordinate.
---@field y integer Y coordinate.
---@field includeUserAgentShadowDOM? boolean False to skip to the nearest non-UA shadow root ancestor (default: false).
---@field ignorePointerEventsNone? boolean Whether to ignore pointer-events: none on elements and hit test them.
---@class CDP.DOM.getNodeForLocation_return
---@field backendNodeId CDP.DOM.BackendNodeId Resulting node.
---@field frameId CDP.Page.FrameId Frame this node belongs to.
---@field nodeId? CDP.DOM.NodeId Id of the node at given coordinates, only when enabled and requested document.
---@class CDP.DOM.getOuterHTML_parameters
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.getOuterHTML_return
---@field outerHTML string Outer HTML markup.
---@class CDP.DOM.getRelayoutBoundary_parameters
---@field nodeId CDP.DOM.NodeId Id of the node.
---@class CDP.DOM.getRelayoutBoundary_return
---@field nodeId CDP.DOM.NodeId Relayout boundary node id for the given node.
---@class CDP.DOM.getSearchResults_parameters
---@field searchId string Unique search session identifier.
---@field fromIndex integer Start index of the search result to be returned.
---@field toIndex integer End index of the search result to be returned.
---@class CDP.DOM.getSearchResults_return
---@field nodeIds CDP.DOM.NodeId[] Ids of the search result nodes.
---@class CDP.DOM.moveTo_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to move.
---@field targetNodeId CDP.DOM.NodeId Id of the element to drop the moved node into.
---@field insertBeforeNodeId? CDP.DOM.NodeId Drop node before this one (if absent, the moved node becomes the last child of<br>`targetNodeId`).
---@class CDP.DOM.moveTo_return
---@field nodeId CDP.DOM.NodeId New id of the moved node.
---@class CDP.DOM.performSearch_parameters
---@field query string Plain text or query selector or XPath search query.
---@field includeUserAgentShadowDOM? boolean True to search in user agent shadow DOM.
---@class CDP.DOM.performSearch_return
---@field searchId string Unique search session identifier.
---@field resultCount integer Number of search results.
---@class CDP.DOM.pushNodeByPathToFrontend_parameters
---@field path string Path to node in the proprietary format.
---@class CDP.DOM.pushNodeByPathToFrontend_return
---@field nodeId CDP.DOM.NodeId Id of the node for given path.
---@class CDP.DOM.pushNodesByBackendIdsToFrontend_parameters
---@field backendNodeIds CDP.DOM.BackendNodeId[] The array of backend node ids.
---@class CDP.DOM.pushNodesByBackendIdsToFrontend_return
---@field nodeIds CDP.DOM.NodeId[] The array of ids of pushed nodes that correspond to the backend ids specified in<br>backendNodeIds.
---@class CDP.DOM.querySelector_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to query upon.
---@field selector string Selector string.
---@class CDP.DOM.querySelector_return
---@field nodeId CDP.DOM.NodeId Query selector result.
---@class CDP.DOM.querySelectorAll_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to query upon.
---@field selector string Selector string.
---@class CDP.DOM.querySelectorAll_return
---@field nodeIds CDP.DOM.NodeId[] Query selector result.
---@class CDP.DOM.getTopLayerElements_return
---@field nodeIds CDP.DOM.NodeId[] NodeIds of top layer elements
---@class CDP.DOM.removeAttribute_parameters
---@field nodeId CDP.DOM.NodeId Id of the element to remove attribute from.
---@field name string Name of the attribute to remove.
---@class CDP.DOM.removeNode_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to remove.
---@class CDP.DOM.requestChildNodes_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to get children for.
---@field depth? integer The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the<br>entire subtree or provide an integer larger than 0.
---@field pierce? boolean Whether or not iframes and shadow roots should be traversed when returning the sub-tree<br>(default is false).
---@class CDP.DOM.requestNode_parameters
---@field objectId CDP.Runtime.RemoteObjectId JavaScript object id to convert into node.
---@class CDP.DOM.requestNode_return
---@field nodeId CDP.DOM.NodeId Node id for given object.
---@class CDP.DOM.resolveNode_parameters
---@field nodeId? CDP.DOM.NodeId Id of the node to resolve.
---@field backendNodeId? CDP.DOM.BackendNodeId Backend identifier of the node to resolve.
---@field objectGroup? string Symbolic group name that can be used to release multiple objects.
---@field executionContextId? CDP.Runtime.ExecutionContextId Execution context in which to resolve the node.
---@class CDP.DOM.resolveNode_return
---@field object CDP.Runtime.RemoteObject JavaScript object wrapper for given node.
---@class CDP.DOM.setAttributeValue_parameters
---@field nodeId CDP.DOM.NodeId Id of the element to set attribute for.
---@field name string Attribute name.
---@field value string Attribute value.
---@class CDP.DOM.setAttributesAsText_parameters
---@field nodeId CDP.DOM.NodeId Id of the element to set attributes for.
---@field text string Text with a number of attributes. Will parse this text using HTML parser.
---@field name? string Attribute name to replace with new attributes derived from text in case text parsed<br>successfully.
---@class CDP.DOM.setFileInputFiles_parameters
---@field files string[] Array of file paths to set.
---@field nodeId? CDP.DOM.NodeId Identifier of the node.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.setNodeStackTracesEnabled_parameters
---@field enable boolean Enable or disable.
---@class CDP.DOM.getNodeStackTraces_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to get stack traces for.
---@class CDP.DOM.getNodeStackTraces_return
---@field creation? CDP.Runtime.StackTrace Creation stack trace, if available.
---@class CDP.DOM.getFileInfo_parameters
---@field objectId CDP.Runtime.RemoteObjectId JavaScript object id of the node wrapper.
---@class CDP.DOM.getFileInfo_return
---@field path string
---@class CDP.DOM.setInspectedNode_parameters
---@field nodeId CDP.DOM.NodeId DOM node id to be accessible by means of $x command line API.
---@class CDP.DOM.setNodeName_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to set name for.
---@field name string New node's name.
---@class CDP.DOM.setNodeName_return
---@field nodeId CDP.DOM.NodeId New node's id.
---@class CDP.DOM.setNodeValue_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to set value for.
---@field value string New node's value.
---@class CDP.DOM.setOuterHTML_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to set markup for.
---@field outerHTML string Outer HTML markup to set.
---@class CDP.DOM.getFrameOwner_parameters
---@field frameId CDP.Page.FrameId
---@class CDP.DOM.getFrameOwner_return
---@field backendNodeId CDP.DOM.BackendNodeId Resulting node.
---@field nodeId? CDP.DOM.NodeId Id of the node at given coordinates, only when enabled and requested document.
---@class CDP.DOM.getContainerForNode_parameters
---@field nodeId CDP.DOM.NodeId
---@field containerName? string
---@field physicalAxes? CDP.DOM.PhysicalAxes
---@field logicalAxes? CDP.DOM.LogicalAxes
---@class CDP.DOM.getContainerForNode_return
---@field nodeId? CDP.DOM.NodeId The container node for the given node, or null if not found.
---@class CDP.DOM.getQueryingDescendantsForContainer_parameters
---@field nodeId CDP.DOM.NodeId Id of the container node to find querying descendants from.
---@class CDP.DOM.getQueryingDescendantsForContainer_return
---@field nodeIds CDP.DOM.NodeId[] Descendant nodes with container queries against the given container.
---@class CDP.DOM.attributeModified_event
---@field nodeId CDP.DOM.NodeId Id of the node that has changed.
---@field name string Attribute name.
---@field value string Attribute value.
---@class CDP.DOM.attributeRemoved_event
---@field nodeId CDP.DOM.NodeId Id of the node that has changed.
---@field name string A ttribute name.
---@class CDP.DOM.characterDataModified_event
---@field nodeId CDP.DOM.NodeId Id of the node that has changed.
---@field characterData string New text value.
---@class CDP.DOM.childNodeCountUpdated_event
---@field nodeId CDP.DOM.NodeId Id of the node that has changed.
---@field childNodeCount integer New node count.
---@class CDP.DOM.childNodeInserted_event
---@field parentNodeId CDP.DOM.NodeId Id of the node that has changed.
---@field previousNodeId CDP.DOM.NodeId Id of the previous sibling.
---@field node CDP.DOM.Node Inserted node data.
---@class CDP.DOM.childNodeRemoved_event
---@field parentNodeId CDP.DOM.NodeId Parent id.
---@field nodeId CDP.DOM.NodeId Id of the node that has been removed.
---@class CDP.DOM.distributedNodesUpdated_event
---@field insertionPointId CDP.DOM.NodeId Insertion point where distributed nodes were updated.
---@field distributedNodes CDP.DOM.BackendNode[] Distributed nodes for given insertion point.
---@class CDP.DOM.inlineStyleInvalidated_event
---@field nodeIds CDP.DOM.NodeId[] Ids of the nodes for which the inline styles have been invalidated.
---@class CDP.DOM.pseudoElementAdded_event
---@field parentId CDP.DOM.NodeId Pseudo element's parent element id.
---@field pseudoElement CDP.DOM.Node The added pseudo element.
---@class CDP.DOM.pseudoElementRemoved_event
---@field parentId CDP.DOM.NodeId Pseudo element's parent element id.
---@field pseudoElementId CDP.DOM.NodeId The removed pseudo element id.
---@class CDP.DOM.setChildNodes_event
---@field parentId CDP.DOM.NodeId Parent node id to populate with children.
---@field nodes CDP.DOM.Node[] Child nodes array.
---@class CDP.DOM.shadowRootPopped_event
---@field hostId CDP.DOM.NodeId Host element id.
---@field rootId CDP.DOM.NodeId Shadow root id.
---@class CDP.DOM.shadowRootPushed_event
---@field hostId CDP.DOM.NodeId Host element id.
---@field root CDP.DOM.Node Shadow root.
---This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
---that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
---the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
---nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
---and never sends the same node twice. It is client's responsibility to collect information about
---the nodes that were sent to the client. Note that `iframe` owner elements will return
---corresponding document elements as their child nodes.
---@class CDP.DOM: CDP._ClientContainer
---Collects class names for the node with given id and all of it's child nodes.
---@field collectClassNamesFromSubtree fun(self: CDP._ClientContainer, params: CDP.DOM.collectClassNamesFromSubtree_parameters): CDP.Error?, CDP.DOM.collectClassNamesFromSubtree_return?
---Creates a deep copy of the specified node and places it into the target container before the
---given anchor.
---@field copyTo fun(self: CDP._ClientContainer, params: CDP.DOM.copyTo_parameters): CDP.Error?, CDP.DOM.copyTo_return?
---Describes node given its id, does not require domain to be enabled. Does not start tracking any
---objects, can be used for automation.
---@field describeNode fun(self: CDP._ClientContainer, params: CDP.DOM.describeNode_parameters): CDP.Error?, CDP.DOM.describeNode_return?
---Scrolls the specified rect of the given node into view if not already visible.
---Note: exactly one between nodeId, backendNodeId and objectId should be passed
---to identify the node.
---@field scrollIntoViewIfNeeded fun(self: CDP._ClientContainer, params: CDP.DOM.scrollIntoViewIfNeeded_parameters): CDP.Error?
---Disables DOM agent for the given page.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Discards search results from the session with the given id. `getSearchResults` should no longer
---be called for that search.
---@field discardSearchResults fun(self: CDP._ClientContainer, params: CDP.DOM.discardSearchResults_parameters): CDP.Error?
---Enables DOM agent for the given page.
---@field enable fun(self: CDP._ClientContainer, params: CDP.DOM.enable_parameters): CDP.Error?
---Focuses the given element.
---@field focus fun(self: CDP._ClientContainer, params: CDP.DOM.focus_parameters): CDP.Error?
---Returns attributes for the specified node.
---@field getAttributes fun(self: CDP._ClientContainer, params: CDP.DOM.getAttributes_parameters): CDP.Error?, CDP.DOM.getAttributes_return?
---Returns boxes for the given node.
---@field getBoxModel fun(self: CDP._ClientContainer, params: CDP.DOM.getBoxModel_parameters): CDP.Error?, CDP.DOM.getBoxModel_return?
---Returns quads that describe node position on the page. This method
---might return multiple quads for inline nodes.
---@field getContentQuads fun(self: CDP._ClientContainer, params: CDP.DOM.getContentQuads_parameters): CDP.Error?, CDP.DOM.getContentQuads_return?
---Returns the root DOM node (and optionally the subtree) to the caller.
---Implicitly enables the DOM domain events for the current target.
---@field getDocument fun(self: CDP._ClientContainer, params: CDP.DOM.getDocument_parameters): CDP.Error?, CDP.DOM.getDocument_return?
---Returns the root DOM node (and optionally the subtree) to the caller.
---Deprecated, as it is not designed to work well with the rest of the DOM agent.
---Use DOMSnapshot.captureSnapshot instead.
---@field getFlattenedDocument fun(self: CDP._ClientContainer, params: CDP.DOM.getFlattenedDocument_parameters): CDP.Error?, CDP.DOM.getFlattenedDocument_return?
---Finds nodes with a given computed style in a subtree.
---@field getNodesForSubtreeByStyle fun(self: CDP._ClientContainer, params: CDP.DOM.getNodesForSubtreeByStyle_parameters): CDP.Error?, CDP.DOM.getNodesForSubtreeByStyle_return?
---Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
---either returned or not.
---@field getNodeForLocation fun(self: CDP._ClientContainer, params: CDP.DOM.getNodeForLocation_parameters): CDP.Error?, CDP.DOM.getNodeForLocation_return?
---Returns node's HTML markup.
---@field getOuterHTML fun(self: CDP._ClientContainer, params: CDP.DOM.getOuterHTML_parameters): CDP.Error?, CDP.DOM.getOuterHTML_return?
---Returns the id of the nearest ancestor that is a relayout boundary.
---@field getRelayoutBoundary fun(self: CDP._ClientContainer, params: CDP.DOM.getRelayoutBoundary_parameters): CDP.Error?, CDP.DOM.getRelayoutBoundary_return?
---Returns search results from given `fromIndex` to given `toIndex` from the search with the given
---identifier.
---@field getSearchResults fun(self: CDP._ClientContainer, params: CDP.DOM.getSearchResults_parameters): CDP.Error?, CDP.DOM.getSearchResults_return?
---Hides any highlight.
---@field hideHighlight fun(self: CDP._ClientContainer): CDP.Error?
---Highlights DOM node.
---@field highlightNode fun(self: CDP._ClientContainer): CDP.Error?
---Highlights given rectangle.
---@field highlightRect fun(self: CDP._ClientContainer): CDP.Error?
---Marks last undoable state.
---@field markUndoableState fun(self: CDP._ClientContainer): CDP.Error?
---Moves node into the new container, places it before the given anchor.
---@field moveTo fun(self: CDP._ClientContainer, params: CDP.DOM.moveTo_parameters): CDP.Error?, CDP.DOM.moveTo_return?
---Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
---`cancelSearch` to end this search session.
---@field performSearch fun(self: CDP._ClientContainer, params: CDP.DOM.performSearch_parameters): CDP.Error?, CDP.DOM.performSearch_return?
---Requests that the node is sent to the caller given its path. // FIXME, use XPath
---@field pushNodeByPathToFrontend fun(self: CDP._ClientContainer, params: CDP.DOM.pushNodeByPathToFrontend_parameters): CDP.Error?, CDP.DOM.pushNodeByPathToFrontend_return?
---Requests that a batch of nodes is sent to the caller given their backend node ids.
---@field pushNodesByBackendIdsToFrontend fun(self: CDP._ClientContainer, params: CDP.DOM.pushNodesByBackendIdsToFrontend_parameters): CDP.Error?, CDP.DOM.pushNodesByBackendIdsToFrontend_return?
---Executes `querySelector` on a given node.
---@field querySelector fun(self: CDP._ClientContainer, params: CDP.DOM.querySelector_parameters): CDP.Error?, CDP.DOM.querySelector_return?
---Executes `querySelectorAll` on a given node.
---@field querySelectorAll fun(self: CDP._ClientContainer, params: CDP.DOM.querySelectorAll_parameters): CDP.Error?, CDP.DOM.querySelectorAll_return?
---Returns NodeIds of current top layer elements.
---Top layer is rendered closest to the user within a viewport, therefore its elements always
---appear on top of all other content.
---@field getTopLayerElements fun(self: CDP._ClientContainer): CDP.Error?, CDP.DOM.getTopLayerElements_return?
---Re-does the last undone action.
---@field redo fun(self: CDP._ClientContainer): CDP.Error?
---Removes attribute with given name from an element with given id.
---@field removeAttribute fun(self: CDP._ClientContainer, params: CDP.DOM.removeAttribute_parameters): CDP.Error?
---Removes node with given id.
---@field removeNode fun(self: CDP._ClientContainer, params: CDP.DOM.removeNode_parameters): CDP.Error?
---Requests that children of the node with given id are returned to the caller in form of
---`setChildNodes` events where not only immediate children are retrieved, but all children down to
---the specified depth.
---@field requestChildNodes fun(self: CDP._ClientContainer, params: CDP.DOM.requestChildNodes_parameters): CDP.Error?
---Requests that the node is sent to the caller given the JavaScript node object reference. All
---nodes that form the path from the node to the root are also sent to the client as a series of
---`setChildNodes` notifications.
---@field requestNode fun(self: CDP._ClientContainer, params: CDP.DOM.requestNode_parameters): CDP.Error?, CDP.DOM.requestNode_return?
---Resolves the JavaScript node object for a given NodeId or BackendNodeId.
---@field resolveNode fun(self: CDP._ClientContainer, params: CDP.DOM.resolveNode_parameters): CDP.Error?, CDP.DOM.resolveNode_return?
---Sets attribute for an element with given id.
---@field setAttributeValue fun(self: CDP._ClientContainer, params: CDP.DOM.setAttributeValue_parameters): CDP.Error?
---Sets attributes on element with given id. This method is useful when user edits some existing
---attribute value and types in several attribute name/value pairs.
---@field setAttributesAsText fun(self: CDP._ClientContainer, params: CDP.DOM.setAttributesAsText_parameters): CDP.Error?
---Sets files for the given file input element.
---@field setFileInputFiles fun(self: CDP._ClientContainer, params: CDP.DOM.setFileInputFiles_parameters): CDP.Error?
---Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
---@field setNodeStackTracesEnabled fun(self: CDP._ClientContainer, params: CDP.DOM.setNodeStackTracesEnabled_parameters): CDP.Error?
---Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
---@field getNodeStackTraces fun(self: CDP._ClientContainer, params: CDP.DOM.getNodeStackTraces_parameters): CDP.Error?, CDP.DOM.getNodeStackTraces_return?
---Returns file information for the given
---File wrapper.
---@field getFileInfo fun(self: CDP._ClientContainer, params: CDP.DOM.getFileInfo_parameters): CDP.Error?, CDP.DOM.getFileInfo_return?
---Enables console to refer to the node with given id via $x (see Command Line API for more details
---$x functions).
---@field setInspectedNode fun(self: CDP._ClientContainer, params: CDP.DOM.setInspectedNode_parameters): CDP.Error?
---Sets node name for a node with given id.
---@field setNodeName fun(self: CDP._ClientContainer, params: CDP.DOM.setNodeName_parameters): CDP.Error?, CDP.DOM.setNodeName_return?
---Sets node value for a node with given id.
---@field setNodeValue fun(self: CDP._ClientContainer, params: CDP.DOM.setNodeValue_parameters): CDP.Error?
---Sets node HTML markup, returns new node id.
---@field setOuterHTML fun(self: CDP._ClientContainer, params: CDP.DOM.setOuterHTML_parameters): CDP.Error?
---Undoes the last performed action.
---@field undo fun(self: CDP._ClientContainer): CDP.Error?
---Returns iframe node that owns iframe with the given domain.
---@field getFrameOwner fun(self: CDP._ClientContainer, params: CDP.DOM.getFrameOwner_parameters): CDP.Error?, CDP.DOM.getFrameOwner_return?
---Returns the query container of the given node based on container query
---conditions: containerName, physical, and logical axes. If no axes are
---provided, the style container is returned, which is the direct parent or the
---closest element with a matching container-name.
---@field getContainerForNode fun(self: CDP._ClientContainer, params: CDP.DOM.getContainerForNode_parameters): CDP.Error?, CDP.DOM.getContainerForNode_return?
---Returns the descendants of a container query container that have
---container queries against this container.
---@field getQueryingDescendantsForContainer fun(self: CDP._ClientContainer, params: CDP.DOM.getQueryingDescendantsForContainer_parameters): CDP.Error?, CDP.DOM.getQueryingDescendantsForContainer_return?
---Fired when `Element`'s attribute is modified.
---@field attributeModified fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.attributeModified_event)): CDP.Error?
---Fired when `Element`'s attribute is removed.
---@field attributeRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.attributeRemoved_event)): CDP.Error?
---Mirrors `DOMCharacterDataModified` event.
---@field characterDataModified fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.characterDataModified_event)): CDP.Error?
---Fired when `Container`'s child node count has changed.
---@field childNodeCountUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.childNodeCountUpdated_event)): CDP.Error?
---Mirrors `DOMNodeInserted` event.
---@field childNodeInserted fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.childNodeInserted_event)): CDP.Error?
---Mirrors `DOMNodeRemoved` event.
---@field childNodeRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.childNodeRemoved_event)): CDP.Error?
---Called when distribution is changed.
---@field distributedNodesUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.distributedNodesUpdated_event)): CDP.Error?
---Fired when `Document` has been totally updated. Node ids are no longer valid.
---@field documentUpdated fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when `Element`'s inline style is modified via a CSS property modification.
---@field inlineStyleInvalidated fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.inlineStyleInvalidated_event)): CDP.Error?
---Called when a pseudo element is added to an element.
---@field pseudoElementAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.pseudoElementAdded_event)): CDP.Error?
---Called when top layer elements are changed.
---@field topLayerElementsUpdated fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Called when a pseudo element is removed from an element.
---@field pseudoElementRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.pseudoElementRemoved_event)): CDP.Error?
---Fired when backend wants to provide client with the missing DOM structure. This happens upon
---most of the calls requesting node ids.
---@field setChildNodes fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.setChildNodes_event)): CDP.Error?
---Called when shadow root is popped from the element.
---@field shadowRootPopped fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.shadowRootPopped_event)): CDP.Error?
---Called when shadow root is pushed into the element.
---@field shadowRootPushed fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOM.shadowRootPushed_event)): CDP.Error?

---@alias CDP.DOMDebugger.DOMBreakpointType "subtree-modified" | "attribute-modified" | "node-removed" DOM breakpoint type.
---@alias CDP.DOMDebugger.CSPViolationType "trustedtype-sink-violation" | "trustedtype-policy-violation" CSP Violation type.
---Object event listener.
---@class CDP.DOMDebugger.EventListener
---@field type string `EventListener`'s type.
---@field useCapture boolean `EventListener`'s useCapture.
---@field passive boolean `EventListener`'s passive flag.
---@field once boolean `EventListener`'s once flag.
---@field scriptId CDP.Runtime.ScriptId Script id of the handler code.
---@field lineNumber integer Line number in the script (0-based).
---@field columnNumber integer Column number in the script (0-based).
---@field handler? CDP.Runtime.RemoteObject Event handler function value.
---@field originalHandler? CDP.Runtime.RemoteObject Event original handler function value.
---@field backendNodeId? CDP.DOM.BackendNodeId Node the listener is added to (if any).
---@class CDP.DOMDebugger.getEventListeners_parameters
---@field objectId CDP.Runtime.RemoteObjectId Identifier of the object to return listeners for.
---@field depth? integer The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the<br>entire subtree or provide an integer larger than 0.
---@field pierce? boolean Whether or not iframes and shadow roots should be traversed when returning the subtree<br>(default is false). Reports listeners for all contexts if pierce is enabled.
---@class CDP.DOMDebugger.getEventListeners_return
---@field listeners CDP.DOMDebugger.EventListener[] Array of relevant listeners.
---@class CDP.DOMDebugger.removeDOMBreakpoint_parameters
---@field nodeId CDP.DOM.NodeId Identifier of the node to remove breakpoint from.
---@field type CDP.DOMDebugger.DOMBreakpointType Type of the breakpoint to remove.
---@class CDP.DOMDebugger.removeEventListenerBreakpoint_parameters
---@field eventName string Event name.
---@field targetName? string EventTarget interface name.
---@class CDP.DOMDebugger.removeInstrumentationBreakpoint_parameters
---@field eventName string Instrumentation name to stop on.
---@class CDP.DOMDebugger.removeXHRBreakpoint_parameters
---@field url string Resource URL substring.
---@class CDP.DOMDebugger.setBreakOnCSPViolation_parameters
---@field violationTypes CDP.DOMDebugger.CSPViolationType[] CSP Violations to stop upon.
---@class CDP.DOMDebugger.setDOMBreakpoint_parameters
---@field nodeId CDP.DOM.NodeId Identifier of the node to set breakpoint on.
---@field type CDP.DOMDebugger.DOMBreakpointType Type of the operation to stop upon.
---@class CDP.DOMDebugger.setEventListenerBreakpoint_parameters
---@field eventName string DOM Event name to stop on (any DOM event will do).
---@field targetName? string EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any<br>EventTarget.
---@class CDP.DOMDebugger.setInstrumentationBreakpoint_parameters
---@field eventName string Instrumentation name to stop on.
---@class CDP.DOMDebugger.setXHRBreakpoint_parameters
---@field url string Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
---DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript
---execution will stop on these operations as if there was a regular breakpoint set.
---@class CDP.DOMDebugger: CDP._ClientContainer
---Returns event listeners of the given object.
---@field getEventListeners fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.getEventListeners_parameters): CDP.Error?, CDP.DOMDebugger.getEventListeners_return?
---Removes DOM breakpoint that was set using `setDOMBreakpoint`.
---@field removeDOMBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.removeDOMBreakpoint_parameters): CDP.Error?
---Removes breakpoint on particular DOM event.
---@field removeEventListenerBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.removeEventListenerBreakpoint_parameters): CDP.Error?
---Removes breakpoint on particular native event.
---@field removeInstrumentationBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.removeInstrumentationBreakpoint_parameters): CDP.Error?
---Removes breakpoint from XMLHttpRequest.
---@field removeXHRBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.removeXHRBreakpoint_parameters): CDP.Error?
---Sets breakpoint on particular CSP violations.
---@field setBreakOnCSPViolation fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.setBreakOnCSPViolation_parameters): CDP.Error?
---Sets breakpoint on particular operation with DOM.
---@field setDOMBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.setDOMBreakpoint_parameters): CDP.Error?
---Sets breakpoint on particular DOM event.
---@field setEventListenerBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.setEventListenerBreakpoint_parameters): CDP.Error?
---Sets breakpoint on particular native event.
---@field setInstrumentationBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.setInstrumentationBreakpoint_parameters): CDP.Error?
---Sets breakpoint on XMLHttpRequest.
---@field setXHRBreakpoint fun(self: CDP._ClientContainer, params: CDP.DOMDebugger.setXHRBreakpoint_parameters): CDP.Error?

---@class CDP.EventBreakpoints.setInstrumentationBreakpoint_parameters
---@field eventName string Instrumentation name to stop on.
---@class CDP.EventBreakpoints.removeInstrumentationBreakpoint_parameters
---@field eventName string Instrumentation name to stop on.
---EventBreakpoints permits setting breakpoints on particular operations and
---events in targets that run JavaScript but do not have a DOM.
---JavaScript execution will stop on these operations as if there was a regular
---breakpoint set.
---@class CDP.EventBreakpoints: CDP._ClientContainer
---Sets breakpoint on particular native event.
---@field setInstrumentationBreakpoint fun(self: CDP._ClientContainer, params: CDP.EventBreakpoints.setInstrumentationBreakpoint_parameters): CDP.Error?
---Removes breakpoint on particular native event.
---@field removeInstrumentationBreakpoint fun(self: CDP._ClientContainer, params: CDP.EventBreakpoints.removeInstrumentationBreakpoint_parameters): CDP.Error?

---A Node in the DOM tree.
---@class CDP.DOMSnapshot.DOMNode
---@field nodeType integer `Node`'s nodeType.
---@field nodeName string `Node`'s nodeName.
---@field nodeValue string `Node`'s nodeValue.
---@field textValue? string Only set for textarea elements, contains the text value.
---@field inputValue? string Only set for input elements, contains the input's associated text value.
---@field inputChecked? boolean Only set for radio and checkbox input elements, indicates if the element has been checked
---@field optionSelected? boolean Only set for option elements, indicates if the element has been selected
---@field backendNodeId CDP.DOM.BackendNodeId `Node`'s id, corresponds to DOM.Node.backendNodeId.
---@field childNodeIndexes? integer[] The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if<br>any.
---@field attributes? CDP.DOMSnapshot.NameValue[] Attributes of an `Element` node.
---@field pseudoElementIndexes? integer[] Indexes of pseudo elements associated with this node in the `domNodes` array returned by<br>`getSnapshot`, if any.
---@field layoutNodeIndex? integer The index of the node's related layout tree node in the `layoutTreeNodes` array returned by<br>`getSnapshot`, if any.
---@field documentURL? string Document URL that `Document` or `FrameOwner` node points to.
---@field baseURL? string Base URL that `Document` or `FrameOwner` node uses for URL completion.
---@field contentLanguage? string Only set for documents, contains the document's content language.
---@field documentEncoding? string Only set for documents, contains the document's character set encoding.
---@field publicId? string `DocumentType` node's publicId.
---@field systemId? string `DocumentType` node's systemId.
---@field frameId? CDP.Page.FrameId Frame ID for frame owner elements and also for the document node.
---@field contentDocumentIndex? integer The index of a frame owner element's content document in the `domNodes` array returned by<br>`getSnapshot`, if any.
---@field pseudoType? CDP.DOM.PseudoType Type of a pseudo element node.
---@field shadowRootType? CDP.DOM.ShadowRootType Shadow root type.
---@field isClickable? boolean Whether this DOM node responds to mouse clicks. This includes nodes that have had click<br>event listeners attached via JavaScript as well as anchor tags that naturally navigate when<br>clicked.
---@field eventListeners? CDP.DOMDebugger.EventListener[] Details of the node's event listeners, if any.
---@field currentSourceURL? string The selected url for nodes with a srcset attribute.
---@field originURL? string The url of the script (if any) that generates this node.
---@field scrollOffsetX? number Scroll offsets, set when this node is a Document.
---@field scrollOffsetY? number
---Details of post layout rendered text positions. The exact layout should not be regarded as
---stable and may change between versions.
---@class CDP.DOMSnapshot.InlineTextBox
---@field boundingBox CDP.DOM.Rect The bounding box in document coordinates. Note that scroll offset of the document is ignored.
---@field startCharacterIndex integer The starting index in characters, for this post layout textbox substring. Characters that<br>would be represented as a surrogate pair in UTF-16 have length 2.
---@field numCharacters integer The number of characters in this post layout textbox substring. Characters that would be<br>represented as a surrogate pair in UTF-16 have length 2.
---Details of an element in the DOM tree with a LayoutObject.
---@class CDP.DOMSnapshot.LayoutTreeNode
---@field domNodeIndex integer The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
---@field boundingBox CDP.DOM.Rect The bounding box in document coordinates. Note that scroll offset of the document is ignored.
---@field layoutText? string Contents of the LayoutText, if any.
---@field inlineTextNodes? CDP.DOMSnapshot.InlineTextBox[] The post-layout inline text nodes, if any.
---@field styleIndex? integer Index into the `computedStyles` array returned by `getSnapshot`.
---@field paintOrder? integer Global paint order index, which is determined by the stacking order of the nodes. Nodes<br>that are painted together will have the same index. Only provided if includePaintOrder in<br>getSnapshot was true.
---@field isStackingContext? boolean Set to true to indicate the element begins a new stacking context.
---A subset of the full ComputedStyle as defined by the request whitelist.
---@class CDP.DOMSnapshot.ComputedStyle
---@field properties CDP.DOMSnapshot.NameValue[] Name/value pairs of computed style properties.
---A name/value pair.
---@class CDP.DOMSnapshot.NameValue
---@field name string Attribute/property name.
---@field value string Attribute/property value.
---@alias CDP.DOMSnapshot.StringIndex integer Index of the string in the strings table.
---@alias CDP.DOMSnapshot.ArrayOfStrings CDP.DOMSnapshot.StringIndex[] Index of the string in the strings table.
---Data that is only present on rare nodes.
---@class CDP.DOMSnapshot.RareStringData
---@field index integer[]
---@field value CDP.DOMSnapshot.StringIndex[]
---@class CDP.DOMSnapshot.RareBooleanData
---@field index integer[]
---@class CDP.DOMSnapshot.RareIntegerData
---@field index integer[]
---@field value integer[]
---@alias CDP.DOMSnapshot.Rectangle number[]
---Document snapshot.
---@class CDP.DOMSnapshot.DocumentSnapshot
---@field documentURL CDP.DOMSnapshot.StringIndex Document URL that `Document` or `FrameOwner` node points to.
---@field title CDP.DOMSnapshot.StringIndex Document title.
---@field baseURL CDP.DOMSnapshot.StringIndex Base URL that `Document` or `FrameOwner` node uses for URL completion.
---@field contentLanguage CDP.DOMSnapshot.StringIndex Contains the document's content language.
---@field encodingName CDP.DOMSnapshot.StringIndex Contains the document's character set encoding.
---@field publicId CDP.DOMSnapshot.StringIndex `DocumentType` node's publicId.
---@field systemId CDP.DOMSnapshot.StringIndex `DocumentType` node's systemId.
---@field frameId CDP.DOMSnapshot.StringIndex Frame ID for frame owner elements and also for the document node.
---@field nodes CDP.DOMSnapshot.NodeTreeSnapshot A table with dom nodes.
---@field layout CDP.DOMSnapshot.LayoutTreeSnapshot The nodes in the layout tree.
---@field textBoxes CDP.DOMSnapshot.TextBoxSnapshot The post-layout inline text nodes.
---@field scrollOffsetX? number Horizontal scroll offset.
---@field scrollOffsetY? number Vertical scroll offset.
---@field contentWidth? number Document content width.
---@field contentHeight? number Document content height.
---Table containing nodes.
---@class CDP.DOMSnapshot.NodeTreeSnapshot
---@field parentIndex? integer[] Parent node index.
---@field nodeType? integer[] `Node`'s nodeType.
---@field shadowRootType? CDP.DOMSnapshot.RareStringData Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
---@field nodeName? CDP.DOMSnapshot.StringIndex[] `Node`'s nodeName.
---@field nodeValue? CDP.DOMSnapshot.StringIndex[] `Node`'s nodeValue.
---@field backendNodeId? CDP.DOM.BackendNodeId[] `Node`'s id, corresponds to DOM.Node.backendNodeId.
---@field attributes? CDP.DOMSnapshot.ArrayOfStrings[] Attributes of an `Element` node. Flatten name, value pairs.
---@field textValue? CDP.DOMSnapshot.RareStringData Only set for textarea elements, contains the text value.
---@field inputValue? CDP.DOMSnapshot.RareStringData Only set for input elements, contains the input's associated text value.
---@field inputChecked? CDP.DOMSnapshot.RareBooleanData Only set for radio and checkbox input elements, indicates if the element has been checked
---@field optionSelected? CDP.DOMSnapshot.RareBooleanData Only set for option elements, indicates if the element has been selected
---@field contentDocumentIndex? CDP.DOMSnapshot.RareIntegerData The index of the document in the list of the snapshot documents.
---@field pseudoType? CDP.DOMSnapshot.RareStringData Type of a pseudo element node.
---@field pseudoIdentifier? CDP.DOMSnapshot.RareStringData Pseudo element identifier for this node. Only present if there is a<br>valid pseudoType.
---@field isClickable? CDP.DOMSnapshot.RareBooleanData Whether this DOM node responds to mouse clicks. This includes nodes that have had click<br>event listeners attached via JavaScript as well as anchor tags that naturally navigate when<br>clicked.
---@field currentSourceURL? CDP.DOMSnapshot.RareStringData The selected url for nodes with a srcset attribute.
---@field originURL? CDP.DOMSnapshot.RareStringData The url of the script (if any) that generates this node.
---Table of details of an element in the DOM tree with a LayoutObject.
---@class CDP.DOMSnapshot.LayoutTreeSnapshot
---@field nodeIndex integer[] Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
---@field styles CDP.DOMSnapshot.ArrayOfStrings[] Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
---@field bounds CDP.DOMSnapshot.Rectangle[] The absolute position bounding box.
---@field text CDP.DOMSnapshot.StringIndex[] Contents of the LayoutText, if any.
---@field stackingContexts CDP.DOMSnapshot.RareBooleanData Stacking context information.
---@field paintOrders? integer[] Global paint order index, which is determined by the stacking order of the nodes. Nodes<br>that are painted together will have the same index. Only provided if includePaintOrder in<br>captureSnapshot was true.
---@field offsetRects? CDP.DOMSnapshot.Rectangle[] The offset rect of nodes. Only available when includeDOMRects is set to true
---@field scrollRects? CDP.DOMSnapshot.Rectangle[] The scroll rect of nodes. Only available when includeDOMRects is set to true
---@field clientRects? CDP.DOMSnapshot.Rectangle[] The client rect of nodes. Only available when includeDOMRects is set to true
---@field blendedBackgroundColors? CDP.DOMSnapshot.StringIndex[] The list of background colors that are blended with colors of overlapping elements.
---@field textColorOpacities? number[] The list of computed text opacities.
---Table of details of the post layout rendered text positions. The exact layout should not be regarded as
---stable and may change between versions.
---@class CDP.DOMSnapshot.TextBoxSnapshot
---@field layoutIndex integer[] Index of the layout tree node that owns this box collection.
---@field bounds CDP.DOMSnapshot.Rectangle[] The absolute position bounding box.
---@field start integer[] The starting index in characters, for this post layout textbox substring. Characters that<br>would be represented as a surrogate pair in UTF-16 have length 2.
---@field length integer[] The number of characters in this post layout textbox substring. Characters that would be<br>represented as a surrogate pair in UTF-16 have length 2.
---@class CDP.DOMSnapshot.getSnapshot_parameters
---@field computedStyleWhitelist string[] Whitelist of computed styles to return.
---@field includeEventListeners? boolean Whether or not to retrieve details of DOM listeners (default false).
---@field includePaintOrder? boolean Whether to determine and include the paint order index of LayoutTreeNodes (default false).
---@field includeUserAgentShadowTree? boolean Whether to include UA shadow tree in the snapshot (default false).
---@class CDP.DOMSnapshot.getSnapshot_return
---@field domNodes CDP.DOMSnapshot.DOMNode[] The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
---@field layoutTreeNodes CDP.DOMSnapshot.LayoutTreeNode[] The nodes in the layout tree.
---@field computedStyles CDP.DOMSnapshot.ComputedStyle[] Whitelisted ComputedStyle properties for each node in the layout tree.
---@class CDP.DOMSnapshot.captureSnapshot_parameters
---@field computedStyles string[] Whitelist of computed styles to return.
---@field includePaintOrder? boolean Whether to include layout object paint orders into the snapshot.
---@field includeDOMRects? boolean Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
---@field includeBlendedBackgroundColors? boolean Whether to include blended background colors in the snapshot (default: false).<br>Blended background color is achieved by blending background colors of all elements<br>that overlap with the current element.
---@field includeTextColorOpacities? boolean Whether to include text color opacity in the snapshot (default: false).<br>An element might have the opacity property set that affects the text color of the element.<br>The final text color opacity is computed based on the opacity of all overlapping elements.
---@class CDP.DOMSnapshot.captureSnapshot_return
---@field documents CDP.DOMSnapshot.DocumentSnapshot[] The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
---@field strings string[] Shared string table that all string properties refer to with indexes.
---This domain facilitates obtaining document snapshots with DOM, layout, and style information.
---@class CDP.DOMSnapshot: CDP._ClientContainer
---Disables DOM snapshot agent for the given page.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables DOM snapshot agent for the given page.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Returns a document snapshot, including the full DOM tree of the root node (including iframes,
---template contents, and imported documents) in a flattened array, as well as layout and
---white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
---flattened.
---@field getSnapshot fun(self: CDP._ClientContainer, params: CDP.DOMSnapshot.getSnapshot_parameters): CDP.Error?, CDP.DOMSnapshot.getSnapshot_return?
---Returns a document snapshot, including the full DOM tree of the root node (including iframes,
---template contents, and imported documents) in a flattened array, as well as layout and
---white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
---flattened.
---@field captureSnapshot fun(self: CDP._ClientContainer, params: CDP.DOMSnapshot.captureSnapshot_parameters): CDP.Error?, CDP.DOMSnapshot.captureSnapshot_return?

---@alias CDP.DOMStorage.SerializedStorageKey string
---DOM Storage identifier.
---@class CDP.DOMStorage.StorageId
---@field securityOrigin? string Security origin for the storage.
---@field storageKey? CDP.DOMStorage.SerializedStorageKey Represents a key by which DOM Storage keys its CachedStorageAreas
---@field isLocalStorage boolean Whether the storage is local storage (not session storage).
---@alias CDP.DOMStorage.Item string[] DOM Storage item.
---@class CDP.DOMStorage.clear_parameters
---@field storageId CDP.DOMStorage.StorageId
---@class CDP.DOMStorage.getDOMStorageItems_parameters
---@field storageId CDP.DOMStorage.StorageId
---@class CDP.DOMStorage.getDOMStorageItems_return
---@field entries CDP.DOMStorage.Item[]
---@class CDP.DOMStorage.removeDOMStorageItem_parameters
---@field storageId CDP.DOMStorage.StorageId
---@field key string
---@class CDP.DOMStorage.setDOMStorageItem_parameters
---@field storageId CDP.DOMStorage.StorageId
---@field key string
---@field value string
---@class CDP.DOMStorage.domStorageItemAdded_event
---@field storageId CDP.DOMStorage.StorageId
---@field key string
---@field newValue string
---@class CDP.DOMStorage.domStorageItemRemoved_event
---@field storageId CDP.DOMStorage.StorageId
---@field key string
---@class CDP.DOMStorage.domStorageItemUpdated_event
---@field storageId CDP.DOMStorage.StorageId
---@field key string
---@field oldValue string
---@field newValue string
---@class CDP.DOMStorage.domStorageItemsCleared_event
---@field storageId CDP.DOMStorage.StorageId
---Query and modify DOM storage.
---@class CDP.DOMStorage: CDP._ClientContainer
---@field clear fun(self: CDP._ClientContainer, params: CDP.DOMStorage.clear_parameters): CDP.Error?
---Disables storage tracking, prevents storage events from being sent to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables storage tracking, storage events will now be delivered to the client.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field getDOMStorageItems fun(self: CDP._ClientContainer, params: CDP.DOMStorage.getDOMStorageItems_parameters): CDP.Error?, CDP.DOMStorage.getDOMStorageItems_return?
---@field removeDOMStorageItem fun(self: CDP._ClientContainer, params: CDP.DOMStorage.removeDOMStorageItem_parameters): CDP.Error?
---@field setDOMStorageItem fun(self: CDP._ClientContainer, params: CDP.DOMStorage.setDOMStorageItem_parameters): CDP.Error?
---@field domStorageItemAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOMStorage.domStorageItemAdded_event)): CDP.Error?
---@field domStorageItemRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOMStorage.domStorageItemRemoved_event)): CDP.Error?
---@field domStorageItemUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOMStorage.domStorageItemUpdated_event)): CDP.Error?
---@field domStorageItemsCleared fun(self: CDP._ClientContainer, cb: fun(event: CDP.DOMStorage.domStorageItemsCleared_event)): CDP.Error?

---@alias CDP.Database.DatabaseId string Unique identifier of Database object.
---Database object.
---@class CDP.Database.Database
---@field id CDP.Database.DatabaseId Database ID.
---@field domain string Database domain.
---@field name string Database name.
---@field version string Database version.
---Database error.
---@class CDP.Database.Error
---@field message string Error message.
---@field code integer Error code.
---@class CDP.Database.executeSQL_parameters
---@field databaseId CDP.Database.DatabaseId
---@field query string
---@class CDP.Database.executeSQL_return
---@field columnNames? string[]
---@field values? any[]
---@field sqlError? CDP.Database.Error
---@class CDP.Database.getDatabaseTableNames_parameters
---@field databaseId CDP.Database.DatabaseId
---@class CDP.Database.getDatabaseTableNames_return
---@field tableNames string[]
---@class CDP.Database.addDatabase_event
---@field database CDP.Database.Database
---@class CDP.Database: CDP._ClientContainer
---Disables database tracking, prevents database events from being sent to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables database tracking, database events will now be delivered to the client.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field executeSQL fun(self: CDP._ClientContainer, params: CDP.Database.executeSQL_parameters): CDP.Error?, CDP.Database.executeSQL_return?
---@field getDatabaseTableNames fun(self: CDP._ClientContainer, params: CDP.Database.getDatabaseTableNames_parameters): CDP.Error?, CDP.Database.getDatabaseTableNames_return?
---@field addDatabase fun(self: CDP._ClientContainer, cb: fun(event: CDP.Database.addDatabase_event)): CDP.Error?

---@class CDP.DeviceOrientation.setDeviceOrientationOverride_parameters
---@field alpha number Mock alpha
---@field beta number Mock beta
---@field gamma number Mock gamma
---@class CDP.DeviceOrientation: CDP._ClientContainer
---Clears the overridden Device Orientation.
---@field clearDeviceOrientationOverride fun(self: CDP._ClientContainer): CDP.Error?
---Overrides the Device Orientation.
---@field setDeviceOrientationOverride fun(self: CDP._ClientContainer, params: CDP.DeviceOrientation.setDeviceOrientationOverride_parameters): CDP.Error?

---Screen orientation.
---@class CDP.Emulation.ScreenOrientation
---@field type "portraitPrimary" | "portraitSecondary" | "landscapePrimary" | "landscapeSecondary" Orientation type.
---@field angle integer Orientation angle.
---@class CDP.Emulation.DisplayFeature
---@field orientation "vertical" | "horizontal" Orientation of a display feature in relation to screen
---@field offset integer The offset from the screen origin in either the x (for vertical<br>orientation) or y (for horizontal orientation) direction.
---@field maskLength integer A display feature may mask content such that it is not physically<br>displayed - this length along with the offset describes this area.<br>A display feature that only splits content will have a 0 mask_length.
---@class CDP.Emulation.MediaFeature
---@field name string
---@field value string
---@alias CDP.Emulation.VirtualTimePolicy "advance" | "pause" | "pauseIfNetworkFetchesPending" advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to<br>allow the next delayed task (if any) to run; pause: The virtual time base may not advance;<br>pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending<br>resource fetches.
---Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints
---@class CDP.Emulation.UserAgentBrandVersion
---@field brand string
---@field version string
---Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints
---Missing optional values will be filled in by the target with what it would normally use.
---@class CDP.Emulation.UserAgentMetadata
---@field brands? CDP.Emulation.UserAgentBrandVersion[] Brands appearing in Sec-CH-UA.
---@field fullVersionList? CDP.Emulation.UserAgentBrandVersion[] Brands appearing in Sec-CH-UA-Full-Version-List.
---@field fullVersion? string
---@field platform string
---@field platformVersion string
---@field architecture string
---@field model string
---@field mobile boolean
---@field bitness? string
---@field wow64? boolean
---@alias CDP.Emulation.DisabledImageType "avif" | "webp" Enum of image types that can be disabled.
---@class CDP.Emulation.canEmulate_return
---@field result boolean True if emulation is supported.
---@class CDP.Emulation.setFocusEmulationEnabled_parameters
---@field enabled boolean Whether to enable to disable focus emulation.
---@class CDP.Emulation.setAutoDarkModeOverride_parameters
---@field enabled? boolean Whether to enable or disable automatic dark mode.<br>If not specified, any existing override will be cleared.
---@class CDP.Emulation.setCPUThrottlingRate_parameters
---@field rate number Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
---@class CDP.Emulation.setDefaultBackgroundColorOverride_parameters
---@field color? CDP.DOM.RGBA RGBA of the default background color. If not specified, any existing override will be<br>cleared.
---@class CDP.Emulation.setDeviceMetricsOverride_parameters
---@field width integer Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
---@field height integer Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
---@field deviceScaleFactor number Overriding device scale factor value. 0 disables the override.
---@field mobile boolean Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text<br>autosizing and more.
---@field scale? number Scale to apply to resulting view image.
---@field screenWidth? integer Overriding screen width value in pixels (minimum 0, maximum 10000000).
---@field screenHeight? integer Overriding screen height value in pixels (minimum 0, maximum 10000000).
---@field positionX? integer Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
---@field positionY? integer Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
---@field dontSetVisibleSize? boolean Do not set visible view size, rely upon explicit setVisibleSize call.
---@field screenOrientation? CDP.Emulation.ScreenOrientation Screen orientation override.
---@field viewport? CDP.Page.Viewport If set, the visible area of the page will be overridden to this viewport. This viewport<br>change is not observed by the page, e.g. viewport-relative elements do not change positions.
---@field displayFeature? CDP.Emulation.DisplayFeature If set, the display feature of a multi-segment screen. If not set, multi-segment support<br>is turned-off.
---@class CDP.Emulation.setScrollbarsHidden_parameters
---@field hidden boolean Whether scrollbars should be always hidden.
---@class CDP.Emulation.setDocumentCookieDisabled_parameters
---@field disabled boolean Whether document.coookie API should be disabled.
---@class CDP.Emulation.setEmitTouchEventsForMouse_parameters
---@field enabled boolean Whether touch emulation based on mouse input should be enabled.
---@field configuration? "mobile" | "desktop" Touch/gesture events configuration. Default: current platform.
---@class CDP.Emulation.setEmulatedMedia_parameters
---@field media? string Media type to emulate. Empty string disables the override.
---@field features? CDP.Emulation.MediaFeature[] Media features to emulate.
---@class CDP.Emulation.setEmulatedVisionDeficiency_parameters
---@field type "none" | "blurredVision" | "reducedContrast" | "achromatopsia" | "deuteranopia" | "protanopia" | "tritanopia" Vision deficiency to emulate. Order: best-effort emulations come first, followed by any<br>physiologically accurate emulations for medically recognized color vision deficiencies.
---@class CDP.Emulation.setGeolocationOverride_parameters
---@field latitude? number Mock latitude
---@field longitude? number Mock longitude
---@field accuracy? number Mock accuracy
---@class CDP.Emulation.setIdleOverride_parameters
---@field isUserActive boolean Mock isUserActive
---@field isScreenUnlocked boolean Mock isScreenUnlocked
---@class CDP.Emulation.setNavigatorOverrides_parameters
---@field platform string The platform navigator.platform should return.
---@class CDP.Emulation.setPageScaleFactor_parameters
---@field pageScaleFactor number Page scale factor.
---@class CDP.Emulation.setScriptExecutionDisabled_parameters
---@field value boolean Whether script execution should be disabled in the page.
---@class CDP.Emulation.setTouchEmulationEnabled_parameters
---@field enabled boolean Whether the touch event emulation should be enabled.
---@field maxTouchPoints? integer Maximum touch points supported. Defaults to one.
---@class CDP.Emulation.setVirtualTimePolicy_parameters
---@field policy CDP.Emulation.VirtualTimePolicy
---@field budget? number If set, after this many virtual milliseconds have elapsed virtual time will be paused and a<br>virtualTimeBudgetExpired event is sent.
---@field maxVirtualTimeTaskStarvationCount? integer If set this specifies the maximum number of tasks that can be run before virtual is forced<br>forwards to prevent deadlock.
---@field initialVirtualTime? CDP.Network.TimeSinceEpoch If set, base::Time::Now will be overridden to initially return this value.
---@class CDP.Emulation.setVirtualTimePolicy_return
---@field virtualTimeTicksBase number Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
---@class CDP.Emulation.setLocaleOverride_parameters
---@field locale? string ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and<br>restores default host system locale.
---@class CDP.Emulation.setTimezoneOverride_parameters
---@field timezoneId string The timezone identifier. If empty, disables the override and<br>restores default host system timezone.
---@class CDP.Emulation.setVisibleSize_parameters
---@field width integer Frame width (DIP).
---@field height integer Frame height (DIP).
---@class CDP.Emulation.setDisabledImageTypes_parameters
---@field imageTypes CDP.Emulation.DisabledImageType[] Image types to disable.
---@class CDP.Emulation.setHardwareConcurrencyOverride_parameters
---@field hardwareConcurrency integer Hardware concurrency to report
---@class CDP.Emulation.setUserAgentOverride_parameters
---@field userAgent string User agent to use.
---@field acceptLanguage? string Browser langugage to emulate.
---@field platform? string The platform navigator.platform should return.
---@field userAgentMetadata? CDP.Emulation.UserAgentMetadata To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
---@class CDP.Emulation.setAutomationOverride_parameters
---@field enabled boolean Whether the override should be enabled.
---This domain emulates different environments for the page.
---@class CDP.Emulation: CDP._ClientContainer
---Tells whether emulation is supported.
---@field canEmulate fun(self: CDP._ClientContainer): CDP.Error?, CDP.Emulation.canEmulate_return?
---Clears the overridden device metrics.
---@field clearDeviceMetricsOverride fun(self: CDP._ClientContainer): CDP.Error?
---Clears the overridden Geolocation Position and Error.
---@field clearGeolocationOverride fun(self: CDP._ClientContainer): CDP.Error?
---Requests that page scale factor is reset to initial values.
---@field resetPageScaleFactor fun(self: CDP._ClientContainer): CDP.Error?
---Enables or disables simulating a focused and active page.
---@field setFocusEmulationEnabled fun(self: CDP._ClientContainer, params: CDP.Emulation.setFocusEmulationEnabled_parameters): CDP.Error?
---Automatically render all web contents using a dark theme.
---@field setAutoDarkModeOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setAutoDarkModeOverride_parameters): CDP.Error?
---Enables CPU throttling to emulate slow CPUs.
---@field setCPUThrottlingRate fun(self: CDP._ClientContainer, params: CDP.Emulation.setCPUThrottlingRate_parameters): CDP.Error?
---Sets or clears an override of the default background color of the frame. This override is used
---if the content does not specify one.
---@field setDefaultBackgroundColorOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setDefaultBackgroundColorOverride_parameters): CDP.Error?
---Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
---window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
---query results).
---@field setDeviceMetricsOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setDeviceMetricsOverride_parameters): CDP.Error?
---@field setScrollbarsHidden fun(self: CDP._ClientContainer, params: CDP.Emulation.setScrollbarsHidden_parameters): CDP.Error?
---@field setDocumentCookieDisabled fun(self: CDP._ClientContainer, params: CDP.Emulation.setDocumentCookieDisabled_parameters): CDP.Error?
---@field setEmitTouchEventsForMouse fun(self: CDP._ClientContainer, params: CDP.Emulation.setEmitTouchEventsForMouse_parameters): CDP.Error?
---Emulates the given media type or media feature for CSS media queries.
---@field setEmulatedMedia fun(self: CDP._ClientContainer, params: CDP.Emulation.setEmulatedMedia_parameters): CDP.Error?
---Emulates the given vision deficiency.
---@field setEmulatedVisionDeficiency fun(self: CDP._ClientContainer, params: CDP.Emulation.setEmulatedVisionDeficiency_parameters): CDP.Error?
---Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
---unavailable.
---@field setGeolocationOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setGeolocationOverride_parameters): CDP.Error?
---Overrides the Idle state.
---@field setIdleOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setIdleOverride_parameters): CDP.Error?
---Clears Idle state overrides.
---@field clearIdleOverride fun(self: CDP._ClientContainer): CDP.Error?
---Overrides value returned by the javascript navigator object.
---@field setNavigatorOverrides fun(self: CDP._ClientContainer, params: CDP.Emulation.setNavigatorOverrides_parameters): CDP.Error?
---Sets a specified page scale factor.
---@field setPageScaleFactor fun(self: CDP._ClientContainer, params: CDP.Emulation.setPageScaleFactor_parameters): CDP.Error?
---Switches script execution in the page.
---@field setScriptExecutionDisabled fun(self: CDP._ClientContainer, params: CDP.Emulation.setScriptExecutionDisabled_parameters): CDP.Error?
---Enables touch on platforms which do not support them.
---@field setTouchEmulationEnabled fun(self: CDP._ClientContainer, params: CDP.Emulation.setTouchEmulationEnabled_parameters): CDP.Error?
---Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
---the current virtual time policy.  Note this supersedes any previous time budget.
---@field setVirtualTimePolicy fun(self: CDP._ClientContainer, params: CDP.Emulation.setVirtualTimePolicy_parameters): CDP.Error?, CDP.Emulation.setVirtualTimePolicy_return?
---Overrides default host system locale with the specified one.
---@field setLocaleOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setLocaleOverride_parameters): CDP.Error?
---Overrides default host system timezone with the specified one.
---@field setTimezoneOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setTimezoneOverride_parameters): CDP.Error?
---Resizes the frame/viewport of the page. Note that this does not affect the frame's container
---(e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
---on Android.
---@field setVisibleSize fun(self: CDP._ClientContainer, params: CDP.Emulation.setVisibleSize_parameters): CDP.Error?
---@field setDisabledImageTypes fun(self: CDP._ClientContainer, params: CDP.Emulation.setDisabledImageTypes_parameters): CDP.Error?
---@field setHardwareConcurrencyOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setHardwareConcurrencyOverride_parameters): CDP.Error?
---Allows overriding user agent with the given string.
---@field setUserAgentOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setUserAgentOverride_parameters): CDP.Error?
---Allows overriding the automation flag.
---@field setAutomationOverride fun(self: CDP._ClientContainer, params: CDP.Emulation.setAutomationOverride_parameters): CDP.Error?
---Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
---@field virtualTimeBudgetExpired fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?

---Encoding options for a screenshot.
---@class CDP.HeadlessExperimental.ScreenshotParams
---@field format? "jpeg" | "png" | "webp" Image compression format (defaults to png).
---@field quality? integer Compression quality from range [0..100] (jpeg and webp only).
---@field optimizeForSpeed? boolean Optimize image encoding for speed, not for resulting size (defaults to false)
---@class CDP.HeadlessExperimental.beginFrame_parameters
---@field frameTimeTicks? number Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,<br>the current time will be used.
---@field interval? number The interval between BeginFrames that is reported to the compositor, in milliseconds.<br>Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
---@field noDisplayUpdates? boolean Whether updates should not be committed and drawn onto the display. False by default. If<br>true, only side effects of the BeginFrame will be run, such as layout and animations, but<br>any visual updates may not be visible on the display or in screenshots.
---@field screenshot? CDP.HeadlessExperimental.ScreenshotParams If set, a screenshot of the frame will be captured and returned in the response. Otherwise,<br>no screenshot will be captured. Note that capturing a screenshot can fail, for example,<br>during renderer initialization. In such a case, no screenshot data will be returned.
---@class CDP.HeadlessExperimental.beginFrame_return
---@field hasDamage boolean Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the<br>display. Reported for diagnostic uses, may be removed in the future.
---@field screenshotData? string Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)
---This domain provides experimental commands only supported in headless mode.
---@class CDP.HeadlessExperimental: CDP._ClientContainer
---Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
---screenshot from the resulting frame. Requires that the target was created with enabled
---BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
---https://goo.gle/chrome-headless-rendering for more background.
---@field beginFrame fun(self: CDP._ClientContainer, params: CDP.HeadlessExperimental.beginFrame_parameters): CDP.Error?, CDP.HeadlessExperimental.beginFrame_return?
---Disables headless events for the target.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables headless events for the target.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?

---@alias CDP.IO.StreamHandle string This is either obtained from another method or specified as `blob:<uuid>` where<br>`<uuid>` is an UUID of a Blob.
---@class CDP.IO.close_parameters
---@field handle CDP.IO.StreamHandle Handle of the stream to close.
---@class CDP.IO.read_parameters
---@field handle CDP.IO.StreamHandle Handle of the stream to read.
---@field offset? integer Seek to the specified offset before reading (if not specificed, proceed with offset<br>following the last read). Some types of streams may only support sequential reads.
---@field size? integer Maximum number of bytes to read (left upon the agent discretion if not specified).
---@class CDP.IO.read_return
---@field base64Encoded? boolean Set if the data is base64-encoded
---@field data string Data that were read.
---@field eof boolean Set if the end-of-file condition occurred while reading.
---@class CDP.IO.resolveBlob_parameters
---@field objectId CDP.Runtime.RemoteObjectId Object id of a Blob object wrapper.
---@class CDP.IO.resolveBlob_return
---@field uuid string UUID of the specified Blob.
---Input/Output operations for streams produced by DevTools.
---@class CDP.IO: CDP._ClientContainer
---Close the stream, discard any temporary backing storage.
---@field close fun(self: CDP._ClientContainer, params: CDP.IO.close_parameters): CDP.Error?
---Read a chunk of the stream
---@field read fun(self: CDP._ClientContainer, params: CDP.IO.read_parameters): CDP.Error?, CDP.IO.read_return?
---Return UUID of Blob object specified by a remote object id.
---@field resolveBlob fun(self: CDP._ClientContainer, params: CDP.IO.resolveBlob_parameters): CDP.Error?, CDP.IO.resolveBlob_return?

---Database with an array of object stores.
---@class CDP.IndexedDB.DatabaseWithObjectStores
---@field name string Database name.
---@field version number Database version (type is not 'integer', as the standard<br>requires the version number to be 'unsigned long long')
---@field objectStores CDP.IndexedDB.ObjectStore[] Object stores in this database.
---Object store.
---@class CDP.IndexedDB.ObjectStore
---@field name string Object store name.
---@field keyPath CDP.IndexedDB.KeyPath Object store key path.
---@field autoIncrement boolean If true, object store has auto increment flag set.
---@field indexes CDP.IndexedDB.ObjectStoreIndex[] Indexes in this object store.
---Object store index.
---@class CDP.IndexedDB.ObjectStoreIndex
---@field name string Index name.
---@field keyPath CDP.IndexedDB.KeyPath Index key path.
---@field unique boolean If true, index is unique.
---@field multiEntry boolean If true, index allows multiple entries for a key.
---Key.
---@class CDP.IndexedDB.Key
---@field type "number" | "string" | "date" | "array" Key type.
---@field number? number Number value.
---@field string? string String value.
---@field date? number Date value.
---@field array? CDP.IndexedDB.Key[] Array value.
---Key range.
---@class CDP.IndexedDB.KeyRange
---@field lower? CDP.IndexedDB.Key Lower bound.
---@field upper? CDP.IndexedDB.Key Upper bound.
---@field lowerOpen boolean If true lower bound is open.
---@field upperOpen boolean If true upper bound is open.
---Data entry.
---@class CDP.IndexedDB.DataEntry
---@field key CDP.Runtime.RemoteObject Key object.
---@field primaryKey CDP.Runtime.RemoteObject Primary key object.
---@field value CDP.Runtime.RemoteObject Value object.
---Key path.
---@class CDP.IndexedDB.KeyPath
---@field type "null" | "string" | "array" Key path type.
---@field string? string String value.
---@field array? string[] Array value.
---@class CDP.IndexedDB.clearObjectStore_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string Database name.
---@field objectStoreName string Object store name.
---@class CDP.IndexedDB.deleteDatabase_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string Database name.
---@class CDP.IndexedDB.deleteObjectStoreEntries_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string
---@field objectStoreName string
---@field keyRange CDP.IndexedDB.KeyRange Range of entry keys to delete
---@class CDP.IndexedDB.requestData_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string Database name.
---@field objectStoreName string Object store name.
---@field indexName string Index name, empty string for object store data requests.
---@field skipCount integer Number of records to skip.
---@field pageSize integer Number of records to fetch.
---@field keyRange? CDP.IndexedDB.KeyRange Key range.
---@class CDP.IndexedDB.requestData_return
---@field objectStoreDataEntries CDP.IndexedDB.DataEntry[] Array of object store data entries.
---@field hasMore boolean If true, there are more entries to fetch in the given range.
---@class CDP.IndexedDB.getMetadata_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string Database name.
---@field objectStoreName string Object store name.
---@class CDP.IndexedDB.getMetadata_return
---@field entriesCount number the entries count
---@field keyGeneratorValue number the current value of key generator, to become the next inserted<br>key into the object store. Valid if objectStore.autoIncrement<br>is true.
---@class CDP.IndexedDB.requestDatabase_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@field databaseName string Database name.
---@class CDP.IndexedDB.requestDatabase_return
---@field databaseWithObjectStores CDP.IndexedDB.DatabaseWithObjectStores Database with an array of object stores.
---@class CDP.IndexedDB.requestDatabaseNames_parameters
---@field securityOrigin? string At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.<br>Security origin.
---@field storageKey? string Storage key.
---@field storageBucket? CDP.Storage.StorageBucket Storage bucket. If not specified, it uses the default bucket.
---@class CDP.IndexedDB.requestDatabaseNames_return
---@field databaseNames string[] Database names for origin.
---@class CDP.IndexedDB: CDP._ClientContainer
---Clears all entries from an object store.
---@field clearObjectStore fun(self: CDP._ClientContainer, params: CDP.IndexedDB.clearObjectStore_parameters): CDP.Error?
---Deletes a database.
---@field deleteDatabase fun(self: CDP._ClientContainer, params: CDP.IndexedDB.deleteDatabase_parameters): CDP.Error?
---Delete a range of entries from an object store
---@field deleteObjectStoreEntries fun(self: CDP._ClientContainer, params: CDP.IndexedDB.deleteObjectStoreEntries_parameters): CDP.Error?
---Disables events from backend.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables events from backend.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Requests data from object store or index.
---@field requestData fun(self: CDP._ClientContainer, params: CDP.IndexedDB.requestData_parameters): CDP.Error?, CDP.IndexedDB.requestData_return?
---Gets metadata of an object store.
---@field getMetadata fun(self: CDP._ClientContainer, params: CDP.IndexedDB.getMetadata_parameters): CDP.Error?, CDP.IndexedDB.getMetadata_return?
---Requests database with given name in given frame.
---@field requestDatabase fun(self: CDP._ClientContainer, params: CDP.IndexedDB.requestDatabase_parameters): CDP.Error?, CDP.IndexedDB.requestDatabase_return?
---Requests database names for given security origin.
---@field requestDatabaseNames fun(self: CDP._ClientContainer, params: CDP.IndexedDB.requestDatabaseNames_parameters): CDP.Error?, CDP.IndexedDB.requestDatabaseNames_return?

---@class CDP.Input.TouchPoint
---@field x number X coordinate of the event relative to the main frame's viewport in CSS pixels.
---@field y number Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to<br>the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
---@field radiusX? number X radius of the touch area (default: 1.0).
---@field radiusY? number Y radius of the touch area (default: 1.0).
---@field rotationAngle? number Rotation angle (default: 0.0).
---@field force? number Force (default: 1.0).
---@field tangentialPressure? number The normalized tangential pressure, which has a range of [-1,1] (default: 0).
---@field tiltX? integer The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
---@field tiltY? integer The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
---@field twist? integer The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
---@field id? number Identifier used to track touch sources between events, must be unique within an event.
---@alias CDP.Input.GestureSourceType "default" | "touch" | "mouse"
---@alias CDP.Input.MouseButton "none" | "left" | "middle" | "right" | "back" | "forward"
---@alias CDP.Input.TimeSinceEpoch number UTC time in seconds, counted from January 1, 1970.
---@class CDP.Input.DragDataItem
---@field mimeType string Mime type of the dragged data.
---@field data string Depending of the value of `mimeType`, it contains the dragged link,<br>text, HTML markup or any other data.
---@field title? string Title associated with a link. Only valid when `mimeType` == "text/uri-list".
---@field baseURL? string Stores the base URL for the contained markup. Only valid when `mimeType`<br>== "text/html".
---@class CDP.Input.DragData
---@field items CDP.Input.DragDataItem[]
---@field files? string[] List of filenames that should be included when dropping
---@field dragOperationsMask integer Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
---@class CDP.Input.dispatchDragEvent_parameters
---@field type "dragEnter" | "dragOver" | "drop" | "dragCancel" Type of the drag event.
---@field x number X coordinate of the event relative to the main frame's viewport in CSS pixels.
---@field y number Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to<br>the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
---@field data CDP.Input.DragData
---@field modifiers? integer Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8<br>(default: 0).
---@class CDP.Input.dispatchKeyEvent_parameters
---@field type "keyDown" | "keyUp" | "rawKeyDown" | "char" Type of the key event.
---@field modifiers? integer Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8<br>(default: 0).
---@field timestamp? CDP.Input.TimeSinceEpoch Time at which the event occurred.
---@field text? string Text as generated by processing a virtual key code with a keyboard layout. Not needed for<br>for `keyUp` and `rawKeyDown` events (default: "")
---@field unmodifiedText? string Text that would have been generated by the keyboard if no modifiers were pressed (except for<br>shift). Useful for shortcut (accelerator) key handling (default: "").
---@field keyIdentifier? string Unique key identifier (e.g., 'U+0041') (default: "").
---@field code? string Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
---@field key? string Unique DOM defined string value describing the meaning of the key in the context of active<br>modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
---@field windowsVirtualKeyCode? integer Windows virtual key code (default: 0).
---@field nativeVirtualKeyCode? integer Native virtual key code (default: 0).
---@field autoRepeat? boolean Whether the event was generated from auto repeat (default: false).
---@field isKeypad? boolean Whether the event was generated from the keypad (default: false).
---@field isSystemKey? boolean Whether the event was a system key event (default: false).
---@field location? integer Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:<br>0).
---@field commands? string[] Editing commands to send with the key event (e.g., 'selectAll') (default: []).<br>These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.<br>See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
---@class CDP.Input.insertText_parameters
---@field text string The text to insert.
---@class CDP.Input.imeSetComposition_parameters
---@field text string The text to insert
---@field selectionStart integer selection start
---@field selectionEnd integer selection end
---@field replacementStart? integer replacement start
---@field replacementEnd? integer replacement end
---@class CDP.Input.dispatchMouseEvent_parameters
---@field type "mousePressed" | "mouseReleased" | "mouseMoved" | "mouseWheel" Type of the mouse event.
---@field x number X coordinate of the event relative to the main frame's viewport in CSS pixels.
---@field y number Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to<br>the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
---@field modifiers? integer Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8<br>(default: 0).
---@field timestamp? CDP.Input.TimeSinceEpoch Time at which the event occurred.
---@field button? CDP.Input.MouseButton Mouse button (default: "none").
---@field buttons? integer A number indicating which buttons are pressed on the mouse when a mouse event is triggered.<br>Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
---@field clickCount? integer Number of times the mouse button was clicked (default: 0).
---@field force? number The normalized pressure, which has a range of [0,1] (default: 0).
---@field tangentialPressure? number The normalized tangential pressure, which has a range of [-1,1] (default: 0).
---@field tiltX? integer The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
---@field tiltY? integer The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
---@field twist? integer The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
---@field deltaX? number X delta in CSS pixels for mouse wheel event (default: 0).
---@field deltaY? number Y delta in CSS pixels for mouse wheel event (default: 0).
---@field pointerType? "mouse" | "pen" Pointer type (default: "mouse").
---@class CDP.Input.dispatchTouchEvent_parameters
---@field type "touchStart" | "touchEnd" | "touchMove" | "touchCancel" Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while<br>TouchStart and TouchMove must contains at least one.
---@field touchPoints CDP.Input.TouchPoint[] Active touch points on the touch device. One event per any changed point (compared to<br>previous touch event in a sequence) is generated, emulating pressing/moving/releasing points<br>one by one.
---@field modifiers? integer Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8<br>(default: 0).
---@field timestamp? CDP.Input.TimeSinceEpoch Time at which the event occurred.
---@class CDP.Input.emulateTouchFromMouseEvent_parameters
---@field type "mousePressed" | "mouseReleased" | "mouseMoved" | "mouseWheel" Type of the mouse event.
---@field x integer X coordinate of the mouse pointer in DIP.
---@field y integer Y coordinate of the mouse pointer in DIP.
---@field button CDP.Input.MouseButton Mouse button. Only "none", "left", "right" are supported.
---@field timestamp? CDP.Input.TimeSinceEpoch Time at which the event occurred (default: current time).
---@field deltaX? number X delta in DIP for mouse wheel event (default: 0).
---@field deltaY? number Y delta in DIP for mouse wheel event (default: 0).
---@field modifiers? integer Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8<br>(default: 0).
---@field clickCount? integer Number of times the mouse button was clicked (default: 0).
---@class CDP.Input.setIgnoreInputEvents_parameters
---@field ignore boolean Ignores input events processing when set to true.
---@class CDP.Input.setInterceptDrags_parameters
---@field enabled boolean
---@class CDP.Input.synthesizePinchGesture_parameters
---@field x number X coordinate of the start of the gesture in CSS pixels.
---@field y number Y coordinate of the start of the gesture in CSS pixels.
---@field scaleFactor number Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
---@field relativeSpeed? integer Relative pointer speed in pixels per second (default: 800).
---@field gestureSourceType? CDP.Input.GestureSourceType Which type of input events to be generated (default: 'default', which queries the platform<br>for the preferred input type).
---@class CDP.Input.synthesizeScrollGesture_parameters
---@field x number X coordinate of the start of the gesture in CSS pixels.
---@field y number Y coordinate of the start of the gesture in CSS pixels.
---@field xDistance? number The distance to scroll along the X axis (positive to scroll left).
---@field yDistance? number The distance to scroll along the Y axis (positive to scroll up).
---@field xOverscroll? number The number of additional pixels to scroll back along the X axis, in addition to the given<br>distance.
---@field yOverscroll? number The number of additional pixels to scroll back along the Y axis, in addition to the given<br>distance.
---@field preventFling? boolean Prevent fling (default: true).
---@field speed? integer Swipe speed in pixels per second (default: 800).
---@field gestureSourceType? CDP.Input.GestureSourceType Which type of input events to be generated (default: 'default', which queries the platform<br>for the preferred input type).
---@field repeatCount? integer The number of times to repeat the gesture (default: 0).
---@field repeatDelayMs? integer The number of milliseconds delay between each repeat. (default: 250).
---@field interactionMarkerName? string The name of the interaction markers to generate, if not empty (default: "").
---@class CDP.Input.synthesizeTapGesture_parameters
---@field x number X coordinate of the start of the gesture in CSS pixels.
---@field y number Y coordinate of the start of the gesture in CSS pixels.
---@field duration? integer Duration between touchdown and touchup events in ms (default: 50).
---@field tapCount? integer Number of times to perform the tap (e.g. 2 for double tap, default: 1).
---@field gestureSourceType? CDP.Input.GestureSourceType Which type of input events to be generated (default: 'default', which queries the platform<br>for the preferred input type).
---@class CDP.Input.dragIntercepted_event
---@field data CDP.Input.DragData
---@class CDP.Input: CDP._ClientContainer
---Dispatches a drag event into the page.
---@field dispatchDragEvent fun(self: CDP._ClientContainer, params: CDP.Input.dispatchDragEvent_parameters): CDP.Error?
---Dispatches a key event to the page.
---@field dispatchKeyEvent fun(self: CDP._ClientContainer, params: CDP.Input.dispatchKeyEvent_parameters): CDP.Error?
---This method emulates inserting text that doesn't come from a key press,
---for example an emoji keyboard or an IME.
---@field insertText fun(self: CDP._ClientContainer, params: CDP.Input.insertText_parameters): CDP.Error?
---This method sets the current candidate text for ime.
---Use imeCommitComposition to commit the final text.
---Use imeSetComposition with empty string as text to cancel composition.
---@field imeSetComposition fun(self: CDP._ClientContainer, params: CDP.Input.imeSetComposition_parameters): CDP.Error?
---Dispatches a mouse event to the page.
---@field dispatchMouseEvent fun(self: CDP._ClientContainer, params: CDP.Input.dispatchMouseEvent_parameters): CDP.Error?
---Dispatches a touch event to the page.
---@field dispatchTouchEvent fun(self: CDP._ClientContainer, params: CDP.Input.dispatchTouchEvent_parameters): CDP.Error?
---Cancels any active dragging in the page.
---@field cancelDragging fun(self: CDP._ClientContainer): CDP.Error?
---Emulates touch event from the mouse event parameters.
---@field emulateTouchFromMouseEvent fun(self: CDP._ClientContainer, params: CDP.Input.emulateTouchFromMouseEvent_parameters): CDP.Error?
---Ignores input events (useful while auditing page).
---@field setIgnoreInputEvents fun(self: CDP._ClientContainer, params: CDP.Input.setIgnoreInputEvents_parameters): CDP.Error?
---Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
---Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
---@field setInterceptDrags fun(self: CDP._ClientContainer, params: CDP.Input.setInterceptDrags_parameters): CDP.Error?
---Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
---@field synthesizePinchGesture fun(self: CDP._ClientContainer, params: CDP.Input.synthesizePinchGesture_parameters): CDP.Error?
---Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
---@field synthesizeScrollGesture fun(self: CDP._ClientContainer, params: CDP.Input.synthesizeScrollGesture_parameters): CDP.Error?
---Synthesizes a tap gesture over a time period by issuing appropriate touch events.
---@field synthesizeTapGesture fun(self: CDP._ClientContainer, params: CDP.Input.synthesizeTapGesture_parameters): CDP.Error?
---Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
---restore normal drag and drop behavior.
---@field dragIntercepted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Input.dragIntercepted_event)): CDP.Error?

---@class CDP.Inspector.detached_event
---@field reason string The reason why connection has been terminated.
---@class CDP.Inspector: CDP._ClientContainer
---Disables inspector domain notifications.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables inspector domain notifications.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Fired when remote debugging connection is about to be terminated. Contains detach reason.
---@field detached fun(self: CDP._ClientContainer, cb: fun(event: CDP.Inspector.detached_event)): CDP.Error?
---Fired when debugging target has crashed
---@field targetCrashed fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when debugging target has reloaded after crash
---@field targetReloadedAfterCrash fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?

---@alias CDP.LayerTree.LayerId string Unique Layer identifier.
---@alias CDP.LayerTree.SnapshotId string Unique snapshot identifier.
---Rectangle where scrolling happens on the main thread.
---@class CDP.LayerTree.ScrollRect
---@field rect CDP.DOM.Rect Rectangle itself.
---@field type "RepaintsOnScroll" | "TouchEventHandler" | "WheelEventHandler" Reason for rectangle to force scrolling on the main thread
---Sticky position constraints.
---@class CDP.LayerTree.StickyPositionConstraint
---@field stickyBoxRect CDP.DOM.Rect Layout rectangle of the sticky element before being shifted
---@field containingBlockRect CDP.DOM.Rect Layout rectangle of the containing block of the sticky element
---@field nearestLayerShiftingStickyBox? CDP.LayerTree.LayerId The nearest sticky layer that shifts the sticky box
---@field nearestLayerShiftingContainingBlock? CDP.LayerTree.LayerId The nearest sticky layer that shifts the containing block
---Serialized fragment of layer picture along with its offset within the layer.
---@class CDP.LayerTree.PictureTile
---@field x number Offset from owning layer left boundary
---@field y number Offset from owning layer top boundary
---@field picture string Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)
---Information about a compositing layer.
---@class CDP.LayerTree.Layer
---@field layerId CDP.LayerTree.LayerId The unique id for this layer.
---@field parentLayerId? CDP.LayerTree.LayerId The id of parent (not present for root).
---@field backendNodeId? CDP.DOM.BackendNodeId The backend id for the node associated with this layer.
---@field offsetX number Offset from parent layer, X coordinate.
---@field offsetY number Offset from parent layer, Y coordinate.
---@field width number Layer width.
---@field height number Layer height.
---@field transform? number[] Transformation matrix for layer, default is identity matrix
---@field anchorX? number Transform anchor point X, absent if no transform specified
---@field anchorY? number Transform anchor point Y, absent if no transform specified
---@field anchorZ? number Transform anchor point Z, absent if no transform specified
---@field paintCount integer Indicates how many time this layer has painted.
---@field drawsContent boolean Indicates whether this layer hosts any content, rather than being used for<br>transform/scrolling purposes only.
---@field invisible? boolean Set if layer is not visible.
---@field scrollRects? CDP.LayerTree.ScrollRect[] Rectangles scrolling on main thread only.
---@field stickyPositionConstraint? CDP.LayerTree.StickyPositionConstraint Sticky position constraint information
---@alias CDP.LayerTree.PaintProfile number[] Array of timings, one per paint step.
---@class CDP.LayerTree.compositingReasons_parameters
---@field layerId CDP.LayerTree.LayerId The id of the layer for which we want to get the reasons it was composited.
---@class CDP.LayerTree.compositingReasons_return
---@field compositingReasons string[] A list of strings specifying reasons for the given layer to become composited.
---@field compositingReasonIds string[] A list of strings specifying reason IDs for the given layer to become composited.
---@class CDP.LayerTree.loadSnapshot_parameters
---@field tiles CDP.LayerTree.PictureTile[] An array of tiles composing the snapshot.
---@class CDP.LayerTree.loadSnapshot_return
---@field snapshotId CDP.LayerTree.SnapshotId The id of the snapshot.
---@class CDP.LayerTree.makeSnapshot_parameters
---@field layerId CDP.LayerTree.LayerId The id of the layer.
---@class CDP.LayerTree.makeSnapshot_return
---@field snapshotId CDP.LayerTree.SnapshotId The id of the layer snapshot.
---@class CDP.LayerTree.profileSnapshot_parameters
---@field snapshotId CDP.LayerTree.SnapshotId The id of the layer snapshot.
---@field minRepeatCount? integer The maximum number of times to replay the snapshot (1, if not specified).
---@field minDuration? number The minimum duration (in seconds) to replay the snapshot.
---@field clipRect? CDP.DOM.Rect The clip rectangle to apply when replaying the snapshot.
---@class CDP.LayerTree.profileSnapshot_return
---@field timings CDP.LayerTree.PaintProfile[] The array of paint profiles, one per run.
---@class CDP.LayerTree.releaseSnapshot_parameters
---@field snapshotId CDP.LayerTree.SnapshotId The id of the layer snapshot.
---@class CDP.LayerTree.replaySnapshot_parameters
---@field snapshotId CDP.LayerTree.SnapshotId The id of the layer snapshot.
---@field fromStep? integer The first step to replay from (replay from the very start if not specified).
---@field toStep? integer The last step to replay to (replay till the end if not specified).
---@field scale? number The scale to apply while replaying (defaults to 1).
---@class CDP.LayerTree.replaySnapshot_return
---@field dataURL string A data: URL for resulting image.
---@class CDP.LayerTree.snapshotCommandLog_parameters
---@field snapshotId CDP.LayerTree.SnapshotId The id of the layer snapshot.
---@class CDP.LayerTree.snapshotCommandLog_return
---@field commandLog table[] The array of canvas function calls.
---@class CDP.LayerTree.layerPainted_event
---@field layerId CDP.LayerTree.LayerId The id of the painted layer.
---@field clip CDP.DOM.Rect Clip rectangle.
---@class CDP.LayerTree.layerTreeDidChange_event
---@field layers? CDP.LayerTree.Layer[] Layer tree, absent if not in the comspositing mode.
---@class CDP.LayerTree: CDP._ClientContainer
---Provides the reasons why the given layer was composited.
---@field compositingReasons fun(self: CDP._ClientContainer, params: CDP.LayerTree.compositingReasons_parameters): CDP.Error?, CDP.LayerTree.compositingReasons_return?
---Disables compositing tree inspection.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables compositing tree inspection.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Returns the snapshot identifier.
---@field loadSnapshot fun(self: CDP._ClientContainer, params: CDP.LayerTree.loadSnapshot_parameters): CDP.Error?, CDP.LayerTree.loadSnapshot_return?
---Returns the layer snapshot identifier.
---@field makeSnapshot fun(self: CDP._ClientContainer, params: CDP.LayerTree.makeSnapshot_parameters): CDP.Error?, CDP.LayerTree.makeSnapshot_return?
---@field profileSnapshot fun(self: CDP._ClientContainer, params: CDP.LayerTree.profileSnapshot_parameters): CDP.Error?, CDP.LayerTree.profileSnapshot_return?
---Releases layer snapshot captured by the back-end.
---@field releaseSnapshot fun(self: CDP._ClientContainer, params: CDP.LayerTree.releaseSnapshot_parameters): CDP.Error?
---Replays the layer snapshot and returns the resulting bitmap.
---@field replaySnapshot fun(self: CDP._ClientContainer, params: CDP.LayerTree.replaySnapshot_parameters): CDP.Error?, CDP.LayerTree.replaySnapshot_return?
---Replays the layer snapshot and returns canvas log.
---@field snapshotCommandLog fun(self: CDP._ClientContainer, params: CDP.LayerTree.snapshotCommandLog_parameters): CDP.Error?, CDP.LayerTree.snapshotCommandLog_return?
---@field layerPainted fun(self: CDP._ClientContainer, cb: fun(event: CDP.LayerTree.layerPainted_event)): CDP.Error?
---@field layerTreeDidChange fun(self: CDP._ClientContainer, cb: fun(event: CDP.LayerTree.layerTreeDidChange_event)): CDP.Error?

---Log entry.
---@class CDP.Log.LogEntry
---@field source "xml" | "javascript" | "network" | "storage" | "appcache" | "rendering" | "security" | "deprecation" | "worker" | "violation" | "intervention" | "recommendation" | "other" Log entry source.
---@field level "verbose" | "info" | "warning" | "error" Log entry severity.
---@field text string Logged text.
---@field category? "cors"
---@field timestamp CDP.Runtime.Timestamp Timestamp when this entry was added.
---@field url? string URL of the resource if known.
---@field lineNumber? integer Line number in the resource.
---@field stackTrace? CDP.Runtime.StackTrace JavaScript stack trace.
---@field networkRequestId? CDP.Network.RequestId Identifier of the network request associated with this entry.
---@field workerId? string Identifier of the worker associated with this entry.
---@field args? CDP.Runtime.RemoteObject[] Call arguments.
---Violation configuration setting.
---@class CDP.Log.ViolationSetting
---@field name "longTask" | "longLayout" | "blockedEvent" | "blockedParser" | "discouragedAPIUse" | "handler" | "recurringHandler" Violation type.
---@field threshold number Time threshold to trigger upon.
---@class CDP.Log.startViolationsReport_parameters
---@field config CDP.Log.ViolationSetting[] Configuration for violations.
---@class CDP.Log.entryAdded_event
---@field entry CDP.Log.LogEntry The entry.
---Provides access to log entries.
---@class CDP.Log: CDP._ClientContainer
---Clears the log.
---@field clear fun(self: CDP._ClientContainer): CDP.Error?
---Disables log domain, prevents further log entries from being reported to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables log domain, sends the entries collected so far to the client by means of the
---`entryAdded` notification.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---start violation reporting.
---@field startViolationsReport fun(self: CDP._ClientContainer, params: CDP.Log.startViolationsReport_parameters): CDP.Error?
---Stop violation reporting.
---@field stopViolationsReport fun(self: CDP._ClientContainer): CDP.Error?
---Issued when new message was logged.
---@field entryAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.Log.entryAdded_event)): CDP.Error?

---@alias CDP.Memory.PressureLevel "moderate" | "critical" Memory pressure level.
---Heap profile sample.
---@class CDP.Memory.SamplingProfileNode
---@field size number Size of the sampled allocation.
---@field total number Total bytes attributed to this sample.
---@field stack string[] Execution stack at the point of allocation.
---Array of heap profile samples.
---@class CDP.Memory.SamplingProfile
---@field samples CDP.Memory.SamplingProfileNode[]
---@field modules CDP.Memory.Module[]
---Executable module information
---@class CDP.Memory.Module
---@field name string Name of the module.
---@field uuid string UUID of the module.
---@field baseAddress string Base address where the module is loaded into memory. Encoded as a decimal<br>or hexadecimal (0x prefixed) string.
---@field size number Size of the module in bytes.
---@class CDP.Memory.getDOMCounters_return
---@field documents integer
---@field nodes integer
---@field jsEventListeners integer
---@class CDP.Memory.setPressureNotificationsSuppressed_parameters
---@field suppressed boolean If true, memory pressure notifications will be suppressed.
---@class CDP.Memory.simulatePressureNotification_parameters
---@field level CDP.Memory.PressureLevel Memory pressure level of the notification.
---@class CDP.Memory.startSampling_parameters
---@field samplingInterval? integer Average number of bytes between samples.
---@field suppressRandomness? boolean Do not randomize intervals between samples.
---@class CDP.Memory.getAllTimeSamplingProfile_return
---@field profile CDP.Memory.SamplingProfile
---@class CDP.Memory.getBrowserSamplingProfile_return
---@field profile CDP.Memory.SamplingProfile
---@class CDP.Memory.getSamplingProfile_return
---@field profile CDP.Memory.SamplingProfile
---@class CDP.Memory: CDP._ClientContainer
---@field getDOMCounters fun(self: CDP._ClientContainer): CDP.Error?, CDP.Memory.getDOMCounters_return?
---@field prepareForLeakDetection fun(self: CDP._ClientContainer): CDP.Error?
---Simulate OomIntervention by purging V8 memory.
---@field forciblyPurgeJavaScriptMemory fun(self: CDP._ClientContainer): CDP.Error?
---Enable/disable suppressing memory pressure notifications in all processes.
---@field setPressureNotificationsSuppressed fun(self: CDP._ClientContainer, params: CDP.Memory.setPressureNotificationsSuppressed_parameters): CDP.Error?
---Simulate a memory pressure notification in all processes.
---@field simulatePressureNotification fun(self: CDP._ClientContainer, params: CDP.Memory.simulatePressureNotification_parameters): CDP.Error?
---Start collecting native memory profile.
---@field startSampling fun(self: CDP._ClientContainer, params: CDP.Memory.startSampling_parameters): CDP.Error?
---Stop collecting native memory profile.
---@field stopSampling fun(self: CDP._ClientContainer): CDP.Error?
---Retrieve native memory allocations profile
---collected since renderer process startup.
---@field getAllTimeSamplingProfile fun(self: CDP._ClientContainer): CDP.Error?, CDP.Memory.getAllTimeSamplingProfile_return?
---Retrieve native memory allocations profile
---collected since browser process startup.
---@field getBrowserSamplingProfile fun(self: CDP._ClientContainer): CDP.Error?, CDP.Memory.getBrowserSamplingProfile_return?
---Retrieve native memory allocations profile collected since last
---`startSampling` call.
---@field getSamplingProfile fun(self: CDP._ClientContainer): CDP.Error?, CDP.Memory.getSamplingProfile_return?

---@alias CDP.Network.ResourceType "Document" | "Stylesheet" | "Image" | "Media" | "Font" | "Script" | "TextTrack" | "XHR" | "Fetch" | "Prefetch" | "EventSource" | "WebSocket" | "Manifest" | "SignedExchange" | "Ping" | "CSPViolationReport" | "Preflight" | "Other" Resource type as it was perceived by the rendering engine.
---@alias CDP.Network.LoaderId string Unique loader identifier.
---@alias CDP.Network.RequestId string Unique request identifier.
---@alias CDP.Network.InterceptionId string Unique intercepted request identifier.
---@alias CDP.Network.ErrorReason "Failed" | "Aborted" | "TimedOut" | "AccessDenied" | "ConnectionClosed" | "ConnectionReset" | "ConnectionRefused" | "ConnectionAborted" | "ConnectionFailed" | "NameNotResolved" | "InternetDisconnected" | "AddressUnreachable" | "BlockedByClient" | "BlockedByResponse" Network level fetch failure reason.
---@alias CDP.Network.TimeSinceEpoch number UTC time in seconds, counted from January 1, 1970.
---@alias CDP.Network.MonotonicTime number Monotonically increasing time in seconds since an arbitrary point in the past.
---@alias CDP.Network.Headers table Request / response headers as keys / values of JSON object.
---@alias CDP.Network.ConnectionType "none" | "cellular2g" | "cellular3g" | "cellular4g" | "bluetooth" | "ethernet" | "wifi" | "wimax" | "other" The underlying connection technology that the browser is supposedly using.
---@alias CDP.Network.CookieSameSite "Strict" | "Lax" | "None" Represents the cookie's 'SameSite' status:<br>https://tools.ietf.org/html/draft-west-first-party-cookies
---@alias CDP.Network.CookiePriority "Low" | "Medium" | "High" Represents the cookie's 'Priority' status:<br>https://tools.ietf.org/html/draft-west-cookie-priority-00
---@alias CDP.Network.CookieSourceScheme "Unset" | "NonSecure" | "Secure" Represents the source scheme of the origin that originally set the cookie.<br>A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme.<br>This is a temporary ability and it will be removed in the future.
---Timing information for the request.
---@class CDP.Network.ResourceTiming
---@field requestTime number Timing's requestTime is a baseline in seconds, while the other numbers are ticks in<br>milliseconds relatively to this requestTime.
---@field proxyStart number Started resolving proxy.
---@field proxyEnd number Finished resolving proxy.
---@field dnsStart number Started DNS address resolve.
---@field dnsEnd number Finished DNS address resolve.
---@field connectStart number Started connecting to the remote host.
---@field connectEnd number Connected to the remote host.
---@field sslStart number Started SSL handshake.
---@field sslEnd number Finished SSL handshake.
---@field workerStart number Started running ServiceWorker.
---@field workerReady number Finished Starting ServiceWorker.
---@field workerFetchStart number Started fetch event.
---@field workerRespondWithSettled number Settled fetch event respondWith promise.
---@field sendStart number Started sending request.
---@field sendEnd number Finished sending request.
---@field pushStart number Time the server started pushing request.
---@field pushEnd number Time the server finished pushing request.
---@field receiveHeadersStart number Started receiving response headers.
---@field receiveHeadersEnd number Finished receiving response headers.
---@alias CDP.Network.ResourcePriority "VeryLow" | "Low" | "Medium" | "High" | "VeryHigh" Loading priority of a resource request.
---Post data entry for HTTP request
---@class CDP.Network.PostDataEntry
---@field bytes? string
---HTTP request data.
---@class CDP.Network.Request
---@field url string Request URL (without fragment).
---@field urlFragment? string Fragment of the requested URL starting with hash, if present.
---@field method string HTTP request method.
---@field headers CDP.Network.Headers HTTP request headers.
---@field postData? string HTTP POST request data.
---@field hasPostData? boolean 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.
---@field postDataEntries? CDP.Network.PostDataEntry[] Request body elements. This will be converted from base64 to binary
---@field mixedContentType? CDP.Security.MixedContentType The mixed content type of the request.
---@field initialPriority CDP.Network.ResourcePriority Priority of the resource request at the time request is sent.
---@field referrerPolicy "unsafe-url" | "no-referrer-when-downgrade" | "no-referrer" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
---@field isLinkPreload? boolean Whether is loaded via link preload.
---@field trustTokenParams? CDP.Network.TrustTokenParams Set for requests when the TrustToken API is used. Contains the parameters<br>passed by the developer (e.g. via "fetch") as understood by the backend.
---@field isSameSite? boolean True if this resource request is considered to be the 'same site' as the<br>request correspondinfg to the main frame.
---Details of a signed certificate timestamp (SCT).
---@class CDP.Network.SignedCertificateTimestamp
---@field status string Validation status.
---@field origin string Origin.
---@field logDescription string Log name / description.
---@field logId string Log ID.
---@field timestamp number Issuance date. Unlike TimeSinceEpoch, this contains the number of<br>milliseconds since January 1, 1970, UTC, not the number of seconds.
---@field hashAlgorithm string Hash algorithm.
---@field signatureAlgorithm string Signature algorithm.
---@field signatureData string Signature data.
---Security details about a request.
---@class CDP.Network.SecurityDetails
---@field protocol string Protocol name (e.g. "TLS 1.2" or "QUIC").
---@field keyExchange string Key Exchange used by the connection, or the empty string if not applicable.
---@field keyExchangeGroup? string (EC)DH group used by the connection, if applicable.
---@field cipher string Cipher name.
---@field mac? string TLS MAC. Note that AEAD ciphers do not have separate MACs.
---@field certificateId CDP.Security.CertificateId Certificate ID value.
---@field subjectName string Certificate subject name.
---@field sanList string[] Subject Alternative Name (SAN) DNS names and IP addresses.
---@field issuer string Name of the issuing CA.
---@field validFrom CDP.Network.TimeSinceEpoch Certificate valid from date.
---@field validTo CDP.Network.TimeSinceEpoch Certificate valid to (expiration) date
---@field signedCertificateTimestampList CDP.Network.SignedCertificateTimestamp[] List of signed certificate timestamps (SCTs).
---@field certificateTransparencyCompliance CDP.Network.CertificateTransparencyCompliance Whether the request complied with Certificate Transparency policy
---@field serverSignatureAlgorithm? integer The signature algorithm used by the server in the TLS server signature,<br>represented as a TLS SignatureScheme code point. Omitted if not<br>applicable or not known.
---@field encryptedClientHello boolean Whether the connection used Encrypted ClientHello
---@alias CDP.Network.CertificateTransparencyCompliance "unknown" | "not-compliant" | "compliant" Whether the request complied with Certificate Transparency policy.
---@alias CDP.Network.BlockedReason "other" | "csp" | "mixed-content" | "origin" | "inspector" | "subresource-filter" | "content-type" | "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" The reason why request was blocked.
---@alias CDP.Network.CorsError "DisallowedByMode" | "InvalidResponse" | "WildcardOriginNotAllowed" | "MissingAllowOriginHeader" | "MultipleAllowOriginValues" | "InvalidAllowOriginValue" | "AllowOriginMismatch" | "InvalidAllowCredentials" | "CorsDisabledScheme" | "PreflightInvalidStatus" | "PreflightDisallowedRedirect" | "PreflightWildcardOriginNotAllowed" | "PreflightMissingAllowOriginHeader" | "PreflightMultipleAllowOriginValues" | "PreflightInvalidAllowOriginValue" | "PreflightAllowOriginMismatch" | "PreflightInvalidAllowCredentials" | "PreflightMissingAllowExternal" | "PreflightInvalidAllowExternal" | "PreflightMissingAllowPrivateNetwork" | "PreflightInvalidAllowPrivateNetwork" | "InvalidAllowMethodsPreflightResponse" | "InvalidAllowHeadersPreflightResponse" | "MethodDisallowedByPreflightResponse" | "HeaderDisallowedByPreflightResponse" | "RedirectContainsCredentials" | "InsecurePrivateNetwork" | "InvalidPrivateNetworkAccess" | "UnexpectedPrivateNetworkAccess" | "NoCorsRedirectModeNotFollow" | "PreflightMissingPrivateNetworkAccessId" | "PreflightMissingPrivateNetworkAccessName" | "PrivateNetworkAccessPermissionUnavailable" | "PrivateNetworkAccessPermissionDenied" The reason why request was blocked.
---@class CDP.Network.CorsErrorStatus
---@field corsError CDP.Network.CorsError
---@field failedParameter string
---@alias CDP.Network.ServiceWorkerResponseSource "cache-storage" | "http-cache" | "fallback-code" | "network" Source of serviceworker response.
---Determines what type of Trust Token operation is executed and
---depending on the type, some additional parameters. The values
---are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
---@class CDP.Network.TrustTokenParams
---@field operation CDP.Network.TrustTokenOperationType
---@field refreshPolicy "UseCached" | "Refresh" Only set for "token-redemption" operation and determine whether<br>to request a fresh SRR or use a still valid cached SRR.
---@field issuers? string[] Origins of issuers from whom to request tokens or redemption<br>records.
---@alias CDP.Network.TrustTokenOperationType "Issuance" | "Redemption" | "Signing"
---@alias CDP.Network.AlternateProtocolUsage "alternativeJobWonWithoutRace" | "alternativeJobWonRace" | "mainJobWonRace" | "mappingMissing" | "broken" | "dnsAlpnH3JobWonWithoutRace" | "dnsAlpnH3JobWonRace" | "unspecifiedReason" The reason why Chrome uses a specific transport protocol for HTTP semantics.
---HTTP response data.
---@class CDP.Network.Response
---@field url string Response URL. This URL can be different from CachedResource.url in case of redirect.
---@field status integer HTTP response status code.
---@field statusText string HTTP response status text.
---@field headers CDP.Network.Headers HTTP response headers.
---@field headersText? string HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
---@field mimeType string Resource mimeType as determined by the browser.
---@field requestHeaders? CDP.Network.Headers Refined HTTP request headers that were actually transmitted over the network.
---@field requestHeadersText? string HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
---@field connectionReused boolean Specifies whether physical connection was actually reused for this request.
---@field connectionId number Physical connection id that was actually used for this request.
---@field remoteIPAddress? string Remote IP address.
---@field remotePort? integer Remote port.
---@field fromDiskCache? boolean Specifies that the request was served from the disk cache.
---@field fromServiceWorker? boolean Specifies that the request was served from the ServiceWorker.
---@field fromPrefetchCache? boolean Specifies that the request was served from the prefetch cache.
---@field encodedDataLength number Total number of bytes received for this request so far.
---@field timing? CDP.Network.ResourceTiming Timing information for the given request.
---@field serviceWorkerResponseSource? CDP.Network.ServiceWorkerResponseSource Response source of response from ServiceWorker.
---@field responseTime? CDP.Network.TimeSinceEpoch The time at which the returned response was generated.
---@field cacheStorageCacheName? string Cache Storage Cache Name.
---@field protocol? string Protocol used to fetch this request.
---@field alternateProtocolUsage? CDP.Network.AlternateProtocolUsage The reason why Chrome uses a specific transport protocol for HTTP semantics.
---@field securityState CDP.Security.SecurityState Security state of the request resource.
---@field securityDetails? CDP.Network.SecurityDetails Security details for the request.
---WebSocket request data.
---@class CDP.Network.WebSocketRequest
---@field headers CDP.Network.Headers HTTP request headers.
---WebSocket response data.
---@class CDP.Network.WebSocketResponse
---@field status integer HTTP response status code.
---@field statusText string HTTP response status text.
---@field headers CDP.Network.Headers HTTP response headers.
---@field headersText? string HTTP response headers text.
---@field requestHeaders? CDP.Network.Headers HTTP request headers.
---@field requestHeadersText? string HTTP request headers text.
---WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
---@class CDP.Network.WebSocketFrame
---@field opcode number WebSocket message opcode.
---@field mask boolean WebSocket message mask.
---@field payloadData string WebSocket message payload data.<br>If the opcode is 1, this is a text message and payloadData is a UTF-8 string.<br>If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
---Information about the cached resource.
---@class CDP.Network.CachedResource
---@field url string Resource URL. This is the url of the original network request.
---@field type CDP.Network.ResourceType Type of this resource.
---@field response? CDP.Network.Response Cached response data.
---@field bodySize number Cached response body size.
---Information about the request initiator.
---@class CDP.Network.Initiator
---@field type "parser" | "script" | "preload" | "SignedExchange" | "preflight" | "other" Type of this initiator.
---@field stack? CDP.Runtime.StackTrace Initiator JavaScript stack trace, set for Script only.
---@field url? string Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
---@field lineNumber? number Initiator line number, set for Parser type or for Script type (when script is importing<br>module) (0-based).
---@field columnNumber? number Initiator column number, set for Parser type or for Script type (when script is importing<br>module) (0-based).
---@field requestId? CDP.Network.RequestId Set if another request triggered this request (e.g. preflight).
---Cookie object
---@class CDP.Network.Cookie
---@field name string Cookie name.
---@field value string Cookie value.
---@field domain string Cookie domain.
---@field path string Cookie path.
---@field expires number Cookie expiration date as the number of seconds since the UNIX epoch.
---@field size integer Cookie size.
---@field httpOnly boolean True if cookie is http-only.
---@field secure boolean True if cookie is secure.
---@field session boolean True in case of session cookie.
---@field sameSite? CDP.Network.CookieSameSite Cookie SameSite type.
---@field priority CDP.Network.CookiePriority Cookie Priority
---@field sameParty boolean True if cookie is SameParty.
---@field sourceScheme CDP.Network.CookieSourceScheme Cookie source scheme type.
---@field sourcePort integer Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.<br>An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.<br>This is a temporary ability and it will be removed in the future.
---@field partitionKey? string Cookie partition key. The site of the top-level URL the browser was visiting at the start<br>of the request to the endpoint that set the cookie.
---@field partitionKeyOpaque? boolean True if cookie partition key is opaque.
---@alias CDP.Network.SetCookieBlockedReason "SecureOnly" | "SameSiteStrict" | "SameSiteLax" | "SameSiteUnspecifiedTreatedAsLax" | "SameSiteNoneInsecure" | "UserPreferences" | "ThirdPartyBlockedInFirstPartySet" | "SyntaxError" | "SchemeNotSupported" | "OverwriteSecure" | "InvalidDomain" | "InvalidPrefix" | "UnknownError" | "SchemefulSameSiteStrict" | "SchemefulSameSiteLax" | "SchemefulSameSiteUnspecifiedTreatedAsLax" | "SamePartyFromCrossPartyContext" | "SamePartyConflictsWithOtherAttributes" | "NameValuePairExceedsMaxSize" | "DisallowedCharacter" Types of reasons why a cookie may not be stored from a response.
---@alias CDP.Network.CookieBlockedReason "SecureOnly" | "NotOnPath" | "DomainMismatch" | "SameSiteStrict" | "SameSiteLax" | "SameSiteUnspecifiedTreatedAsLax" | "SameSiteNoneInsecure" | "UserPreferences" | "ThirdPartyBlockedInFirstPartySet" | "UnknownError" | "SchemefulSameSiteStrict" | "SchemefulSameSiteLax" | "SchemefulSameSiteUnspecifiedTreatedAsLax" | "SamePartyFromCrossPartyContext" | "NameValuePairExceedsMaxSize" Types of reasons why a cookie may not be sent with a request.
---A cookie which was not stored from a response with the corresponding reason.
---@class CDP.Network.BlockedSetCookieWithReason
---@field blockedReasons CDP.Network.SetCookieBlockedReason[] The reason(s) this cookie was blocked.
---@field cookieLine string The string representing this individual cookie as it would appear in the header.<br>This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
---@field cookie? CDP.Network.Cookie The cookie object which represents the cookie which was not stored. It is optional because<br>sometimes complete cookie information is not available, such as in the case of parsing<br>errors.
---A cookie with was not sent with a request with the corresponding reason.
---@class CDP.Network.BlockedCookieWithReason
---@field blockedReasons CDP.Network.CookieBlockedReason[] The reason(s) the cookie was blocked.
---@field cookie CDP.Network.Cookie The cookie object representing the cookie which was not sent.
---Cookie parameter object
---@class CDP.Network.CookieParam
---@field name string Cookie name.
---@field value string Cookie value.
---@field url? string The request-URI to associate with the setting of the cookie. This value can affect the<br>default domain, path, source port, and source scheme values of the created cookie.
---@field domain? string Cookie domain.
---@field path? string Cookie path.
---@field secure? boolean True if cookie is secure.
---@field httpOnly? boolean True if cookie is http-only.
---@field sameSite? CDP.Network.CookieSameSite Cookie SameSite type.
---@field expires? CDP.Network.TimeSinceEpoch Cookie expiration date, session cookie if not set
---@field priority? CDP.Network.CookiePriority Cookie Priority.
---@field sameParty? boolean True if cookie is SameParty.
---@field sourceScheme? CDP.Network.CookieSourceScheme Cookie source scheme type.
---@field sourcePort? integer Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.<br>An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.<br>This is a temporary ability and it will be removed in the future.
---@field partitionKey? string Cookie partition key. The site of the top-level URL the browser was visiting at the start<br>of the request to the endpoint that set the cookie.<br>If not set, the cookie will be set as not partitioned.
---Authorization challenge for HTTP status code 401 or 407.
---@class CDP.Network.AuthChallenge
---@field source? "Server" | "Proxy" Source of the authentication challenge.
---@field origin string Origin of the challenger.
---@field scheme string The authentication scheme used, such as basic or digest
---@field realm string The realm of the challenge. May be empty.
---Response to an AuthChallenge.
---@class CDP.Network.AuthChallengeResponse
---@field response "Default" | "CancelAuth" | "ProvideCredentials" The decision on what to do in response to the authorization challenge.  Default means<br>deferring to the default behavior of the net stack, which will likely either the Cancel<br>authentication or display a popup dialog box.
---@field username? string The username to provide, possibly empty. Should only be set if response is<br>ProvideCredentials.
---@field password? string The password to provide, possibly empty. Should only be set if response is<br>ProvideCredentials.
---@alias CDP.Network.InterceptionStage "Request" | "HeadersReceived" Stages of the interception to begin intercepting. Request will intercept before the request is<br>sent. Response will intercept after the response is received.
---Request pattern for interception.
---@class CDP.Network.RequestPattern
---@field urlPattern? string Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is<br>backslash. Omitting is equivalent to `"*"`.
---@field resourceType? CDP.Network.ResourceType If set, only requests for matching resource types will be intercepted.
---@field interceptionStage? CDP.Network.InterceptionStage Stage at which to begin intercepting requests. Default is Request.
---Information about a signed exchange signature.
---https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
---@class CDP.Network.SignedExchangeSignature
---@field label string Signed exchange signature label.
---@field signature string The hex string of signed exchange signature.
---@field integrity string Signed exchange signature integrity.
---@field certUrl? string Signed exchange signature cert Url.
---@field certSha256? string The hex string of signed exchange signature cert sha256.
---@field validityUrl string Signed exchange signature validity Url.
---@field date integer Signed exchange signature date.
---@field expires integer Signed exchange signature expires.
---@field certificates? string[] The encoded certificates.
---Information about a signed exchange header.
---https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
---@class CDP.Network.SignedExchangeHeader
---@field requestUrl string Signed exchange request URL.
---@field responseCode integer Signed exchange response code.
---@field responseHeaders CDP.Network.Headers Signed exchange response headers.
---@field signatures CDP.Network.SignedExchangeSignature[] Signed exchange response signature.
---@field headerIntegrity string Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.
---@alias CDP.Network.SignedExchangeErrorField "signatureSig" | "signatureIntegrity" | "signatureCertUrl" | "signatureCertSha256" | "signatureValidityUrl" | "signatureTimestamps" Field type for a signed exchange related error.
---Information about a signed exchange response.
---@class CDP.Network.SignedExchangeError
---@field message string Error message.
---@field signatureIndex? integer The index of the signature which caused the error.
---@field errorField? CDP.Network.SignedExchangeErrorField The field which caused the error.
---Information about a signed exchange response.
---@class CDP.Network.SignedExchangeInfo
---@field outerResponse CDP.Network.Response The outer response of signed HTTP exchange which was received from network.
---@field header? CDP.Network.SignedExchangeHeader Information about the signed exchange header.
---@field securityDetails? CDP.Network.SecurityDetails Security details for the signed exchange header.
---@field errors? CDP.Network.SignedExchangeError[] Errors occurred while handling the signed exchagne.
---@alias CDP.Network.ContentEncoding "deflate" | "gzip" | "br" | "zstd" List of content encodings supported by the backend.
---@alias CDP.Network.PrivateNetworkRequestPolicy "Allow" | "BlockFromInsecureToMorePrivate" | "WarnFromInsecureToMorePrivate" | "PreflightBlock" | "PreflightWarn"
---@alias CDP.Network.IPAddressSpace "Local" | "Private" | "Public" | "Unknown"
---@class CDP.Network.ConnectTiming
---@field requestTime number Timing's requestTime is a baseline in seconds, while the other numbers are ticks in<br>milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for<br>the same request (but not for redirected requests).
---@class CDP.Network.ClientSecurityState
---@field initiatorIsSecureContext boolean
---@field initiatorIPAddressSpace CDP.Network.IPAddressSpace
---@field privateNetworkRequestPolicy CDP.Network.PrivateNetworkRequestPolicy
---@alias CDP.Network.CrossOriginOpenerPolicyValue "SameOrigin" | "SameOriginAllowPopups" | "RestrictProperties" | "UnsafeNone" | "SameOriginPlusCoep" | "RestrictPropertiesPlusCoep"
---@class CDP.Network.CrossOriginOpenerPolicyStatus
---@field value CDP.Network.CrossOriginOpenerPolicyValue
---@field reportOnlyValue CDP.Network.CrossOriginOpenerPolicyValue
---@field reportingEndpoint? string
---@field reportOnlyReportingEndpoint? string
---@alias CDP.Network.CrossOriginEmbedderPolicyValue "None" | "Credentialless" | "RequireCorp"
---@class CDP.Network.CrossOriginEmbedderPolicyStatus
---@field value CDP.Network.CrossOriginEmbedderPolicyValue
---@field reportOnlyValue CDP.Network.CrossOriginEmbedderPolicyValue
---@field reportingEndpoint? string
---@field reportOnlyReportingEndpoint? string
---@alias CDP.Network.ContentSecurityPolicySource "HTTP" | "Meta"
---@class CDP.Network.ContentSecurityPolicyStatus
---@field effectiveDirectives string
---@field isEnforced boolean
---@field source CDP.Network.ContentSecurityPolicySource
---@class CDP.Network.SecurityIsolationStatus
---@field coop? CDP.Network.CrossOriginOpenerPolicyStatus
---@field coep? CDP.Network.CrossOriginEmbedderPolicyStatus
---@field csp? CDP.Network.ContentSecurityPolicyStatus[]
---@alias CDP.Network.ReportStatus "Queued" | "Pending" | "MarkedForRemoval" | "Success" The status of a Reporting API report.
---@alias CDP.Network.ReportId string
---An object representing a report generated by the Reporting API.
---@class CDP.Network.ReportingApiReport
---@field id CDP.Network.ReportId
---@field initiatorUrl string The URL of the document that triggered the report.
---@field destination string The name of the endpoint group that should be used to deliver the report.
---@field type string The type of the report (specifies the set of data that is contained in the report body).
---@field timestamp CDP.Network.TimeSinceEpoch When the report was generated.
---@field depth integer How many uploads deep the related request was.
---@field completedAttempts integer The number of delivery attempts made so far, not including an active attempt.
---@field body table
---@field status CDP.Network.ReportStatus
---@class CDP.Network.ReportingApiEndpoint
---@field url string The URL of the endpoint to which reports may be delivered.
---@field groupName string Name of the endpoint group.
---An object providing the result of a network resource load.
---@class CDP.Network.LoadNetworkResourcePageResult
---@field success boolean
---@field netError? number Optional values used for error reporting.
---@field netErrorName? string
---@field httpStatusCode? number
---@field stream? CDP.IO.StreamHandle If successful, one of the following two fields holds the result.
---@field headers? CDP.Network.Headers Response headers.
---An options object that may be extended later to better support CORS,
---CORB and streaming.
---@class CDP.Network.LoadNetworkResourceOptions
---@field disableCache boolean
---@field includeCredentials boolean
---@class CDP.Network.setAcceptedEncodings_parameters
---@field encodings CDP.Network.ContentEncoding[] List of accepted content encodings.
---@class CDP.Network.canClearBrowserCache_return
---@field result boolean True if browser cache can be cleared.
---@class CDP.Network.canClearBrowserCookies_return
---@field result boolean True if browser cookies can be cleared.
---@class CDP.Network.canEmulateNetworkConditions_return
---@field result boolean True if emulation of network conditions is supported.
---@class CDP.Network.continueInterceptedRequest_parameters
---@field interceptionId CDP.Network.InterceptionId
---@field errorReason? CDP.Network.ErrorReason If set this causes the request to fail with the given reason. Passing `Aborted` for requests<br>marked with `isNavigationRequest` also cancels the navigation. Must not be set in response<br>to an authChallenge.
---@field rawResponse? string If set the requests completes using with the provided base64 encoded raw response, including<br>HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON)
---@field url? string If set the request url will be modified in a way that's not observable by page. Must not be<br>set in response to an authChallenge.
---@field method? string If set this allows the request method to be overridden. Must not be set in response to an<br>authChallenge.
---@field postData? string If set this allows postData to be set. Must not be set in response to an authChallenge.
---@field headers? CDP.Network.Headers If set this allows the request headers to be changed. Must not be set in response to an<br>authChallenge.
---@field authChallengeResponse? CDP.Network.AuthChallengeResponse Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
---@class CDP.Network.deleteCookies_parameters
---@field name string Name of the cookies to remove.
---@field url? string If specified, deletes all the cookies with the given name where domain and path match<br>provided URL.
---@field domain? string If specified, deletes only cookies with the exact domain.
---@field path? string If specified, deletes only cookies with the exact path.
---@class CDP.Network.emulateNetworkConditions_parameters
---@field offline boolean True to emulate internet disconnection.
---@field latency number Minimum latency from request sent to response headers received (ms).
---@field downloadThroughput number Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
---@field uploadThroughput number Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
---@field connectionType? CDP.Network.ConnectionType Connection type if known.
---@class CDP.Network.enable_parameters
---@field maxTotalBufferSize? integer Buffer size in bytes to use when preserving network payloads (XHRs, etc).
---@field maxResourceBufferSize? integer Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
---@field maxPostDataSize? integer Longest post body size (in bytes) that would be included in requestWillBeSent notification
---@class CDP.Network.getAllCookies_return
---@field cookies CDP.Network.Cookie[] Array of cookie objects.
---@class CDP.Network.getCertificate_parameters
---@field origin string Origin to get certificate for.
---@class CDP.Network.getCertificate_return
---@field tableNames string[]
---@class CDP.Network.getCookies_parameters
---@field urls? string[] The list of URLs for which applicable cookies will be fetched.<br>If not specified, it's assumed to be set to the list containing<br>the URLs of the page and all of its subframes.
---@class CDP.Network.getCookies_return
---@field cookies CDP.Network.Cookie[] Array of cookie objects.
---@class CDP.Network.getResponseBody_parameters
---@field requestId CDP.Network.RequestId Identifier of the network request to get content for.
---@class CDP.Network.getResponseBody_return
---@field body string Response body.
---@field base64Encoded boolean True, if content was sent as base64.
---@class CDP.Network.getRequestPostData_parameters
---@field requestId CDP.Network.RequestId Identifier of the network request to get content for.
---@class CDP.Network.getRequestPostData_return
---@field postData string Request body string, omitting files from multipart requests
---@class CDP.Network.getResponseBodyForInterception_parameters
---@field interceptionId CDP.Network.InterceptionId Identifier for the intercepted request to get body for.
---@class CDP.Network.getResponseBodyForInterception_return
---@field body string Response body.
---@field base64Encoded boolean True, if content was sent as base64.
---@class CDP.Network.takeResponseBodyForInterceptionAsStream_parameters
---@field interceptionId CDP.Network.InterceptionId
---@class CDP.Network.takeResponseBodyForInterceptionAsStream_return
---@field stream CDP.IO.StreamHandle
---@class CDP.Network.replayXHR_parameters
---@field requestId CDP.Network.RequestId Identifier of XHR to replay.
---@class CDP.Network.searchInResponseBody_parameters
---@field requestId CDP.Network.RequestId Identifier of the network response to search.
---@field query string String to search for.
---@field caseSensitive? boolean If true, search is case sensitive.
---@field isRegex? boolean If true, treats string parameter as regex.
---@class CDP.Network.searchInResponseBody_return
---@field result CDP.Debugger.SearchMatch[] List of search matches.
---@class CDP.Network.setBlockedURLs_parameters
---@field urls string[] URL patterns to block. Wildcards ('*') are allowed.
---@class CDP.Network.setBypassServiceWorker_parameters
---@field bypass boolean Bypass service worker and load from network.
---@class CDP.Network.setCacheDisabled_parameters
---@field cacheDisabled boolean Cache disabled state.
---@class CDP.Network.setCookie_parameters
---@field name string Cookie name.
---@field value string Cookie value.
---@field url? string The request-URI to associate with the setting of the cookie. This value can affect the<br>default domain, path, source port, and source scheme values of the created cookie.
---@field domain? string Cookie domain.
---@field path? string Cookie path.
---@field secure? boolean True if cookie is secure.
---@field httpOnly? boolean True if cookie is http-only.
---@field sameSite? CDP.Network.CookieSameSite Cookie SameSite type.
---@field expires? CDP.Network.TimeSinceEpoch Cookie expiration date, session cookie if not set
---@field priority? CDP.Network.CookiePriority Cookie Priority type.
---@field sameParty? boolean True if cookie is SameParty.
---@field sourceScheme? CDP.Network.CookieSourceScheme Cookie source scheme type.
---@field sourcePort? integer Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.<br>An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.<br>This is a temporary ability and it will be removed in the future.
---@field partitionKey? string Cookie partition key. The site of the top-level URL the browser was visiting at the start<br>of the request to the endpoint that set the cookie.<br>If not set, the cookie will be set as not partitioned.
---@class CDP.Network.setCookie_return
---@field success boolean Always set to true. If an error occurs, the response indicates protocol error.
---@class CDP.Network.setCookies_parameters
---@field cookies CDP.Network.CookieParam[] Cookies to be set.
---@class CDP.Network.setExtraHTTPHeaders_parameters
---@field headers CDP.Network.Headers Map with extra HTTP headers.
---@class CDP.Network.setAttachDebugStack_parameters
---@field enabled boolean Whether to attach a page script stack for debugging purpose.
---@class CDP.Network.setRequestInterception_parameters
---@field patterns CDP.Network.RequestPattern[] Requests matching any of these patterns will be forwarded and wait for the corresponding<br>continueInterceptedRequest call.
---@class CDP.Network.setUserAgentOverride_parameters
---@field userAgent string User agent to use.
---@field acceptLanguage? string Browser langugage to emulate.
---@field platform? string The platform navigator.platform should return.
---@field userAgentMetadata? CDP.Emulation.UserAgentMetadata To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
---@class CDP.Network.getSecurityIsolationStatus_parameters
---@field frameId? CDP.Page.FrameId If no frameId is provided, the status of the target is provided.
---@class CDP.Network.getSecurityIsolationStatus_return
---@field status CDP.Network.SecurityIsolationStatus
---@class CDP.Network.enableReportingApi_parameters
---@field enable boolean Whether to enable or disable events for the Reporting API
---@class CDP.Network.loadNetworkResource_parameters
---@field frameId? CDP.Page.FrameId Frame id to get the resource for. Mandatory for frame targets, and<br>should be omitted for worker targets.
---@field url string URL of the resource to get content for.
---@field options CDP.Network.LoadNetworkResourceOptions Options for the request.
---@class CDP.Network.loadNetworkResource_return
---@field resource CDP.Network.LoadNetworkResourcePageResult
---@class CDP.Network.dataReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field dataLength integer Data chunk length.
---@field encodedDataLength integer Actual bytes received (might be less than dataLength for compressed encodings).
---@class CDP.Network.eventSourceMessageReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field eventName string Message type.
---@field eventId string Message identifier.
---@field data string Message content.
---@class CDP.Network.loadingFailed_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field type CDP.Network.ResourceType Resource type.
---@field errorText string User friendly error message.
---@field canceled? boolean True if loading was canceled.
---@field blockedReason? CDP.Network.BlockedReason The reason why loading was blocked, if any.
---@field corsErrorStatus? CDP.Network.CorsErrorStatus The reason why loading was blocked by CORS, if any.
---@class CDP.Network.loadingFinished_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field encodedDataLength number Total number of bytes received for this request.
---@class CDP.Network.requestIntercepted_event
---@field interceptionId CDP.Network.InterceptionId Each request the page makes will have a unique id, however if any redirects are encountered<br>while processing that fetch, they will be reported with the same id as the original fetch.<br>Likewise if HTTP authentication is needed then the same fetch id will be used.
---@field request CDP.Network.Request
---@field frameId CDP.Page.FrameId The id of the frame that initiated the request.
---@field resourceType CDP.Network.ResourceType How the requested resource will be used.
---@field isNavigationRequest boolean Whether this is a navigation request, which can abort the navigation completely.
---@field isDownload? boolean Set if the request is a navigation that will result in a download.<br>Only present after response is received from the server (i.e. HeadersReceived stage).
---@field redirectUrl? string Redirect location, only sent if a redirect was intercepted.
---@field authChallenge? CDP.Network.AuthChallenge Details of the Authorization Challenge encountered. If this is set then<br>continueInterceptedRequest must contain an authChallengeResponse.
---@field responseErrorReason? CDP.Network.ErrorReason Response error if intercepted at response stage or if redirect occurred while intercepting<br>request.
---@field responseStatusCode? integer Response code if intercepted at response stage or if redirect occurred while intercepting<br>request or auth retry occurred.
---@field responseHeaders? CDP.Network.Headers Response headers if intercepted at the response stage or if redirect occurred while<br>intercepting request or auth retry occurred.
---@field requestId? CDP.Network.RequestId If the intercepted request had a corresponding requestWillBeSent event fired for it, then<br>this requestId will be the same as the requestId present in the requestWillBeSent event.
---@class CDP.Network.requestServedFromCache_event
---@field requestId CDP.Network.RequestId Request identifier.
---@class CDP.Network.requestWillBeSent_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field loaderId CDP.Network.LoaderId Loader identifier. Empty string if the request is fetched from worker.
---@field documentURL string URL of the document this request is loaded for.
---@field request CDP.Network.Request Request data.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field wallTime CDP.Network.TimeSinceEpoch Timestamp.
---@field initiator CDP.Network.Initiator Request initiator.
---@field redirectHasExtraInfo boolean In the case that redirectResponse is populated, this flag indicates whether<br>requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted<br>for the request which was just redirected.
---@field redirectResponse? CDP.Network.Response Redirect response data.
---@field type? CDP.Network.ResourceType Type of this resource.
---@field frameId? CDP.Page.FrameId Frame identifier.
---@field hasUserGesture? boolean Whether the request is initiated by a user gesture. Defaults to false.
---@class CDP.Network.resourceChangedPriority_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field newPriority CDP.Network.ResourcePriority New priority
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@class CDP.Network.signedExchangeReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field info CDP.Network.SignedExchangeInfo Information about the signed exchange response.
---@class CDP.Network.responseReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field loaderId CDP.Network.LoaderId Loader identifier. Empty string if the request is fetched from worker.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field type CDP.Network.ResourceType Resource type.
---@field response CDP.Network.Response Response data.
---@field hasExtraInfo boolean Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be<br>or were emitted for this request.
---@field frameId? CDP.Page.FrameId Frame identifier.
---@class CDP.Network.webSocketClosed_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@class CDP.Network.webSocketCreated_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field url string WebSocket request URL.
---@field initiator? CDP.Network.Initiator Request initiator.
---@class CDP.Network.webSocketFrameError_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field errorMessage string WebSocket error message.
---@class CDP.Network.webSocketFrameReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field response CDP.Network.WebSocketFrame WebSocket response data.
---@class CDP.Network.webSocketFrameSent_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field response CDP.Network.WebSocketFrame WebSocket response data.
---@class CDP.Network.webSocketHandshakeResponseReceived_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field response CDP.Network.WebSocketResponse WebSocket response data.
---@class CDP.Network.webSocketWillSendHandshakeRequest_event
---@field requestId CDP.Network.RequestId Request identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field wallTime CDP.Network.TimeSinceEpoch UTC Timestamp.
---@field request CDP.Network.WebSocketRequest WebSocket request data.
---@class CDP.Network.webTransportCreated_event
---@field transportId CDP.Network.RequestId WebTransport identifier.
---@field url string WebTransport request URL.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@field initiator? CDP.Network.Initiator Request initiator.
---@class CDP.Network.webTransportConnectionEstablished_event
---@field transportId CDP.Network.RequestId WebTransport identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@class CDP.Network.webTransportClosed_event
---@field transportId CDP.Network.RequestId WebTransport identifier.
---@field timestamp CDP.Network.MonotonicTime Timestamp.
---@class CDP.Network.requestWillBeSentExtraInfo_event
---@field requestId CDP.Network.RequestId Request identifier. Used to match this information to an existing requestWillBeSent event.
---@field associatedCookies CDP.Network.BlockedCookieWithReason[] A list of cookies potentially associated to the requested URL. This includes both cookies sent with<br>the request and the ones not sent; the latter are distinguished by having blockedReason field set.
---@field headers CDP.Network.Headers Raw request headers as they will be sent over the wire.
---@field connectTiming CDP.Network.ConnectTiming Connection timing information for the request.
---@field clientSecurityState? CDP.Network.ClientSecurityState The client security state set for the request.
---@field siteHasCookieInOtherPartition? boolean Whether the site has partitioned cookies stored in a partition different than the current one.
---@class CDP.Network.responseReceivedExtraInfo_event
---@field requestId CDP.Network.RequestId Request identifier. Used to match this information to another responseReceived event.
---@field blockedCookies CDP.Network.BlockedSetCookieWithReason[] A list of cookies which were not stored from the response along with the corresponding<br>reasons for blocking. The cookies here may not be valid due to syntax errors, which<br>are represented by the invalid cookie line string instead of a proper cookie.
---@field headers CDP.Network.Headers Raw response headers as they were received over the wire.
---@field resourceIPAddressSpace CDP.Network.IPAddressSpace The IP address space of the resource. The address space can only be determined once the transport<br>established the connection, so we can't send it in `requestWillBeSentExtraInfo`.
---@field statusCode integer The status code of the response. This is useful in cases the request failed and no responseReceived<br>event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code<br>for cached requests, where the status in responseReceived is a 200 and this will be 304.
---@field headersText? string Raw response header text as it was received over the wire. The raw text may not always be<br>available, such as in the case of HTTP/2 or QUIC.
---@field cookiePartitionKey? string The cookie partition key that will be used to store partitioned cookies set in this response.<br>Only sent when partitioned cookies are enabled.
---@field cookiePartitionKeyOpaque? boolean True if partitioned cookies are enabled, but the partition key is not serializeable to string.
---@class CDP.Network.trustTokenOperationDone_event
---@field status "Ok" | "InvalidArgument" | "MissingIssuerKeys" | "FailedPrecondition" | "ResourceExhausted" | "AlreadyExists" | "Unavailable" | "Unauthorized" | "BadResponse" | "InternalError" | "UnknownError" | "FulfilledLocally" Detailed success or error status of the operation.<br>'AlreadyExists' also signifies a successful operation, as the result<br>of the operation already exists und thus, the operation was abort<br>preemptively (e.g. a cache hit).
---@field type CDP.Network.TrustTokenOperationType
---@field requestId CDP.Network.RequestId
---@field topLevelOrigin? string Top level origin. The context in which the operation was attempted.
---@field issuerOrigin? string Origin of the issuer in case of a "Issuance" or "Redemption" operation.
---@field issuedTokenCount? integer The number of obtained Trust Tokens on a successful "Issuance" operation.
---@class CDP.Network.subresourceWebBundleMetadataReceived_event
---@field requestId CDP.Network.RequestId Request identifier. Used to match this information to another event.
---@field urls string[] A list of URLs of resources in the subresource Web Bundle.
---@class CDP.Network.subresourceWebBundleMetadataError_event
---@field requestId CDP.Network.RequestId Request identifier. Used to match this information to another event.
---@field errorMessage string Error message
---@class CDP.Network.subresourceWebBundleInnerResponseParsed_event
---@field innerRequestId CDP.Network.RequestId Request identifier of the subresource request
---@field innerRequestURL string URL of the subresource resource.
---@field bundleRequestId? CDP.Network.RequestId Bundle request identifier. Used to match this information to another event.<br>This made be absent in case when the instrumentation was enabled only<br>after webbundle was parsed.
---@class CDP.Network.subresourceWebBundleInnerResponseError_event
---@field innerRequestId CDP.Network.RequestId Request identifier of the subresource request
---@field innerRequestURL string URL of the subresource resource.
---@field errorMessage string Error message
---@field bundleRequestId? CDP.Network.RequestId Bundle request identifier. Used to match this information to another event.<br>This made be absent in case when the instrumentation was enabled only<br>after webbundle was parsed.
---@class CDP.Network.reportingApiReportAdded_event
---@field report CDP.Network.ReportingApiReport
---@class CDP.Network.reportingApiReportUpdated_event
---@field report CDP.Network.ReportingApiReport
---@class CDP.Network.reportingApiEndpointsChangedForOrigin_event
---@field origin string Origin of the document(s) which configured the endpoints.
---@field endpoints CDP.Network.ReportingApiEndpoint[]
---Network domain allows tracking network activities of the page. It exposes information about http,
---file, data and other requests and responses, their headers, bodies, timing, etc.
---@class CDP.Network: CDP._ClientContainer
---Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
---@field setAcceptedEncodings fun(self: CDP._ClientContainer, params: CDP.Network.setAcceptedEncodings_parameters): CDP.Error?
---Clears accepted encodings set by setAcceptedEncodings
---@field clearAcceptedEncodingsOverride fun(self: CDP._ClientContainer): CDP.Error?
---Tells whether clearing browser cache is supported.
---@field canClearBrowserCache fun(self: CDP._ClientContainer): CDP.Error?, CDP.Network.canClearBrowserCache_return?
---Tells whether clearing browser cookies is supported.
---@field canClearBrowserCookies fun(self: CDP._ClientContainer): CDP.Error?, CDP.Network.canClearBrowserCookies_return?
---Tells whether emulation of network conditions is supported.
---@field canEmulateNetworkConditions fun(self: CDP._ClientContainer): CDP.Error?, CDP.Network.canEmulateNetworkConditions_return?
---Clears browser cache.
---@field clearBrowserCache fun(self: CDP._ClientContainer): CDP.Error?
---Clears browser cookies.
---@field clearBrowserCookies fun(self: CDP._ClientContainer): CDP.Error?
---Response to Network.requestIntercepted which either modifies the request to continue with any
---modifications, or blocks it, or completes it with the provided response bytes. If a network
---fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
---event will be sent with the same InterceptionId.
---Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
---@field continueInterceptedRequest fun(self: CDP._ClientContainer, params: CDP.Network.continueInterceptedRequest_parameters): CDP.Error?
---Deletes browser cookies with matching name and url or domain/path pair.
---@field deleteCookies fun(self: CDP._ClientContainer, params: CDP.Network.deleteCookies_parameters): CDP.Error?
---Disables network tracking, prevents network events from being sent to the client.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Activates emulation of network conditions.
---@field emulateNetworkConditions fun(self: CDP._ClientContainer, params: CDP.Network.emulateNetworkConditions_parameters): CDP.Error?
---Enables network tracking, network events will now be delivered to the client.
---@field enable fun(self: CDP._ClientContainer, params: CDP.Network.enable_parameters): CDP.Error?
---Returns all browser cookies. Depending on the backend support, will return detailed cookie
---information in the `cookies` field.
---Deprecated. Use Storage.getCookies instead.
---@field getAllCookies fun(self: CDP._ClientContainer): CDP.Error?, CDP.Network.getAllCookies_return?
---Returns the DER-encoded certificate.
---@field getCertificate fun(self: CDP._ClientContainer, params: CDP.Network.getCertificate_parameters): CDP.Error?, CDP.Network.getCertificate_return?
---Returns all browser cookies for the current URL. Depending on the backend support, will return
---detailed cookie information in the `cookies` field.
---@field getCookies fun(self: CDP._ClientContainer, params: CDP.Network.getCookies_parameters): CDP.Error?, CDP.Network.getCookies_return?
---Returns content served for the given request.
---@field getResponseBody fun(self: CDP._ClientContainer, params: CDP.Network.getResponseBody_parameters): CDP.Error?, CDP.Network.getResponseBody_return?
---Returns post data sent with the request. Returns an error when no data was sent with the request.
---@field getRequestPostData fun(self: CDP._ClientContainer, params: CDP.Network.getRequestPostData_parameters): CDP.Error?, CDP.Network.getRequestPostData_return?
---Returns content served for the given currently intercepted request.
---@field getResponseBodyForInterception fun(self: CDP._ClientContainer, params: CDP.Network.getResponseBodyForInterception_parameters): CDP.Error?, CDP.Network.getResponseBodyForInterception_return?
---Returns a handle to the stream representing the response body. Note that after this command,
---the intercepted request can't be continued as is -- you either need to cancel it or to provide
---the response body. The stream only supports sequential read, IO.read will fail if the position
---is specified.
---@field takeResponseBodyForInterceptionAsStream fun(self: CDP._ClientContainer, params: CDP.Network.takeResponseBodyForInterceptionAsStream_parameters): CDP.Error?, CDP.Network.takeResponseBodyForInterceptionAsStream_return?
---This method sends a new XMLHttpRequest which is identical to the original one. The following
---parameters should be identical: method, url, async, request body, extra headers, withCredentials
---attribute, user, password.
---@field replayXHR fun(self: CDP._ClientContainer, params: CDP.Network.replayXHR_parameters): CDP.Error?
---Searches for given string in response content.
---@field searchInResponseBody fun(self: CDP._ClientContainer, params: CDP.Network.searchInResponseBody_parameters): CDP.Error?, CDP.Network.searchInResponseBody_return?
---Blocks URLs from loading.
---@field setBlockedURLs fun(self: CDP._ClientContainer, params: CDP.Network.setBlockedURLs_parameters): CDP.Error?
---Toggles ignoring of service worker for each request.
---@field setBypassServiceWorker fun(self: CDP._ClientContainer, params: CDP.Network.setBypassServiceWorker_parameters): CDP.Error?
---Toggles ignoring cache for each request. If `true`, cache will not be used.
---@field setCacheDisabled fun(self: CDP._ClientContainer, params: CDP.Network.setCacheDisabled_parameters): CDP.Error?
---Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
---@field setCookie fun(self: CDP._ClientContainer, params: CDP.Network.setCookie_parameters): CDP.Error?, CDP.Network.setCookie_return?
---Sets given cookies.
---@field setCookies fun(self: CDP._ClientContainer, params: CDP.Network.setCookies_parameters): CDP.Error?
---Specifies whether to always send extra HTTP headers with the requests from this page.
---@field setExtraHTTPHeaders fun(self: CDP._ClientContainer, params: CDP.Network.setExtraHTTPHeaders_parameters): CDP.Error?
---Specifies whether to attach a page script stack id in requests
---@field setAttachDebugStack fun(self: CDP._ClientContainer, params: CDP.Network.setAttachDebugStack_parameters): CDP.Error?
---Sets the requests to intercept that match the provided patterns and optionally resource types.
---Deprecated, please use Fetch.enable instead.
---@field setRequestInterception fun(self: CDP._ClientContainer, params: CDP.Network.setRequestInterception_parameters): CDP.Error?
---Allows overriding user agent with the given string.
---@field setUserAgentOverride fun(self: CDP._ClientContainer, params: CDP.Network.setUserAgentOverride_parameters): CDP.Error?
---Returns information about the COEP/COOP isolation status.
---@field getSecurityIsolationStatus fun(self: CDP._ClientContainer, params: CDP.Network.getSecurityIsolationStatus_parameters): CDP.Error?, CDP.Network.getSecurityIsolationStatus_return?
---Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
---Enabling triggers 'reportingApiReportAdded' for all existing reports.
---@field enableReportingApi fun(self: CDP._ClientContainer, params: CDP.Network.enableReportingApi_parameters): CDP.Error?
---Fetches the resource and returns the content.
---@field loadNetworkResource fun(self: CDP._ClientContainer, params: CDP.Network.loadNetworkResource_parameters): CDP.Error?, CDP.Network.loadNetworkResource_return?
---Fired when data chunk was received over the network.
---@field dataReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.dataReceived_event)): CDP.Error?
---Fired when EventSource message is received.
---@field eventSourceMessageReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.eventSourceMessageReceived_event)): CDP.Error?
---Fired when HTTP request has failed to load.
---@field loadingFailed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.loadingFailed_event)): CDP.Error?
---Fired when HTTP request has finished loading.
---@field loadingFinished fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.loadingFinished_event)): CDP.Error?
---Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
---mocked.
---Deprecated, use Fetch.requestPaused instead.
---@field requestIntercepted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.requestIntercepted_event)): CDP.Error?
---Fired if request ended up loading from cache.
---@field requestServedFromCache fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.requestServedFromCache_event)): CDP.Error?
---Fired when page is about to send HTTP request.
---@field requestWillBeSent fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.requestWillBeSent_event)): CDP.Error?
---Fired when resource loading priority is changed
---@field resourceChangedPriority fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.resourceChangedPriority_event)): CDP.Error?
---Fired when a signed exchange was received over the network
---@field signedExchangeReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.signedExchangeReceived_event)): CDP.Error?
---Fired when HTTP response is available.
---@field responseReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.responseReceived_event)): CDP.Error?
---Fired when WebSocket is closed.
---@field webSocketClosed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketClosed_event)): CDP.Error?
---Fired upon WebSocket creation.
---@field webSocketCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketCreated_event)): CDP.Error?
---Fired when WebSocket message error occurs.
---@field webSocketFrameError fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketFrameError_event)): CDP.Error?
---Fired when WebSocket message is received.
---@field webSocketFrameReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketFrameReceived_event)): CDP.Error?
---Fired when WebSocket message is sent.
---@field webSocketFrameSent fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketFrameSent_event)): CDP.Error?
---Fired when WebSocket handshake response becomes available.
---@field webSocketHandshakeResponseReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketHandshakeResponseReceived_event)): CDP.Error?
---Fired when WebSocket is about to initiate handshake.
---@field webSocketWillSendHandshakeRequest fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webSocketWillSendHandshakeRequest_event)): CDP.Error?
---Fired upon WebTransport creation.
---@field webTransportCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webTransportCreated_event)): CDP.Error?
---Fired when WebTransport handshake is finished.
---@field webTransportConnectionEstablished fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webTransportConnectionEstablished_event)): CDP.Error?
---Fired when WebTransport is disposed.
---@field webTransportClosed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.webTransportClosed_event)): CDP.Error?
---Fired when additional information about a requestWillBeSent event is available from the
---network stack. Not every requestWillBeSent event will have an additional
---requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
---or requestWillBeSentExtraInfo will be fired first for the same request.
---@field requestWillBeSentExtraInfo fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.requestWillBeSentExtraInfo_event)): CDP.Error?
---Fired when additional information about a responseReceived event is available from the network
---stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
---it, and responseReceivedExtraInfo may be fired before or after responseReceived.
---@field responseReceivedExtraInfo fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.responseReceivedExtraInfo_event)): CDP.Error?
---Fired exactly once for each Trust Token operation. Depending on
---the type of the operation and whether the operation succeeded or
---failed, the event is fired before the corresponding request was sent
---or after the response was received.
---@field trustTokenOperationDone fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.trustTokenOperationDone_event)): CDP.Error?
---Fired once when parsing the .wbn file has succeeded.
---The event contains the information about the web bundle contents.
---@field subresourceWebBundleMetadataReceived fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.subresourceWebBundleMetadataReceived_event)): CDP.Error?
---Fired once when parsing the .wbn file has failed.
---@field subresourceWebBundleMetadataError fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.subresourceWebBundleMetadataError_event)): CDP.Error?
---Fired when handling requests for resources within a .wbn file.
---Note: this will only be fired for resources that are requested by the webpage.
---@field subresourceWebBundleInnerResponseParsed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.subresourceWebBundleInnerResponseParsed_event)): CDP.Error?
---Fired when request for resources within a .wbn file failed.
---@field subresourceWebBundleInnerResponseError fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.subresourceWebBundleInnerResponseError_event)): CDP.Error?
---Is sent whenever a new report is added.
---And after 'enableReportingApi' for all existing reports.
---@field reportingApiReportAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.reportingApiReportAdded_event)): CDP.Error?
---@field reportingApiReportUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.reportingApiReportUpdated_event)): CDP.Error?
---@field reportingApiEndpointsChangedForOrigin fun(self: CDP._ClientContainer, cb: fun(event: CDP.Network.reportingApiEndpointsChangedForOrigin_event)): CDP.Error?

---Configuration data for drawing the source order of an elements children.
---@class CDP.Overlay.SourceOrderConfig
---@field parentOutlineColor CDP.DOM.RGBA the color to outline the givent element in.
---@field childOutlineColor CDP.DOM.RGBA the color to outline the child elements in.
---Configuration data for the highlighting of Grid elements.
---@class CDP.Overlay.GridHighlightConfig
---@field showGridExtensionLines? boolean Whether the extension lines from grid cells to the rulers should be shown (default: false).
---@field showPositiveLineNumbers? boolean Show Positive line number labels (default: false).
---@field showNegativeLineNumbers? boolean Show Negative line number labels (default: false).
---@field showAreaNames? boolean Show area name labels (default: false).
---@field showLineNames? boolean Show line name labels (default: false).
---@field showTrackSizes? boolean Show track size labels (default: false).
---@field gridBorderColor? CDP.DOM.RGBA The grid container border highlight color (default: transparent).
---@field cellBorderColor? CDP.DOM.RGBA The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
---@field rowLineColor? CDP.DOM.RGBA The row line color (default: transparent).
---@field columnLineColor? CDP.DOM.RGBA The column line color (default: transparent).
---@field gridBorderDash? boolean Whether the grid border is dashed (default: false).
---@field cellBorderDash? boolean Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
---@field rowLineDash? boolean Whether row lines are dashed (default: false).
---@field columnLineDash? boolean Whether column lines are dashed (default: false).
---@field rowGapColor? CDP.DOM.RGBA The row gap highlight fill color (default: transparent).
---@field rowHatchColor? CDP.DOM.RGBA The row gap hatching fill color (default: transparent).
---@field columnGapColor? CDP.DOM.RGBA The column gap highlight fill color (default: transparent).
---@field columnHatchColor? CDP.DOM.RGBA The column gap hatching fill color (default: transparent).
---@field areaBorderColor? CDP.DOM.RGBA The named grid areas border color (Default: transparent).
---@field gridBackgroundColor? CDP.DOM.RGBA The grid container background color (Default: transparent).
---Configuration data for the highlighting of Flex container elements.
---@class CDP.Overlay.FlexContainerHighlightConfig
---@field containerBorder? CDP.Overlay.LineStyle The style of the container border
---@field lineSeparator? CDP.Overlay.LineStyle The style of the separator between lines
---@field itemSeparator? CDP.Overlay.LineStyle The style of the separator between items
---@field mainDistributedSpace? CDP.Overlay.BoxStyle Style of content-distribution space on the main axis (justify-content).
---@field crossDistributedSpace? CDP.Overlay.BoxStyle Style of content-distribution space on the cross axis (align-content).
---@field rowGapSpace? CDP.Overlay.BoxStyle Style of empty space caused by row gaps (gap/row-gap).
---@field columnGapSpace? CDP.Overlay.BoxStyle Style of empty space caused by columns gaps (gap/column-gap).
---@field crossAlignment? CDP.Overlay.LineStyle Style of the self-alignment line (align-items).
---Configuration data for the highlighting of Flex item elements.
---@class CDP.Overlay.FlexItemHighlightConfig
---@field baseSizeBox? CDP.Overlay.BoxStyle Style of the box representing the item's base size
---@field baseSizeBorder? CDP.Overlay.LineStyle Style of the border around the box representing the item's base size
---@field flexibilityArrow? CDP.Overlay.LineStyle Style of the arrow representing if the item grew or shrank
---Style information for drawing a line.
---@class CDP.Overlay.LineStyle
---@field color? CDP.DOM.RGBA The color of the line (default: transparent)
---@field pattern? "dashed" | "dotted" The line pattern (default: solid)
---Style information for drawing a box.
---@class CDP.Overlay.BoxStyle
---@field fillColor? CDP.DOM.RGBA The background color for the box (default: transparent)
---@field hatchColor? CDP.DOM.RGBA The hatching color for the box (default: transparent)
---@alias CDP.Overlay.ContrastAlgorithm "aa" | "aaa" | "apca"
---Configuration data for the highlighting of page elements.
---@class CDP.Overlay.HighlightConfig
---@field showInfo? boolean Whether the node info tooltip should be shown (default: false).
---@field showStyles? boolean Whether the node styles in the tooltip (default: false).
---@field showRulers? boolean Whether the rulers should be shown (default: false).
---@field showAccessibilityInfo? boolean Whether the a11y info should be shown (default: true).
---@field showExtensionLines? boolean Whether the extension lines from node to the rulers should be shown (default: false).
---@field contentColor? CDP.DOM.RGBA The content box highlight fill color (default: transparent).
---@field paddingColor? CDP.DOM.RGBA The padding highlight fill color (default: transparent).
---@field borderColor? CDP.DOM.RGBA The border highlight fill color (default: transparent).
---@field marginColor? CDP.DOM.RGBA The margin highlight fill color (default: transparent).
---@field eventTargetColor? CDP.DOM.RGBA The event target element highlight fill color (default: transparent).
---@field shapeColor? CDP.DOM.RGBA The shape outside fill color (default: transparent).
---@field shapeMarginColor? CDP.DOM.RGBA The shape margin fill color (default: transparent).
---@field cssGridColor? CDP.DOM.RGBA The grid layout color (default: transparent).
---@field colorFormat? CDP.Overlay.ColorFormat The color format used to format color styles (default: hex).
---@field gridHighlightConfig? CDP.Overlay.GridHighlightConfig The grid layout highlight configuration (default: all transparent).
---@field flexContainerHighlightConfig? CDP.Overlay.FlexContainerHighlightConfig The flex container highlight configuration (default: all transparent).
---@field flexItemHighlightConfig? CDP.Overlay.FlexItemHighlightConfig The flex item highlight configuration (default: all transparent).
---@field contrastAlgorithm? CDP.Overlay.ContrastAlgorithm The contrast algorithm to use for the contrast ratio (default: aa).
---@field containerQueryContainerHighlightConfig? CDP.Overlay.ContainerQueryContainerHighlightConfig The container query container highlight configuration (default: all transparent).
---@alias CDP.Overlay.ColorFormat "rgb" | "hsl" | "hwb" | "hex"
---Configurations for Persistent Grid Highlight
---@class CDP.Overlay.GridNodeHighlightConfig
---@field gridHighlightConfig CDP.Overlay.GridHighlightConfig A descriptor for the highlight appearance.
---@field nodeId CDP.DOM.NodeId Identifier of the node to highlight.
---@class CDP.Overlay.FlexNodeHighlightConfig
---@field flexContainerHighlightConfig CDP.Overlay.FlexContainerHighlightConfig A descriptor for the highlight appearance of flex containers.
---@field nodeId CDP.DOM.NodeId Identifier of the node to highlight.
---@class CDP.Overlay.ScrollSnapContainerHighlightConfig
---@field snapportBorder? CDP.Overlay.LineStyle The style of the snapport border (default: transparent)
---@field snapAreaBorder? CDP.Overlay.LineStyle The style of the snap area border (default: transparent)
---@field scrollMarginColor? CDP.DOM.RGBA The margin highlight fill color (default: transparent).
---@field scrollPaddingColor? CDP.DOM.RGBA The padding highlight fill color (default: transparent).
---@class CDP.Overlay.ScrollSnapHighlightConfig
---@field scrollSnapContainerHighlightConfig CDP.Overlay.ScrollSnapContainerHighlightConfig A descriptor for the highlight appearance of scroll snap containers.
---@field nodeId CDP.DOM.NodeId Identifier of the node to highlight.
---Configuration for dual screen hinge
---@class CDP.Overlay.HingeConfig
---@field rect CDP.DOM.Rect A rectangle represent hinge
---@field contentColor? CDP.DOM.RGBA The content box highlight fill color (default: a dark color).
---@field outlineColor? CDP.DOM.RGBA The content box highlight outline color (default: transparent).
---@class CDP.Overlay.ContainerQueryHighlightConfig
---@field containerQueryContainerHighlightConfig CDP.Overlay.ContainerQueryContainerHighlightConfig A descriptor for the highlight appearance of container query containers.
---@field nodeId CDP.DOM.NodeId Identifier of the container node to highlight.
---@class CDP.Overlay.ContainerQueryContainerHighlightConfig
---@field containerBorder? CDP.Overlay.LineStyle The style of the container border.
---@field descendantBorder? CDP.Overlay.LineStyle The style of the descendants' borders.
---@class CDP.Overlay.IsolatedElementHighlightConfig
---@field isolationModeHighlightConfig CDP.Overlay.IsolationModeHighlightConfig A descriptor for the highlight appearance of an element in isolation mode.
---@field nodeId CDP.DOM.NodeId Identifier of the isolated element to highlight.
---@class CDP.Overlay.IsolationModeHighlightConfig
---@field resizerColor? CDP.DOM.RGBA The fill color of the resizers (default: transparent).
---@field resizerHandleColor? CDP.DOM.RGBA The fill color for resizer handles (default: transparent).
---@field maskColor? CDP.DOM.RGBA The fill color for the mask covering non-isolated elements (default: transparent).
---@alias CDP.Overlay.InspectMode "searchForNode" | "searchForUAShadowDOM" | "captureAreaScreenshot" | "showDistances" | "none"
---@class CDP.Overlay.getHighlightObjectForTest_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to get highlight object for.
---@field includeDistance? boolean Whether to include distance info.
---@field includeStyle? boolean Whether to include style info.
---@field colorFormat? CDP.Overlay.ColorFormat The color format to get config with (default: hex).
---@field showAccessibilityInfo? boolean Whether to show accessibility info (default: true).
---@class CDP.Overlay.getHighlightObjectForTest_return
---@field highlight table Highlight data for the node.
---@class CDP.Overlay.getGridHighlightObjectsForTest_parameters
---@field nodeIds CDP.DOM.NodeId[] Ids of the node to get highlight object for.
---@class CDP.Overlay.getGridHighlightObjectsForTest_return
---@field highlights table Grid Highlight data for the node ids provided.
---@class CDP.Overlay.getSourceOrderHighlightObjectForTest_parameters
---@field nodeId CDP.DOM.NodeId Id of the node to highlight.
---@class CDP.Overlay.getSourceOrderHighlightObjectForTest_return
---@field highlight table Source order highlight data for the node id provided.
---@class CDP.Overlay.highlightFrame_parameters
---@field frameId CDP.Page.FrameId Identifier of the frame to highlight.
---@field contentColor? CDP.DOM.RGBA The content box highlight fill color (default: transparent).
---@field contentOutlineColor? CDP.DOM.RGBA The content box highlight outline color (default: transparent).
---@class CDP.Overlay.highlightNode_parameters
---@field highlightConfig CDP.Overlay.HighlightConfig A descriptor for the highlight appearance.
---@field nodeId? CDP.DOM.NodeId Identifier of the node to highlight.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node to highlight.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node to be highlighted.
---@field selector? string Selectors to highlight relevant nodes.
---@class CDP.Overlay.highlightQuad_parameters
---@field quad CDP.DOM.Quad Quad to highlight
---@field color? CDP.DOM.RGBA The highlight fill color (default: transparent).
---@field outlineColor? CDP.DOM.RGBA The highlight outline color (default: transparent).
---@class CDP.Overlay.highlightRect_parameters
---@field x integer X coordinate
---@field y integer Y coordinate
---@field width integer Rectangle width
---@field height integer Rectangle height
---@field color? CDP.DOM.RGBA The highlight fill color (default: transparent).
---@field outlineColor? CDP.DOM.RGBA The highlight outline color (default: transparent).
---@class CDP.Overlay.highlightSourceOrder_parameters
---@field sourceOrderConfig CDP.Overlay.SourceOrderConfig A descriptor for the appearance of the overlay drawing.
---@field nodeId? CDP.DOM.NodeId Identifier of the node to highlight.
---@field backendNodeId? CDP.DOM.BackendNodeId Identifier of the backend node to highlight.
---@field objectId? CDP.Runtime.RemoteObjectId JavaScript object id of the node to be highlighted.
---@class CDP.Overlay.setInspectMode_parameters
---@field mode CDP.Overlay.InspectMode Set an inspection mode.
---@field highlightConfig? CDP.Overlay.HighlightConfig A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled<br>== false`.
---@class CDP.Overlay.setShowAdHighlights_parameters
---@field show boolean True for showing ad highlights
---@class CDP.Overlay.setPausedInDebuggerMessage_parameters
---@field message? string The message to display, also triggers resume and step over controls.
---@class CDP.Overlay.setShowDebugBorders_parameters
---@field show boolean True for showing debug borders
---@class CDP.Overlay.setShowFPSCounter_parameters
---@field show boolean True for showing the FPS counter
---@class CDP.Overlay.setShowGridOverlays_parameters
---@field gridNodeHighlightConfigs CDP.Overlay.GridNodeHighlightConfig[] An array of node identifiers and descriptors for the highlight appearance.
---@class CDP.Overlay.setShowFlexOverlays_parameters
---@field flexNodeHighlightConfigs CDP.Overlay.FlexNodeHighlightConfig[] An array of node identifiers and descriptors for the highlight appearance.
---@class CDP.Overlay.setShowScrollSnapOverlays_parameters
---@field scrollSnapHighlightConfigs CDP.Overlay.ScrollSnapHighlightConfig[] An array of node identifiers and descriptors for the highlight appearance.
---@class CDP.Overlay.setShowContainerQueryOverlays_parameters
---@field containerQueryHighlightConfigs CDP.Overlay.ContainerQueryHighlightConfig[] An array of node identifiers and descriptors for the highlight appearance.
---@class CDP.Overlay.setShowPaintRects_parameters
---@field result boolean True for showing paint rectangles
---@class CDP.Overlay.setShowLayoutShiftRegions_parameters
---@field result boolean True for showing layout shift regions
---@class CDP.Overlay.setShowScrollBottleneckRects_parameters
---@field show boolean True for showing scroll bottleneck rects
---@class CDP.Overlay.setShowHitTestBorders_parameters
---@field show boolean True for showing hit-test borders
---@class CDP.Overlay.setShowWebVitals_parameters
---@field show boolean
---@class CDP.Overlay.setShowViewportSizeOnResize_parameters
---@field show boolean Whether to paint size or not.
---@class CDP.Overlay.setShowHinge_parameters
---@field hingeConfig? CDP.Overlay.HingeConfig hinge data, null means hideHinge
---@class CDP.Overlay.setShowIsolatedElements_parameters
---@field isolatedElementHighlightConfigs CDP.Overlay.IsolatedElementHighlightConfig[] An array of node identifiers and descriptors for the highlight appearance.
---@class CDP.Overlay.inspectNodeRequested_event
---@field backendNodeId CDP.DOM.BackendNodeId Id of the node to inspect.
---@class CDP.Overlay.nodeHighlightRequested_event
---@field nodeId CDP.DOM.NodeId
---@class CDP.Overlay.screenshotRequested_event
---@field viewport CDP.Page.Viewport Viewport to capture, in device independent pixels (dip).
---This domain provides various functionality related to drawing atop the inspected page.
---@class CDP.Overlay: CDP._ClientContainer
---Disables domain notifications.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables domain notifications.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---For testing.
---@field getHighlightObjectForTest fun(self: CDP._ClientContainer, params: CDP.Overlay.getHighlightObjectForTest_parameters): CDP.Error?, CDP.Overlay.getHighlightObjectForTest_return?
---For Persistent Grid testing.
---@field getGridHighlightObjectsForTest fun(self: CDP._ClientContainer, params: CDP.Overlay.getGridHighlightObjectsForTest_parameters): CDP.Error?, CDP.Overlay.getGridHighlightObjectsForTest_return?
---For Source Order Viewer testing.
---@field getSourceOrderHighlightObjectForTest fun(self: CDP._ClientContainer, params: CDP.Overlay.getSourceOrderHighlightObjectForTest_parameters): CDP.Error?, CDP.Overlay.getSourceOrderHighlightObjectForTest_return?
---Hides any highlight.
---@field hideHighlight fun(self: CDP._ClientContainer): CDP.Error?
---Highlights owner element of the frame with given id.
---Deprecated: Doesn't work reliablity and cannot be fixed due to process
---separatation (the owner node might be in a different process). Determine
---the owner node in the client and use highlightNode.
---@field highlightFrame fun(self: CDP._ClientContainer, params: CDP.Overlay.highlightFrame_parameters): CDP.Error?
---Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
---objectId must be specified.
---@field highlightNode fun(self: CDP._ClientContainer, params: CDP.Overlay.highlightNode_parameters): CDP.Error?
---Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
---@field highlightQuad fun(self: CDP._ClientContainer, params: CDP.Overlay.highlightQuad_parameters): CDP.Error?
---Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
---@field highlightRect fun(self: CDP._ClientContainer, params: CDP.Overlay.highlightRect_parameters): CDP.Error?
---Highlights the source order of the children of the DOM node with given id or with the given
---JavaScript object wrapper. Either nodeId or objectId must be specified.
---@field highlightSourceOrder fun(self: CDP._ClientContainer, params: CDP.Overlay.highlightSourceOrder_parameters): CDP.Error?
---Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
---Backend then generates 'inspectNodeRequested' event upon element selection.
---@field setInspectMode fun(self: CDP._ClientContainer, params: CDP.Overlay.setInspectMode_parameters): CDP.Error?
---Highlights owner element of all frames detected to be ads.
---@field setShowAdHighlights fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowAdHighlights_parameters): CDP.Error?
---@field setPausedInDebuggerMessage fun(self: CDP._ClientContainer, params: CDP.Overlay.setPausedInDebuggerMessage_parameters): CDP.Error?
---Requests that backend shows debug borders on layers
---@field setShowDebugBorders fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowDebugBorders_parameters): CDP.Error?
---Requests that backend shows the FPS counter
---@field setShowFPSCounter fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowFPSCounter_parameters): CDP.Error?
---Highlight multiple elements with the CSS Grid overlay.
---@field setShowGridOverlays fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowGridOverlays_parameters): CDP.Error?
---@field setShowFlexOverlays fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowFlexOverlays_parameters): CDP.Error?
---@field setShowScrollSnapOverlays fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowScrollSnapOverlays_parameters): CDP.Error?
---@field setShowContainerQueryOverlays fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowContainerQueryOverlays_parameters): CDP.Error?
---Requests that backend shows paint rectangles
---@field setShowPaintRects fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowPaintRects_parameters): CDP.Error?
---Requests that backend shows layout shift regions
---@field setShowLayoutShiftRegions fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowLayoutShiftRegions_parameters): CDP.Error?
---Requests that backend shows scroll bottleneck rects
---@field setShowScrollBottleneckRects fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowScrollBottleneckRects_parameters): CDP.Error?
---Deprecated, no longer has any effect.
---@field setShowHitTestBorders fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowHitTestBorders_parameters): CDP.Error?
---Request that backend shows an overlay with web vital metrics.
---@field setShowWebVitals fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowWebVitals_parameters): CDP.Error?
---Paints viewport size upon main frame resize.
---@field setShowViewportSizeOnResize fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowViewportSizeOnResize_parameters): CDP.Error?
---Add a dual screen device hinge
---@field setShowHinge fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowHinge_parameters): CDP.Error?
---Show elements in isolation mode with overlays.
---@field setShowIsolatedElements fun(self: CDP._ClientContainer, params: CDP.Overlay.setShowIsolatedElements_parameters): CDP.Error?
---Fired when the node should be inspected. This happens after call to `setInspectMode` or when
---user manually inspects an element.
---@field inspectNodeRequested fun(self: CDP._ClientContainer, cb: fun(event: CDP.Overlay.inspectNodeRequested_event)): CDP.Error?
---Fired when the node should be highlighted. This happens after call to `setInspectMode`.
---@field nodeHighlightRequested fun(self: CDP._ClientContainer, cb: fun(event: CDP.Overlay.nodeHighlightRequested_event)): CDP.Error?
---Fired when user asks to capture screenshot of some area on the page.
---@field screenshotRequested fun(self: CDP._ClientContainer, cb: fun(event: CDP.Overlay.screenshotRequested_event)): CDP.Error?
---Fired when user cancels the inspect mode.
---@field inspectModeCanceled fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?

---@alias CDP.Page.FrameId string Unique frame identifier.
---@alias CDP.Page.AdFrameType "none" | "child" | "root" Indicates whether a frame has been identified as an ad.
---@alias CDP.Page.AdFrameExplanation "ParentIsAd" | "CreatedByAdScript" | "MatchedBlockingRule"
---Indicates whether a frame has been identified as an ad and why.
---@class CDP.Page.AdFrameStatus
---@field adFrameType CDP.Page.AdFrameType
---@field explanations? CDP.Page.AdFrameExplanation[]
---Identifies the bottom-most script which caused the frame to be labelled
---as an ad.
---@class CDP.Page.AdScriptId
---@field scriptId CDP.Runtime.ScriptId Script Id of the bottom-most script which caused the frame to be labelled<br>as an ad.
---@field debuggerId CDP.Runtime.UniqueDebuggerId Id of adScriptId's debugger.
---@alias CDP.Page.SecureContextType "Secure" | "SecureLocalhost" | "InsecureScheme" | "InsecureAncestor" Indicates whether the frame is a secure context and why it is the case.
---@alias CDP.Page.CrossOriginIsolatedContextType "Isolated" | "NotIsolated" | "NotIsolatedFeatureDisabled" Indicates whether the frame is cross-origin isolated and why it is the case.
---@alias CDP.Page.GatedAPIFeatures "SharedArrayBuffers" | "SharedArrayBuffersTransferAllowed" | "PerformanceMeasureMemory" | "PerformanceProfile"
---@alias CDP.Page.PermissionsPolicyFeature "accelerometer" | "ambient-light-sensor" | "attribution-reporting" | "autoplay" | "bluetooth" | "browsing-topics" | "camera" | "ch-dpr" | "ch-device-memory" | "ch-downlink" | "ch-ect" | "ch-prefers-color-scheme" | "ch-prefers-reduced-motion" | "ch-prefers-reduced-transparency" | "ch-rtt" | "ch-save-data" | "ch-ua" | "ch-ua-arch" | "ch-ua-bitness" | "ch-ua-platform" | "ch-ua-model" | "ch-ua-mobile" | "ch-ua-form-factor" | "ch-ua-full-version" | "ch-ua-full-version-list" | "ch-ua-platform-version" | "ch-ua-wow64" | "ch-viewport-height" | "ch-viewport-width" | "ch-width" | "clipboard-read" | "clipboard-write" | "compute-pressure" | "cross-origin-isolated" | "direct-sockets" | "display-capture" | "document-domain" | "encrypted-media" | "execution-while-out-of-viewport" | "execution-while-not-rendered" | "focus-without-user-activation" | "fullscreen" | "frobulate" | "gamepad" | "geolocation" | "gyroscope" | "hid" | "identity-credentials-get" | "idle-detection" | "interest-cohort" | "join-ad-interest-group" | "keyboard-map" | "local-fonts" | "magnetometer" | "microphone" | "midi" | "otp-credentials" | "payment" | "picture-in-picture" | "private-aggregation" | "private-state-token-issuance" | "private-state-token-redemption" | "publickey-credentials-get" | "run-ad-auction" | "screen-wake-lock" | "serial" | "shared-autofill" | "shared-storage" | "shared-storage-select-url" | "smart-card" | "storage-access" | "sync-xhr" | "unload" | "usb" | "vertical-scroll" | "web-share" | "window-management" | "window-placement" | "xr-spatial-tracking" All Permissions Policy features. This enum should match the one defined<br>in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
---@alias CDP.Page.PermissionsPolicyBlockReason "Header" | "IframeAttribute" | "InFencedFrameTree" | "InIsolatedApp" Reason for a permissions policy feature to be disabled.
---@class CDP.Page.PermissionsPolicyBlockLocator
---@field frameId CDP.Page.FrameId
---@field blockReason CDP.Page.PermissionsPolicyBlockReason
---@class CDP.Page.PermissionsPolicyFeatureState
---@field feature CDP.Page.PermissionsPolicyFeature
---@field allowed boolean
---@field locator? CDP.Page.PermissionsPolicyBlockLocator
---@alias CDP.Page.OriginTrialTokenStatus "Success" | "NotSupported" | "Insecure" | "Expired" | "WrongOrigin" | "InvalidSignature" | "Malformed" | "WrongVersion" | "FeatureDisabled" | "TokenDisabled" | "FeatureDisabledForUser" | "UnknownTrial" Origin Trial(https://www.chromium.org/blink/origin-trials) support.<br>Status for an Origin Trial token.
---@alias CDP.Page.OriginTrialStatus "Enabled" | "ValidTokenNotProvided" | "OSNotSupported" | "TrialNotAllowed" Status for an Origin Trial.
---@alias CDP.Page.OriginTrialUsageRestriction "None" | "Subset"
---@class CDP.Page.OriginTrialToken
---@field origin string
---@field matchSubDomains boolean
---@field trialName string
---@field expiryTime CDP.Network.TimeSinceEpoch
---@field isThirdParty boolean
---@field usageRestriction CDP.Page.OriginTrialUsageRestriction
---@class CDP.Page.OriginTrialTokenWithStatus
---@field rawTokenText string
---@field parsedToken? CDP.Page.OriginTrialToken `parsedToken` is present only when the token is extractable and<br>parsable.
---@field status CDP.Page.OriginTrialTokenStatus
---@class CDP.Page.OriginTrial
---@field trialName string
---@field status CDP.Page.OriginTrialStatus
---@field tokensWithStatus CDP.Page.OriginTrialTokenWithStatus[]
---Information about the Frame on the page.
---@class CDP.Page.Frame
---@field id CDP.Page.FrameId Frame unique identifier.
---@field parentId? CDP.Page.FrameId Parent frame identifier.
---@field loaderId CDP.Network.LoaderId Identifier of the loader associated with this frame.
---@field name? string Frame's name as specified in the tag.
---@field url string Frame document's URL without fragment.
---@field urlFragment? string Frame document's URL fragment including the '#'.
---@field domainAndRegistry string Frame document's registered domain, taking the public suffixes list into account.<br>Extracted from the Frame's url.<br>Example URLs: http://www.google.com/file.html -> "google.com"<br>              http://a.b.co.uk/file.html      -> "b.co.uk"
---@field securityOrigin string Frame document's security origin.
---@field mimeType string Frame document's mimeType as determined by the browser.
---@field unreachableUrl? string 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.
---@field adFrameStatus? CDP.Page.AdFrameStatus Indicates whether this frame was tagged as an ad and why.
---@field secureContextType CDP.Page.SecureContextType Indicates whether the main document is a secure context and explains why that is the case.
---@field crossOriginIsolatedContextType CDP.Page.CrossOriginIsolatedContextType Indicates whether this is a cross origin isolated context.
---@field gatedAPIFeatures CDP.Page.GatedAPIFeatures[] Indicated which gated APIs / features are available.
---Information about the Resource on the page.
---@class CDP.Page.FrameResource
---@field url string Resource URL.
---@field type CDP.Network.ResourceType Type of this resource.
---@field mimeType string Resource mimeType as determined by the browser.
---@field lastModified? CDP.Network.TimeSinceEpoch last-modified timestamp as reported by server.
---@field contentSize? number Resource content size.
---@field failed? boolean True if the resource failed to load.
---@field canceled? boolean True if the resource was canceled during loading.
---Information about the Frame hierarchy along with their cached resources.
---@class CDP.Page.FrameResourceTree
---@field frame CDP.Page.Frame Frame information for this tree item.
---@field childFrames? CDP.Page.FrameResourceTree[] Child frames.
---@field resources CDP.Page.FrameResource[] Information about frame resources.
---Information about the Frame hierarchy.
---@class CDP.Page.FrameTree
---@field frame CDP.Page.Frame Frame information for this tree item.
---@field childFrames? CDP.Page.FrameTree[] Child frames.
---@alias CDP.Page.ScriptIdentifier string Unique script identifier.
---@alias CDP.Page.TransitionType "link" | "typed" | "address_bar" | "auto_bookmark" | "auto_subframe" | "manual_subframe" | "generated" | "auto_toplevel" | "form_submit" | "reload" | "keyword" | "keyword_generated" | "other" Transition type.
---Navigation history entry.
---@class CDP.Page.NavigationEntry
---@field id integer Unique id of the navigation history entry.
---@field url string URL of the navigation history entry.
---@field userTypedURL string URL that the user typed in the url bar.
---@field title string Title of the navigation history entry.
---@field transitionType CDP.Page.TransitionType Transition type.
---Screencast frame metadata.
---@class CDP.Page.ScreencastFrameMetadata
---@field offsetTop number Top offset in DIP.
---@field pageScaleFactor number Page scale factor.
---@field deviceWidth number Device screen width in DIP.
---@field deviceHeight number Device screen height in DIP.
---@field scrollOffsetX number Position of horizontal scroll in CSS pixels.
---@field scrollOffsetY number Position of vertical scroll in CSS pixels.
---@field timestamp? CDP.Network.TimeSinceEpoch Frame swap timestamp.
---@alias CDP.Page.DialogType "alert" | "confirm" | "prompt" | "beforeunload" Javascript dialog type.
---Error while paring app manifest.
---@class CDP.Page.AppManifestError
---@field message string Error message.
---@field critical integer If criticial, this is a non-recoverable parse error.
---@field line integer Error line.
---@field column integer Error column.
---Parsed app manifest properties.
---@class CDP.Page.AppManifestParsedProperties
---@field scope string Computed scope value
---Layout viewport position and dimensions.
---@class CDP.Page.LayoutViewport
---@field pageX integer Horizontal offset relative to the document (CSS pixels).
---@field pageY integer Vertical offset relative to the document (CSS pixels).
---@field clientWidth integer Width (CSS pixels), excludes scrollbar if present.
---@field clientHeight integer Height (CSS pixels), excludes scrollbar if present.
---Visual viewport position, dimensions, and scale.
---@class CDP.Page.VisualViewport
---@field offsetX number Horizontal offset relative to the layout viewport (CSS pixels).
---@field offsetY number Vertical offset relative to the layout viewport (CSS pixels).
---@field pageX number Horizontal offset relative to the document (CSS pixels).
---@field pageY number Vertical offset relative to the document (CSS pixels).
---@field clientWidth number Width (CSS pixels), excludes scrollbar if present.
---@field clientHeight number Height (CSS pixels), excludes scrollbar if present.
---@field scale number Scale relative to the ideal viewport (size at width=device-width).
---@field zoom? number Page zoom factor (CSS to device independent pixels ratio).
---Viewport for capturing screenshot.
---@class CDP.Page.Viewport
---@field x number X offset in device independent pixels (dip).
---@field y number Y offset in device independent pixels (dip).
---@field width number Rectangle width in device independent pixels (dip).
---@field height number Rectangle height in device independent pixels (dip).
---@field scale number Page scale factor.
---Generic font families collection.
---@class CDP.Page.FontFamilies
---@field standard? string The standard font-family.
---@field fixed? string The fixed font-family.
---@field serif? string The serif font-family.
---@field sansSerif? string The sansSerif font-family.
---@field cursive? string The cursive font-family.
---@field fantasy? string The fantasy font-family.
---@field math? string The math font-family.
---Font families collection for a script.
---@class CDP.Page.ScriptFontFamilies
---@field script string Name of the script which these font families are defined for.
---@field fontFamilies CDP.Page.FontFamilies Generic font families collection for the script.
---Default font sizes.
---@class CDP.Page.FontSizes
---@field standard? integer Default standard font size.
---@field fixed? integer Default fixed font size.
---@alias CDP.Page.ClientNavigationReason "formSubmissionGet" | "formSubmissionPost" | "httpHeaderRefresh" | "scriptInitiated" | "metaTagRefresh" | "pageBlockInterstitial" | "reload" | "anchorClick"
---@alias CDP.Page.ClientNavigationDisposition "currentTab" | "newTab" | "newWindow" | "download"
---@class CDP.Page.InstallabilityErrorArgument
---@field name string Argument name (e.g. name:'minimum-icon-size-in-pixels').
---@field value string Argument value (e.g. value:'64').
---The installability error
---@class CDP.Page.InstallabilityError
---@field errorId string The error id (e.g. 'manifest-missing-suitable-icon').
---@field errorArguments CDP.Page.InstallabilityErrorArgument[] The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
---@alias CDP.Page.ReferrerPolicy "noReferrer" | "noReferrerWhenDowngrade" | "origin" | "originWhenCrossOrigin" | "sameOrigin" | "strictOrigin" | "strictOriginWhenCrossOrigin" | "unsafeUrl" The referring-policy used for the navigation.
---Per-script compilation cache parameters for `Page.produceCompilationCache`
---@class CDP.Page.CompilationCacheParams
---@field url string The URL of the script to produce a compilation cache entry for.
---@field eager? boolean A hint to the backend whether eager compilation is recommended.<br>(the actual compilation mode used is upon backend discretion).
---@alias CDP.Page.AutoResponseMode "none" | "autoAccept" | "autoReject" | "autoOptOut" Enum of possible auto-reponse for permisison / prompt dialogs.
---@alias CDP.Page.NavigationType "Navigation" | "BackForwardCacheRestore" The type of a frameNavigated event.
---@alias CDP.Page.BackForwardCacheNotRestoredReason "NotPrimaryMainFrame" | "BackForwardCacheDisabled" | "RelatedActiveContentsExist" | "HTTPStatusNotOK" | "SchemeNotHTTPOrHTTPS" | "Loading" | "WasGrantedMediaAccess" | "DisableForRenderFrameHostCalled" | "DomainNotAllowed" | "HTTPMethodNotGET" | "SubframeIsNavigating" | "Timeout" | "CacheLimit" | "JavaScriptExecution" | "RendererProcessKilled" | "RendererProcessCrashed" | "SchedulerTrackedFeatureUsed" | "ConflictingBrowsingInstance" | "CacheFlushed" | "ServiceWorkerVersionActivation" | "SessionRestored" | "ServiceWorkerPostMessage" | "EnteredBackForwardCacheBeforeServiceWorkerHostAdded" | "RenderFrameHostReused_SameSite" | "RenderFrameHostReused_CrossSite" | "ServiceWorkerClaim" | "IgnoreEventAndEvict" | "HaveInnerContents" | "TimeoutPuttingInCache" | "BackForwardCacheDisabledByLowMemory" | "BackForwardCacheDisabledByCommandLine" | "NetworkRequestDatapipeDrainedAsBytesConsumer" | "NetworkRequestRedirected" | "NetworkRequestTimeout" | "NetworkExceedsBufferLimit" | "NavigationCancelledWhileRestoring" | "NotMostRecentNavigationEntry" | "BackForwardCacheDisabledForPrerender" | "UserAgentOverrideDiffers" | "ForegroundCacheLimit" | "BrowsingInstanceNotSwapped" | "BackForwardCacheDisabledForDelegate" | "UnloadHandlerExistsInMainFrame" | "UnloadHandlerExistsInSubFrame" | "ServiceWorkerUnregistration" | "CacheControlNoStore" | "CacheControlNoStoreCookieModified" | "CacheControlNoStoreHTTPOnlyCookieModified" | "NoResponseHead" | "Unknown" | "ActivationNavigationsDisallowedForBug1234857" | "ErrorDocument" | "FencedFramesEmbedder" | "CookieDisabled" | "HTTPAuthRequired" | "CookieFlushed" | "WebSocket" | "WebTransport" | "WebRTC" | "MainResourceHasCacheControlNoStore" | "MainResourceHasCacheControlNoCache" | "SubresourceHasCacheControlNoStore" | "SubresourceHasCacheControlNoCache" | "ContainsPlugins" | "DocumentLoaded" | "DedicatedWorkerOrWorklet" | "OutstandingNetworkRequestOthers" | "RequestedMIDIPermission" | "RequestedAudioCapturePermission" | "RequestedVideoCapturePermission" | "RequestedBackForwardCacheBlockedSensors" | "RequestedBackgroundWorkPermission" | "BroadcastChannel" | "WebXR" | "SharedWorker" | "WebLocks" | "WebHID" | "WebShare" | "RequestedStorageAccessGrant" | "WebNfc" | "OutstandingNetworkRequestFetch" | "OutstandingNetworkRequestXHR" | "AppBanner" | "Printing" | "WebDatabase" | "PictureInPicture" | "Portal" | "SpeechRecognizer" | "IdleManager" | "PaymentManager" | "SpeechSynthesis" | "KeyboardLock" | "WebOTPService" | "OutstandingNetworkRequestDirectSocket" | "InjectedJavascript" | "InjectedStyleSheet" | "KeepaliveRequest" | "IndexedDBEvent" | "Dummy" | "JsNetworkRequestReceivedCacheControlNoStoreResource" | "WebRTCSticky" | "WebTransportSticky" | "WebSocketSticky" | "ContentSecurityHandler" | "ContentWebAuthenticationAPI" | "ContentFileChooser" | "ContentSerial" | "ContentFileSystemAccess" | "ContentMediaDevicesDispatcherHost" | "ContentWebBluetooth" | "ContentWebUSB" | "ContentMediaSessionService" | "ContentScreenReader" | "EmbedderPopupBlockerTabHelper" | "EmbedderSafeBrowsingTriggeredPopupBlocker" | "EmbedderSafeBrowsingThreatDetails" | "EmbedderAppBannerManager" | "EmbedderDomDistillerViewerSource" | "EmbedderDomDistillerSelfDeletingRequestDelegate" | "EmbedderOomInterventionTabHelper" | "EmbedderOfflinePage" | "EmbedderChromePasswordManagerClientBindCredentialManager" | "EmbedderPermissionRequestManager" | "EmbedderModalDialog" | "EmbedderExtensions" | "EmbedderExtensionMessaging" | "EmbedderExtensionMessagingForOpenPort" | "EmbedderExtensionSentMessageToCachedFrame" List of not restored reasons for back-forward cache.
---@alias CDP.Page.BackForwardCacheNotRestoredReasonType "SupportPending" | "PageSupportNeeded" | "Circumstantial" Types of not restored reasons for back-forward cache.
---@class CDP.Page.BackForwardCacheNotRestoredExplanation
---@field type CDP.Page.BackForwardCacheNotRestoredReasonType Type of the reason
---@field reason CDP.Page.BackForwardCacheNotRestoredReason Not restored reason
---@field context? string Context associated with the reason. The meaning of this context is<br>dependent on the reason:<br>- EmbedderExtensionSentMessageToCachedFrame: the extension ID.
---@class CDP.Page.BackForwardCacheNotRestoredExplanationTree
---@field url string URL of each frame
---@field explanations CDP.Page.BackForwardCacheNotRestoredExplanation[] Not restored reasons of each frame
---@field children CDP.Page.BackForwardCacheNotRestoredExplanationTree[] Array of children frame
---@class CDP.Page.addScriptToEvaluateOnLoad_parameters
---@field scriptSource string
---@class CDP.Page.addScriptToEvaluateOnLoad_return
---@field identifier CDP.Page.ScriptIdentifier Identifier of the added script.
---@class CDP.Page.addScriptToEvaluateOnNewDocument_parameters
---@field source string
---@field worldName? string If specified, creates an isolated world with the given name and evaluates given script in it.<br>This world name will be used as the ExecutionContextDescription::name when the corresponding<br>event is emitted.
---@field includeCommandLineAPI? boolean Specifies whether command line API should be available to the script, defaults<br>to false.
---@field runImmediately? boolean If true, runs the script immediately on existing execution contexts or worlds.<br>Default: false.
---@class CDP.Page.addScriptToEvaluateOnNewDocument_return
---@field identifier CDP.Page.ScriptIdentifier Identifier of the added script.
---@class CDP.Page.captureScreenshot_parameters
---@field format? "jpeg" | "png" | "webp" Image compression format (defaults to png).
---@field quality? integer Compression quality from range [0..100] (jpeg only).
---@field clip? CDP.Page.Viewport Capture the screenshot of a given region only.
---@field fromSurface? boolean Capture the screenshot from the surface, rather than the view. Defaults to true.
---@field captureBeyondViewport? boolean Capture the screenshot beyond the viewport. Defaults to false.
---@field optimizeForSpeed? boolean Optimize image encoding for speed, not for resulting size (defaults to false)
---@class CDP.Page.captureScreenshot_return
---@field data string Base64-encoded image data. (Encoded as a base64 string when passed over JSON)
---@class CDP.Page.captureSnapshot_parameters
---@field format? "mhtml" Format (defaults to mhtml).
---@class CDP.Page.captureSnapshot_return
---@field data string Serialized page data.
---@class CDP.Page.createIsolatedWorld_parameters
---@field frameId CDP.Page.FrameId Id of the frame in which the isolated world should be created.
---@field worldName? string An optional name which is reported in the Execution Context.
---@field grantUniveralAccess? boolean Whether or not universal access should be granted to the isolated world. This is a powerful<br>option, use with caution.
---@class CDP.Page.createIsolatedWorld_return
---@field executionContextId CDP.Runtime.ExecutionContextId Execution context of the isolated world.
---@class CDP.Page.deleteCookie_parameters
---@field cookieName string Name of the cookie to remove.
---@field url string URL to match cooke domain and path.
---@class CDP.Page.getAppManifest_return
---@field url string Manifest location.
---@field errors CDP.Page.AppManifestError[]
---@field data? string Manifest content.
---@field parsed? CDP.Page.AppManifestParsedProperties Parsed manifest properties
---@class CDP.Page.getInstallabilityErrors_return
---@field installabilityErrors CDP.Page.InstallabilityError[]
---@class CDP.Page.getManifestIcons_return
---@field primaryIcon? string
---@class CDP.Page.getAppId_return
---@field appId? string App id, either from manifest's id attribute or computed from start_url
---@field recommendedId? string Recommendation for manifest's id attribute to match current id computed from start_url
---@class CDP.Page.getAdScriptId_parameters
---@field frameId CDP.Page.FrameId
---@class CDP.Page.getAdScriptId_return
---@field adScriptId? CDP.Page.AdScriptId Identifies the bottom-most script which caused the frame to be labelled<br>as an ad. Only sent if frame is labelled as an ad and id is available.
---@class CDP.Page.getCookies_return
---@field cookies CDP.Network.Cookie[] Array of cookie objects.
---@class CDP.Page.getFrameTree_return
---@field frameTree CDP.Page.FrameTree Present frame tree structure.
---@class CDP.Page.getLayoutMetrics_return
---@field layoutViewport CDP.Page.LayoutViewport Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead.
---@field visualViewport CDP.Page.VisualViewport Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead.
---@field contentSize CDP.DOM.Rect Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead.
---@field cssLayoutViewport CDP.Page.LayoutViewport Metrics relating to the layout viewport in CSS pixels.
---@field cssVisualViewport CDP.Page.VisualViewport Metrics relating to the visual viewport in CSS pixels.
---@field cssContentSize CDP.DOM.Rect Size of scrollable area in CSS pixels.
---@class CDP.Page.getNavigationHistory_return
---@field currentIndex integer Index of the current navigation history entry.
---@field entries CDP.Page.NavigationEntry[] Array of navigation history entries.
---@class CDP.Page.getResourceContent_parameters
---@field frameId CDP.Page.FrameId Frame id to get resource for.
---@field url string URL of the resource to get content for.
---@class CDP.Page.getResourceContent_return
---@field content string Resource content.
---@field base64Encoded boolean True, if content was served as base64.
---@class CDP.Page.getResourceTree_return
---@field frameTree CDP.Page.FrameResourceTree Present frame / resource tree structure.
---@class CDP.Page.handleJavaScriptDialog_parameters
---@field accept boolean Whether to accept or dismiss the dialog.
---@field promptText? string The text to enter into the dialog prompt before accepting. Used only if this is a prompt<br>dialog.
---@class CDP.Page.navigate_parameters
---@field url string URL to navigate the page to.
---@field referrer? string Referrer URL.
---@field transitionType? CDP.Page.TransitionType Intended transition type.
---@field frameId? CDP.Page.FrameId Frame id to navigate, if not specified navigates the top frame.
---@field referrerPolicy? CDP.Page.ReferrerPolicy Referrer-policy used for the navigation.
---@class CDP.Page.navigate_return
---@field frameId CDP.Page.FrameId Frame id that has navigated (or failed to navigate)
---@field loaderId? CDP.Network.LoaderId Loader identifier. This is omitted in case of same-document navigation,<br>as the previously committed loaderId would not change.
---@field errorText? string User friendly error message, present if and only if navigation has failed.
---@class CDP.Page.navigateToHistoryEntry_parameters
---@field entryId integer Unique id of the entry to navigate to.
---@class CDP.Page.printToPDF_parameters
---@field landscape? boolean Paper orientation. Defaults to false.
---@field displayHeaderFooter? boolean Display header and footer. Defaults to false.
---@field printBackground? boolean Print background graphics. Defaults to false.
---@field scale? number Scale of the webpage rendering. Defaults to 1.
---@field paperWidth? number Paper width in inches. Defaults to 8.5 inches.
---@field paperHeight? number Paper height in inches. Defaults to 11 inches.
---@field marginTop? number Top margin in inches. Defaults to 1cm (~0.4 inches).
---@field marginBottom? number Bottom margin in inches. Defaults to 1cm (~0.4 inches).
---@field marginLeft? number Left margin in inches. Defaults to 1cm (~0.4 inches).
---@field marginRight? number Right margin in inches. Defaults to 1cm (~0.4 inches).
---@field pageRanges? string Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are<br>printed in the document order, not in the order specified, and no<br>more than once.<br>Defaults to empty string, which implies the entire document is printed.<br>The page numbers are quietly capped to actual page count of the<br>document, and ranges beyond the end of the document are ignored.<br>If this results in no pages to print, an error is reported.<br>It is an error to specify a range with start greater than end.
---@field headerTemplate? string HTML template for the print header. Should be valid HTML markup with following<br>classes used to inject printing values into them:<br>- `date`: formatted print date<br>- `title`: document title<br>- `url`: document location<br>- `pageNumber`: current page number<br>- `totalPages`: total pages in the document<br><br>For example, `<span class=title></span>` would generate span containing the title.
---@field footerTemplate? string HTML template for the print footer. Should use the same format as the `headerTemplate`.
---@field preferCSSPageSize? boolean Whether or not to prefer page size as defined by css. Defaults to false,<br>in which case the content will be scaled to fit the paper size.
---@field transferMode? "ReturnAsBase64" | "ReturnAsStream" return as stream
---@field generateTaggedPDF? boolean Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
---@class CDP.Page.printToPDF_return
---@field data string Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)
---@field stream? CDP.IO.StreamHandle A handle of the stream that holds resulting PDF data.
---@class CDP.Page.reload_parameters
---@field ignoreCache? boolean If true, browser cache is ignored (as if the user pressed Shift+refresh).
---@field scriptToEvaluateOnLoad? string If set, the script will be injected into all frames of the inspected page after reload.<br>Argument will be ignored if reloading dataURL origin.
---@class CDP.Page.removeScriptToEvaluateOnLoad_parameters
---@field identifier CDP.Page.ScriptIdentifier
---@class CDP.Page.removeScriptToEvaluateOnNewDocument_parameters
---@field identifier CDP.Page.ScriptIdentifier
---@class CDP.Page.screencastFrameAck_parameters
---@field sessionId integer Frame number.
---@class CDP.Page.searchInResource_parameters
---@field frameId CDP.Page.FrameId Frame id for resource to search in.
---@field url string URL of the resource to search in.
---@field query string String to search for.
---@field caseSensitive? boolean If true, search is case sensitive.
---@field isRegex? boolean If true, treats string parameter as regex.
---@class CDP.Page.searchInResource_return
---@field result CDP.Debugger.SearchMatch[] List of search matches.
---@class CDP.Page.setAdBlockingEnabled_parameters
---@field enabled boolean Whether to block ads.
---@class CDP.Page.setBypassCSP_parameters
---@field enabled boolean Whether to bypass page CSP.
---@class CDP.Page.getPermissionsPolicyState_parameters
---@field frameId CDP.Page.FrameId
---@class CDP.Page.getPermissionsPolicyState_return
---@field states CDP.Page.PermissionsPolicyFeatureState[]
---@class CDP.Page.getOriginTrials_parameters
---@field frameId CDP.Page.FrameId
---@class CDP.Page.getOriginTrials_return
---@field originTrials CDP.Page.OriginTrial[]
---@class CDP.Page.setDeviceMetricsOverride_parameters
---@field width integer Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
---@field height integer Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
---@field deviceScaleFactor number Overriding device scale factor value. 0 disables the override.
---@field mobile boolean Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text<br>autosizing and more.
---@field scale? number Scale to apply to resulting view image.
---@field screenWidth? integer Overriding screen width value in pixels (minimum 0, maximum 10000000).
---@field screenHeight? integer Overriding screen height value in pixels (minimum 0, maximum 10000000).
---@field positionX? integer Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
---@field positionY? integer Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
---@field dontSetVisibleSize? boolean Do not set visible view size, rely upon explicit setVisibleSize call.
---@field screenOrientation? CDP.Emulation.ScreenOrientation Screen orientation override.
---@field viewport? CDP.Page.Viewport The viewport dimensions and scale. If not set, the override is cleared.
---@class CDP.Page.setDeviceOrientationOverride_parameters
---@field alpha number Mock alpha
---@field beta number Mock beta
---@field gamma number Mock gamma
---@class CDP.Page.setFontFamilies_parameters
---@field fontFamilies CDP.Page.FontFamilies Specifies font families to set. If a font family is not specified, it won't be changed.
---@field forScripts? CDP.Page.ScriptFontFamilies[] Specifies font families to set for individual scripts.
---@class CDP.Page.setFontSizes_parameters
---@field fontSizes CDP.Page.FontSizes Specifies font sizes to set. If a font size is not specified, it won't be changed.
---@class CDP.Page.setDocumentContent_parameters
---@field frameId CDP.Page.FrameId Frame id to set HTML for.
---@field html string HTML content to set.
---@class CDP.Page.setDownloadBehavior_parameters
---@field behavior "deny" | "allow" | "default" Whether to allow all or deny all download requests, or use default Chrome behavior if<br>available (otherwise deny).
---@field downloadPath? string The default path to save downloaded files to. This is required if behavior is set to 'allow'
---@class CDP.Page.setGeolocationOverride_parameters
---@field latitude? number Mock latitude
---@field longitude? number Mock longitude
---@field accuracy? number Mock accuracy
---@class CDP.Page.setLifecycleEventsEnabled_parameters
---@field enabled boolean If true, starts emitting lifecycle events.
---@class CDP.Page.setTouchEmulationEnabled_parameters
---@field enabled boolean Whether the touch event emulation should be enabled.
---@field configuration? "mobile" | "desktop" Touch/gesture events configuration. Default: current platform.
---@class CDP.Page.startScreencast_parameters
---@field format? "jpeg" | "png" Image compression format.
---@field quality? integer Compression quality from range [0..100].
---@field maxWidth? integer Maximum screenshot width.
---@field maxHeight? integer Maximum screenshot height.
---@field everyNthFrame? integer Send every n-th frame.
---@class CDP.Page.setWebLifecycleState_parameters
---@field state "frozen" | "active" Target lifecycle state
---@class CDP.Page.produceCompilationCache_parameters
---@field scripts CDP.Page.CompilationCacheParams[]
---@class CDP.Page.addCompilationCache_parameters
---@field url string
---@field data string Base64-encoded data (Encoded as a base64 string when passed over JSON)
---@class CDP.Page.setSPCTransactionMode_parameters
---@field mode CDP.Page.AutoResponseMode
---@class CDP.Page.setRPHRegistrationMode_parameters
---@field mode CDP.Page.AutoResponseMode
---@class CDP.Page.generateTestReport_parameters
---@field message string Message to be displayed in the report.
---@field group? string Specifies the endpoint group to deliver the report to.
---@class CDP.Page.setInterceptFileChooserDialog_parameters
---@field enabled boolean
---@class CDP.Page.setPrerenderingAllowed_parameters
---@field isAllowed boolean
---@class CDP.Page.domContentEventFired_event
---@field timestamp CDP.Network.MonotonicTime
---@class CDP.Page.fileChooserOpened_event
---@field frameId CDP.Page.FrameId Id of the frame containing input node.
---@field mode "selectSingle" | "selectMultiple" Input mode.
---@field backendNodeId? CDP.DOM.BackendNodeId Input node id. Only present for file choosers opened via an `<input type="file">` element.
---@class CDP.Page.frameAttached_event
---@field frameId CDP.Page.FrameId Id of the frame that has been attached.
---@field parentFrameId CDP.Page.FrameId Parent frame identifier.
---@field stack? CDP.Runtime.StackTrace JavaScript stack trace of when frame was attached, only set if frame initiated from script.
---@class CDP.Page.frameClearedScheduledNavigation_event
---@field frameId CDP.Page.FrameId Id of the frame that has cleared its scheduled navigation.
---@class CDP.Page.frameDetached_event
---@field frameId CDP.Page.FrameId Id of the frame that has been detached.
---@field reason "remove" | "swap"
---@class CDP.Page.frameNavigated_event
---@field frame CDP.Page.Frame Frame object.
---@field type CDP.Page.NavigationType
---@class CDP.Page.documentOpened_event
---@field frame CDP.Page.Frame Frame object.
---@class CDP.Page.frameRequestedNavigation_event
---@field frameId CDP.Page.FrameId Id of the frame that is being navigated.
---@field reason CDP.Page.ClientNavigationReason The reason for the navigation.
---@field url string The destination URL for the requested navigation.
---@field disposition CDP.Page.ClientNavigationDisposition The disposition for the navigation.
---@class CDP.Page.frameScheduledNavigation_event
---@field frameId CDP.Page.FrameId Id of the frame that has scheduled a navigation.
---@field delay number Delay (in seconds) until the navigation is scheduled to begin. The navigation is not<br>guaranteed to start.
---@field reason CDP.Page.ClientNavigationReason The reason for the navigation.
---@field url string The destination URL for the scheduled navigation.
---@class CDP.Page.frameStartedLoading_event
---@field frameId CDP.Page.FrameId Id of the frame that has started loading.
---@class CDP.Page.frameStoppedLoading_event
---@field frameId CDP.Page.FrameId Id of the frame that has stopped loading.
---@class CDP.Page.downloadWillBegin_event
---@field frameId CDP.Page.FrameId Id of the frame that caused download to begin.
---@field guid string Global unique identifier of the download.
---@field url string URL of the resource being downloaded.
---@field suggestedFilename string Suggested file name of the resource (the actual name of the file saved on disk may differ).
---@class CDP.Page.downloadProgress_event
---@field guid string Global unique identifier of the download.
---@field totalBytes number Total expected bytes to download.
---@field receivedBytes number Total bytes received.
---@field state "inProgress" | "completed" | "canceled" Download status.
---@class CDP.Page.javascriptDialogClosed_event
---@field result boolean Whether dialog was confirmed.
---@field userInput string User input in case of prompt.
---@class CDP.Page.javascriptDialogOpening_event
---@field url string Frame url.
---@field message string Message that will be displayed by the dialog.
---@field type CDP.Page.DialogType Dialog type.
---@field hasBrowserHandler boolean True iff browser is capable showing or acting on the given dialog. When browser has no<br>dialog handler for given target, calling alert while Page domain is engaged will stall<br>the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
---@field defaultPrompt? string Default dialog prompt.
---@class CDP.Page.lifecycleEvent_event
---@field frameId CDP.Page.FrameId Id of the frame.
---@field loaderId CDP.Network.LoaderId Loader identifier. Empty string if the request is fetched from worker.
---@field name string
---@field timestamp CDP.Network.MonotonicTime
---@class CDP.Page.backForwardCacheNotUsed_event
---@field loaderId CDP.Network.LoaderId The loader id for the associated navgation.
---@field frameId CDP.Page.FrameId The frame id of the associated frame.
---@field notRestoredExplanations CDP.Page.BackForwardCacheNotRestoredExplanation[] Array of reasons why the page could not be cached. This must not be empty.
---@field notRestoredExplanationsTree? CDP.Page.BackForwardCacheNotRestoredExplanationTree Tree structure of reasons why the page could not be cached for each frame.
---@class CDP.Page.loadEventFired_event
---@field timestamp CDP.Network.MonotonicTime
---@class CDP.Page.navigatedWithinDocument_event
---@field frameId CDP.Page.FrameId Id of the frame.
---@field url string Frame's new url.
---@class CDP.Page.screencastFrame_event
---@field data string Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)
---@field metadata CDP.Page.ScreencastFrameMetadata Screencast frame metadata.
---@field sessionId integer Frame number.
---@class CDP.Page.screencastVisibilityChanged_event
---@field visible boolean True if the page is visible.
---@class CDP.Page.windowOpen_event
---@field url string The URL for the new window.
---@field windowName string Window name.
---@field windowFeatures string[] An array of enabled window features.
---@field userGesture boolean Whether or not it was triggered by user gesture.
---@class CDP.Page.compilationCacheProduced_event
---@field url string
---@field data string Base64-encoded data (Encoded as a base64 string when passed over JSON)
---Actions and events related to the inspected page belong to the page domain.
---@class CDP.Page: CDP._ClientContainer
---Deprecated, please use addScriptToEvaluateOnNewDocument instead.
---@field addScriptToEvaluateOnLoad fun(self: CDP._ClientContainer, params: CDP.Page.addScriptToEvaluateOnLoad_parameters): CDP.Error?, CDP.Page.addScriptToEvaluateOnLoad_return?
---Evaluates given script in every frame upon creation (before loading frame's scripts).
---@field addScriptToEvaluateOnNewDocument fun(self: CDP._ClientContainer, params: CDP.Page.addScriptToEvaluateOnNewDocument_parameters): CDP.Error?, CDP.Page.addScriptToEvaluateOnNewDocument_return?
---Brings page to front (activates tab).
---@field bringToFront fun(self: CDP._ClientContainer): CDP.Error?
---Capture page screenshot.
---@field captureScreenshot fun(self: CDP._ClientContainer, params: CDP.Page.captureScreenshot_parameters): CDP.Error?, CDP.Page.captureScreenshot_return?
---Returns a snapshot of the page as a string. For MHTML format, the serialization includes
---iframes, shadow DOM, external resources, and element-inline styles.
---@field captureSnapshot fun(self: CDP._ClientContainer, params: CDP.Page.captureSnapshot_parameters): CDP.Error?, CDP.Page.captureSnapshot_return?
---Clears the overridden device metrics.
---@field clearDeviceMetricsOverride fun(self: CDP._ClientContainer): CDP.Error?
---Clears the overridden Device Orientation.
---@field clearDeviceOrientationOverride fun(self: CDP._ClientContainer): CDP.Error?
---Clears the overridden Geolocation Position and Error.
---@field clearGeolocationOverride fun(self: CDP._ClientContainer): CDP.Error?
---Creates an isolated world for the given frame.
---@field createIsolatedWorld fun(self: CDP._ClientContainer, params: CDP.Page.createIsolatedWorld_parameters): CDP.Error?, CDP.Page.createIsolatedWorld_return?
---Deletes browser cookie with given name, domain and path.
---@field deleteCookie fun(self: CDP._ClientContainer, params: CDP.Page.deleteCookie_parameters): CDP.Error?
---Disables page domain notifications.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables page domain notifications.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field getAppManifest fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getAppManifest_return?
---@field getInstallabilityErrors fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getInstallabilityErrors_return?
---Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
---@field getManifestIcons fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getManifestIcons_return?
---Returns the unique (PWA) app id.
---Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
---@field getAppId fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getAppId_return?
---@field getAdScriptId fun(self: CDP._ClientContainer, params: CDP.Page.getAdScriptId_parameters): CDP.Error?, CDP.Page.getAdScriptId_return?
---Returns all browser cookies for the page and all of its subframes. Depending
---on the backend support, will return detailed cookie information in the
---`cookies` field.
---@field getCookies fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getCookies_return?
---Returns present frame tree structure.
---@field getFrameTree fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getFrameTree_return?
---Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
---@field getLayoutMetrics fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getLayoutMetrics_return?
---Returns navigation history for the current page.
---@field getNavigationHistory fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getNavigationHistory_return?
---Resets navigation history for the current page.
---@field resetNavigationHistory fun(self: CDP._ClientContainer): CDP.Error?
---Returns content of the given resource.
---@field getResourceContent fun(self: CDP._ClientContainer, params: CDP.Page.getResourceContent_parameters): CDP.Error?, CDP.Page.getResourceContent_return?
---Returns present frame / resource tree structure.
---@field getResourceTree fun(self: CDP._ClientContainer): CDP.Error?, CDP.Page.getResourceTree_return?
---Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
---@field handleJavaScriptDialog fun(self: CDP._ClientContainer, params: CDP.Page.handleJavaScriptDialog_parameters): CDP.Error?
---Navigates current page to the given URL.
---@field navigate fun(self: CDP._ClientContainer, params: CDP.Page.navigate_parameters): CDP.Error?, CDP.Page.navigate_return?
---Navigates current page to the given history entry.
---@field navigateToHistoryEntry fun(self: CDP._ClientContainer, params: CDP.Page.navigateToHistoryEntry_parameters): CDP.Error?
---Print page as PDF.
---@field printToPDF fun(self: CDP._ClientContainer, params: CDP.Page.printToPDF_parameters): CDP.Error?, CDP.Page.printToPDF_return?
---Reloads given page optionally ignoring the cache.
---@field reload fun(self: CDP._ClientContainer, params: CDP.Page.reload_parameters): CDP.Error?
---Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
---@field removeScriptToEvaluateOnLoad fun(self: CDP._ClientContainer, params: CDP.Page.removeScriptToEvaluateOnLoad_parameters): CDP.Error?
---Removes given script from the list.
---@field removeScriptToEvaluateOnNewDocument fun(self: CDP._ClientContainer, params: CDP.Page.removeScriptToEvaluateOnNewDocument_parameters): CDP.Error?
---Acknowledges that a screencast frame has been received by the frontend.
---@field screencastFrameAck fun(self: CDP._ClientContainer, params: CDP.Page.screencastFrameAck_parameters): CDP.Error?
---Searches for given string in resource content.
---@field searchInResource fun(self: CDP._ClientContainer, params: CDP.Page.searchInResource_parameters): CDP.Error?, CDP.Page.searchInResource_return?
---Enable Chrome's experimental ad filter on all sites.
---@field setAdBlockingEnabled fun(self: CDP._ClientContainer, params: CDP.Page.setAdBlockingEnabled_parameters): CDP.Error?
---Enable page Content Security Policy by-passing.
---@field setBypassCSP fun(self: CDP._ClientContainer, params: CDP.Page.setBypassCSP_parameters): CDP.Error?
---Get Permissions Policy state on given frame.
---@field getPermissionsPolicyState fun(self: CDP._ClientContainer, params: CDP.Page.getPermissionsPolicyState_parameters): CDP.Error?, CDP.Page.getPermissionsPolicyState_return?
---Get Origin Trials on given frame.
---@field getOriginTrials fun(self: CDP._ClientContainer, params: CDP.Page.getOriginTrials_parameters): CDP.Error?, CDP.Page.getOriginTrials_return?
---Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
---window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
---query results).
---@field setDeviceMetricsOverride fun(self: CDP._ClientContainer, params: CDP.Page.setDeviceMetricsOverride_parameters): CDP.Error?
---Overrides the Device Orientation.
---@field setDeviceOrientationOverride fun(self: CDP._ClientContainer, params: CDP.Page.setDeviceOrientationOverride_parameters): CDP.Error?
---Set generic font families.
---@field setFontFamilies fun(self: CDP._ClientContainer, params: CDP.Page.setFontFamilies_parameters): CDP.Error?
---Set default font sizes.
---@field setFontSizes fun(self: CDP._ClientContainer, params: CDP.Page.setFontSizes_parameters): CDP.Error?
---Sets given markup as the document's HTML.
---@field setDocumentContent fun(self: CDP._ClientContainer, params: CDP.Page.setDocumentContent_parameters): CDP.Error?
---Set the behavior when downloading a file.
---@field setDownloadBehavior fun(self: CDP._ClientContainer, params: CDP.Page.setDownloadBehavior_parameters): CDP.Error?
---Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
---unavailable.
---@field setGeolocationOverride fun(self: CDP._ClientContainer, params: CDP.Page.setGeolocationOverride_parameters): CDP.Error?
---Controls whether page will emit lifecycle events.
---@field setLifecycleEventsEnabled fun(self: CDP._ClientContainer, params: CDP.Page.setLifecycleEventsEnabled_parameters): CDP.Error?
---Toggles mouse event-based touch event emulation.
---@field setTouchEmulationEnabled fun(self: CDP._ClientContainer, params: CDP.Page.setTouchEmulationEnabled_parameters): CDP.Error?
---Starts sending each frame using the `screencastFrame` event.
---@field startScreencast fun(self: CDP._ClientContainer, params: CDP.Page.startScreencast_parameters): CDP.Error?
---Force the page stop all navigations and pending resource fetches.
---@field stopLoading fun(self: CDP._ClientContainer): CDP.Error?
---Crashes renderer on the IO thread, generates minidumps.
---@field crash fun(self: CDP._ClientContainer): CDP.Error?
---Tries to close page, running its beforeunload hooks, if any.
---@field close fun(self: CDP._ClientContainer): CDP.Error?
---Tries to update the web lifecycle state of the page.
---It will transition the page to the given state according to:
---https://github.com/WICG/web-lifecycle/
---@field setWebLifecycleState fun(self: CDP._ClientContainer, params: CDP.Page.setWebLifecycleState_parameters): CDP.Error?
---Stops sending each frame in the `screencastFrame`.
---@field stopScreencast fun(self: CDP._ClientContainer): CDP.Error?
---Requests backend to produce compilation cache for the specified scripts.
---`scripts` are appeneded to the list of scripts for which the cache
---would be produced. The list may be reset during page navigation.
---When script with a matching URL is encountered, the cache is optionally
---produced upon backend discretion, based on internal heuristics.
---See also: `Page.compilationCacheProduced`.
---@field produceCompilationCache fun(self: CDP._ClientContainer, params: CDP.Page.produceCompilationCache_parameters): CDP.Error?
---Seeds compilation cache for given url. Compilation cache does not survive
---cross-process navigation.
---@field addCompilationCache fun(self: CDP._ClientContainer, params: CDP.Page.addCompilationCache_parameters): CDP.Error?
---Clears seeded compilation cache.
---@field clearCompilationCache fun(self: CDP._ClientContainer): CDP.Error?
---Sets the Secure Payment Confirmation transaction mode.
---https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
---@field setSPCTransactionMode fun(self: CDP._ClientContainer, params: CDP.Page.setSPCTransactionMode_parameters): CDP.Error?
---Extensions for Custom Handlers API:
---https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
---@field setRPHRegistrationMode fun(self: CDP._ClientContainer, params: CDP.Page.setRPHRegistrationMode_parameters): CDP.Error?
---Generates a report for testing.
---@field generateTestReport fun(self: CDP._ClientContainer, params: CDP.Page.generateTestReport_parameters): CDP.Error?
---Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
---@field waitForDebugger fun(self: CDP._ClientContainer): CDP.Error?
---Intercept file chooser requests and transfer control to protocol clients.
---When file chooser interception is enabled, native file chooser dialog is not shown.
---Instead, a protocol event `Page.fileChooserOpened` is emitted.
---@field setInterceptFileChooserDialog fun(self: CDP._ClientContainer, params: CDP.Page.setInterceptFileChooserDialog_parameters): CDP.Error?
---Enable/disable prerendering manually.
---
---This command is a short-term solution for https://crbug.com/1440085.
---See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
---for more details.
---
---TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
---@field setPrerenderingAllowed fun(self: CDP._ClientContainer, params: CDP.Page.setPrerenderingAllowed_parameters): CDP.Error?
---@field domContentEventFired fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.domContentEventFired_event)): CDP.Error?
---Emitted only when `page.interceptFileChooser` is enabled.
---@field fileChooserOpened fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.fileChooserOpened_event)): CDP.Error?
---Fired when frame has been attached to its parent.
---@field frameAttached fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameAttached_event)): CDP.Error?
---Fired when frame no longer has a scheduled navigation.
---@field frameClearedScheduledNavigation fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameClearedScheduledNavigation_event)): CDP.Error?
---Fired when frame has been detached from its parent.
---@field frameDetached fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameDetached_event)): CDP.Error?
---Fired once navigation of the frame has completed. Frame is now associated with the new loader.
---@field frameNavigated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameNavigated_event)): CDP.Error?
---Fired when opening document to write to.
---@field documentOpened fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.documentOpened_event)): CDP.Error?
---@field frameResized fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when a renderer-initiated navigation is requested.
---Navigation may still be cancelled after the event is issued.
---@field frameRequestedNavigation fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameRequestedNavigation_event)): CDP.Error?
---Fired when frame schedules a potential navigation.
---@field frameScheduledNavigation fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameScheduledNavigation_event)): CDP.Error?
---Fired when frame has started loading.
---@field frameStartedLoading fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameStartedLoading_event)): CDP.Error?
---Fired when frame has stopped loading.
---@field frameStoppedLoading fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.frameStoppedLoading_event)): CDP.Error?
---Fired when page is about to start a download.
---Deprecated. Use Browser.downloadWillBegin instead.
---@field downloadWillBegin fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.downloadWillBegin_event)): CDP.Error?
---Fired when download makes progress. Last call has |done| == true.
---Deprecated. Use Browser.downloadProgress instead.
---@field downloadProgress fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.downloadProgress_event)): CDP.Error?
---Fired when interstitial page was hidden
---@field interstitialHidden fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when interstitial page was shown
---@field interstitialShown fun(self: CDP._ClientContainer, cb: fun()): CDP.Error?
---Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
---closed.
---@field javascriptDialogClosed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.javascriptDialogClosed_event)): CDP.Error?
---Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
---open.
---@field javascriptDialogOpening fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.javascriptDialogOpening_event)): CDP.Error?
---Fired for top level page lifecycle events such as navigation, load, paint, etc.
---@field lifecycleEvent fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.lifecycleEvent_event)): CDP.Error?
---Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
---not assume any ordering with the Page.frameNavigated event. This event is fired only for
---main-frame history navigation where the document changes (non-same-document navigations),
---when bfcache navigation fails.
---@field backForwardCacheNotUsed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.backForwardCacheNotUsed_event)): CDP.Error?
---@field loadEventFired fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.loadEventFired_event)): CDP.Error?
---Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
---@field navigatedWithinDocument fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.navigatedWithinDocument_event)): CDP.Error?
---Compressed image data requested by the `startScreencast`.
---@field screencastFrame fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.screencastFrame_event)): CDP.Error?
---Fired when the page with currently enabled screencast was shown or hidden `.
---@field screencastVisibilityChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.screencastVisibilityChanged_event)): CDP.Error?
---Fired when a new window is going to be opened, via window.open(), link click, form submission,
---etc.
---@field windowOpen fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.windowOpen_event)): CDP.Error?
---Issued for every compilation cache generated. Is only available
---if Page.setGenerateCompilationCache is enabled.
---@field compilationCacheProduced fun(self: CDP._ClientContainer, cb: fun(event: CDP.Page.compilationCacheProduced_event)): CDP.Error?

---Run-time execution metric.
---@class CDP.Performance.Metric
---@field name string Metric name.
---@field value number Metric value.
---@class CDP.Performance.enable_parameters
---@field timeDomain? "timeTicks" | "threadTicks" Time domain to use for collecting and reporting duration metrics.
---@class CDP.Performance.setTimeDomain_parameters
---@field timeDomain "timeTicks" | "threadTicks" Time domain
---@class CDP.Performance.getMetrics_return
---@field metrics CDP.Performance.Metric[] Current values for run-time metrics.
---@class CDP.Performance.metrics_event
---@field metrics CDP.Performance.Metric[] Current values of the metrics.
---@field title string Timestamp title.
---@class CDP.Performance: CDP._ClientContainer
---Disable collecting and reporting metrics.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enable collecting and reporting metrics.
---@field enable fun(self: CDP._ClientContainer, params: CDP.Performance.enable_parameters): CDP.Error?
---Sets time domain to use for collecting and reporting duration metrics.
---Note that this must be called before enabling metrics collection. Calling
---this method while metrics collection is enabled returns an error.
---@field setTimeDomain fun(self: CDP._ClientContainer, params: CDP.Performance.setTimeDomain_parameters): CDP.Error?
---Retrieve current values of run-time metrics.
---@field getMetrics fun(self: CDP._ClientContainer): CDP.Error?, CDP.Performance.getMetrics_return?
---Current values of the metrics.
---@field metrics fun(self: CDP._ClientContainer, cb: fun(event: CDP.Performance.metrics_event)): CDP.Error?

---See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
---@class CDP.PerformanceTimeline.LargestContentfulPaint
---@field renderTime CDP.Network.TimeSinceEpoch
---@field loadTime CDP.Network.TimeSinceEpoch
---@field size number The number of pixels being painted.
---@field elementId? string The id attribute of the element, if available.
---@field url? string The URL of the image (may be trimmed).
---@field nodeId? CDP.DOM.BackendNodeId
---@class CDP.PerformanceTimeline.LayoutShiftAttribution
---@field previousRect CDP.DOM.Rect
---@field currentRect CDP.DOM.Rect
---@field nodeId? CDP.DOM.BackendNodeId
---See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
---@class CDP.PerformanceTimeline.LayoutShift
---@field value number Score increment produced by this event.
---@field hadRecentInput boolean
---@field lastInputTime CDP.Network.TimeSinceEpoch
---@field sources CDP.PerformanceTimeline.LayoutShiftAttribution[]
---@class CDP.PerformanceTimeline.TimelineEvent
---@field frameId CDP.Page.FrameId Identifies the frame that this event is related to. Empty for non-frame targets.
---@field type string The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype<br>This determines which of the optional "details" fiedls is present.
---@field name string Name may be empty depending on the type.
---@field time CDP.Network.TimeSinceEpoch Time in seconds since Epoch, monotonically increasing within document lifetime.
---@field duration? number Event duration, if applicable.
---@field lcpDetails? CDP.PerformanceTimeline.LargestContentfulPaint
---@field layoutShiftDetails? CDP.PerformanceTimeline.LayoutShift
---@class CDP.PerformanceTimeline.enable_parameters
---@field eventTypes string[] The types of event to report, as specified in<br>https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype<br>The specified filter overrides any previous filters, passing empty<br>filter disables recording.<br>Note that not all types exposed to the web platform are currently supported.
---@class CDP.PerformanceTimeline.timelineEventAdded_event
---@field event CDP.PerformanceTimeline.TimelineEvent
---Reporting of performance timeline events, as specified in
---https://w3c.github.io/performance-timeline/#dom-performanceobserver.
---@class CDP.PerformanceTimeline: CDP._ClientContainer
---Previously buffered events would be reported before method returns.
---See also: timelineEventAdded
---@field enable fun(self: CDP._ClientContainer, params: CDP.PerformanceTimeline.enable_parameters): CDP.Error?
---Sent when a performance timeline event is added. See reportPerformanceTimeline method.
---@field timelineEventAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.PerformanceTimeline.timelineEventAdded_event)): CDP.Error?

---@alias CDP.Security.CertificateId integer An internal certificate ID value.
---@alias CDP.Security.MixedContentType "blockable" | "optionally-blockable" | "none" A description of mixed content (HTTP resources on HTTPS pages), as defined by<br>https://www.w3.org/TR/mixed-content/#categories
---@alias CDP.Security.SecurityState "unknown" | "neutral" | "insecure" | "secure" | "info" | "insecure-broken" The security level of a page or resource.
---Details about the security state of the page certificate.
---@class CDP.Security.CertificateSecurityState
---@field protocol string Protocol name (e.g. "TLS 1.2" or "QUIC").
---@field keyExchange string Key Exchange used by the connection, or the empty string if not applicable.
---@field keyExchangeGroup? string (EC)DH group used by the connection, if applicable.
---@field cipher string Cipher name.
---@field mac? string TLS MAC. Note that AEAD ciphers do not have separate MACs.
---@field certificate string[] Page certificate.
---@field subjectName string Certificate subject name.
---@field issuer string Name of the issuing CA.
---@field validFrom CDP.Network.TimeSinceEpoch Certificate valid from date.
---@field validTo CDP.Network.TimeSinceEpoch Certificate valid to (expiration) date
---@field certificateNetworkError? string The highest priority network error code, if the certificate has an error.
---@field certificateHasWeakSignature boolean True if the certificate uses a weak signature aglorithm.
---@field certificateHasSha1Signature boolean True if the certificate has a SHA1 signature in the chain.
---@field modernSSL boolean True if modern SSL
---@field obsoleteSslProtocol boolean True if the connection is using an obsolete SSL protocol.
---@field obsoleteSslKeyExchange boolean True if the connection is using an obsolete SSL key exchange.
---@field obsoleteSslCipher boolean True if the connection is using an obsolete SSL cipher.
---@field obsoleteSslSignature boolean True if the connection is using an obsolete SSL signature.
---@alias CDP.Security.SafetyTipStatus "badReputation" | "lookalike"
---@class CDP.Security.SafetyTipInfo
---@field safetyTipStatus CDP.Security.SafetyTipStatus Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
---@field safeUrl? string The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
---Security state information about the page.
---@class CDP.Security.VisibleSecurityState
---@field securityState CDP.Security.SecurityState The security level of the page.
---@field certificateSecurityState? CDP.Security.CertificateSecurityState Security state details about the page certificate.
---@field safetyTipInfo? CDP.Security.SafetyTipInfo 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.
---@field securityStateIssueIds string[] Array of security state issues ids.
---An explanation of an factor contributing to the security state.
---@class CDP.Security.SecurityStateExplanation
---@field securityState CDP.Security.SecurityState Security state representing the severity of the factor being explained.
---@field title string Title describing the type of factor.
---@field summary string Short phrase describing the type of factor.
---@field description string Full text explanation of the factor.
---@field mixedContentType CDP.Security.MixedContentType The type of mixed content described by the explanation.
---@field certificate string[] Page certificate.
---@field recommendations? string[] Recommendations to fix any issues.
---Information about insecure content on the page.
---@deprecated
---@class CDP.Security.InsecureContentStatus
---@field ranMixedContent boolean Always false.
---@field displayedMixedContent boolean Always false.
---@field containedMixedForm boolean Always false.
---@field ranContentWithCertErrors boolean Always false.
---@field displayedContentWithCertErrors boolean Always false.
---@field ranInsecureContentStyle CDP.Security.SecurityState Always set to unknown.
---@field displayedInsecureContentStyle CDP.Security.SecurityState Always set to unknown.
---@alias CDP.Security.CertificateErrorAction "continue" | "cancel" The action to take when a certificate error occurs. continue will continue processing the<br>request and cancel will cancel the request.
---@class CDP.Security.setIgnoreCertificateErrors_parameters
---@field ignore boolean If true, all certificate errors will be ignored.
---@class CDP.Security.handleCertificateError_parameters
---@field eventId integer The ID of the event.
---@field action CDP.Security.CertificateErrorAction The action to take on the certificate error.
---@class CDP.Security.setOverrideCertificateErrors_parameters
---@field override boolean If true, certificate errors will be overridden.
---@class CDP.Security.certificateError_event
---@field eventId integer The ID of the event.
---@field errorType string The type of the error.
---@field requestURL string The url that was requested.
---@class CDP.Security.visibleSecurityStateChanged_event
---@field visibleSecurityState CDP.Security.VisibleSecurityState Security state information about the page.
---@class CDP.Security.securityStateChanged_event
---@field securityState CDP.Security.SecurityState Security state.
---@field schemeIsCryptographic boolean True if the page was loaded over cryptographic transport such as HTTPS.
---@field explanations CDP.Security.SecurityStateExplanation[] Previously a list of explanations for the security state. Now always<br>empty.
---@field insecureContentStatus CDP.Security.InsecureContentStatus Information about insecure content on the page.
---@field summary? string Overrides user-visible description of the state. Always omitted.
---Security
---@class CDP.Security: CDP._ClientContainer
---Disables tracking security state changes.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables tracking security state changes.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Enable/disable whether all certificate errors should be ignored.
---@field setIgnoreCertificateErrors fun(self: CDP._ClientContainer, params: CDP.Security.setIgnoreCertificateErrors_parameters): CDP.Error?
---Handles a certificate error that fired a certificateError event.
---@field handleCertificateError fun(self: CDP._ClientContainer, params: CDP.Security.handleCertificateError_parameters): CDP.Error?
---Enable/disable overriding certificate errors. If enabled, all certificate error events need to
---be handled by the DevTools client and should be answered with `handleCertificateError` commands.
---@field setOverrideCertificateErrors fun(self: CDP._ClientContainer, params: CDP.Security.setOverrideCertificateErrors_parameters): CDP.Error?
---There is a certificate error. If overriding certificate errors is enabled, then it should be
---handled with the `handleCertificateError` command. Note: this event does not fire if the
---certificate error has been allowed internally. Only one client per target should override
---certificate errors at the same time.
---@field certificateError fun(self: CDP._ClientContainer, cb: fun(event: CDP.Security.certificateError_event)): CDP.Error?
---The security state of the page changed.
---@field visibleSecurityStateChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Security.visibleSecurityStateChanged_event)): CDP.Error?
---The security state of the page changed. No longer being sent.
---@field securityStateChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Security.securityStateChanged_event)): CDP.Error?

---@alias CDP.ServiceWorker.RegistrationID string
---ServiceWorker registration.
---@class CDP.ServiceWorker.ServiceWorkerRegistration
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field scopeURL string
---@field isDeleted boolean
---@alias CDP.ServiceWorker.ServiceWorkerVersionRunningStatus "stopped" | "starting" | "running" | "stopping"
---@alias CDP.ServiceWorker.ServiceWorkerVersionStatus "new" | "installing" | "installed" | "activating" | "activated" | "redundant"
---ServiceWorker version.
---@class CDP.ServiceWorker.ServiceWorkerVersion
---@field versionId string
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field scriptURL string
---@field runningStatus CDP.ServiceWorker.ServiceWorkerVersionRunningStatus
---@field status CDP.ServiceWorker.ServiceWorkerVersionStatus
---@field scriptLastModified? number The Last-Modified header value of the main script.
---@field scriptResponseTime? number The time at which the response headers of the main script were received from the server.<br>For cached script it is the last time the cache entry was validated.
---@field controlledClients? CDP.Target.TargetID[]
---@field targetId? CDP.Target.TargetID
---ServiceWorker error message.
---@class CDP.ServiceWorker.ServiceWorkerErrorMessage
---@field errorMessage string
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field versionId string
---@field sourceURL string
---@field lineNumber integer
---@field columnNumber integer
---@class CDP.ServiceWorker.deliverPushMessage_parameters
---@field origin string
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field data string
---@class CDP.ServiceWorker.dispatchSyncEvent_parameters
---@field origin string
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field tag string
---@field lastChance boolean
---@class CDP.ServiceWorker.dispatchPeriodicSyncEvent_parameters
---@field origin string
---@field registrationId CDP.ServiceWorker.RegistrationID
---@field tag string
---@class CDP.ServiceWorker.inspectWorker_parameters
---@field versionId string
---@class CDP.ServiceWorker.setForceUpdateOnPageLoad_parameters
---@field forceUpdateOnPageLoad boolean
---@class CDP.ServiceWorker.skipWaiting_parameters
---@field scopeURL string
---@class CDP.ServiceWorker.startWorker_parameters
---@field scopeURL string
---@class CDP.ServiceWorker.stopWorker_parameters
---@field versionId string
---@class CDP.ServiceWorker.unregister_parameters
---@field scopeURL string
---@class CDP.ServiceWorker.updateRegistration_parameters
---@field scopeURL string
---@class CDP.ServiceWorker.workerErrorReported_event
---@field errorMessage CDP.ServiceWorker.ServiceWorkerErrorMessage
---@class CDP.ServiceWorker.workerRegistrationUpdated_event
---@field registrations CDP.ServiceWorker.ServiceWorkerRegistration[]
---@class CDP.ServiceWorker.workerVersionUpdated_event
---@field versions CDP.ServiceWorker.ServiceWorkerVersion[]
---@class CDP.ServiceWorker: CDP._ClientContainer
---@field deliverPushMessage fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.deliverPushMessage_parameters): CDP.Error?
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---@field dispatchSyncEvent fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.dispatchSyncEvent_parameters): CDP.Error?
---@field dispatchPeriodicSyncEvent fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.dispatchPeriodicSyncEvent_parameters): CDP.Error?
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field inspectWorker fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.inspectWorker_parameters): CDP.Error?
---@field setForceUpdateOnPageLoad fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.setForceUpdateOnPageLoad_parameters): CDP.Error?
---@field skipWaiting fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.skipWaiting_parameters): CDP.Error?
---@field startWorker fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.startWorker_parameters): CDP.Error?
---@field stopAllWorkers fun(self: CDP._ClientContainer): CDP.Error?
---@field stopWorker fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.stopWorker_parameters): CDP.Error?
---@field unregister fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.unregister_parameters): CDP.Error?
---@field updateRegistration fun(self: CDP._ClientContainer, params: CDP.ServiceWorker.updateRegistration_parameters): CDP.Error?
---@field workerErrorReported fun(self: CDP._ClientContainer, cb: fun(event: CDP.ServiceWorker.workerErrorReported_event)): CDP.Error?
---@field workerRegistrationUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.ServiceWorker.workerRegistrationUpdated_event)): CDP.Error?
---@field workerVersionUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.ServiceWorker.workerVersionUpdated_event)): CDP.Error?

---@alias CDP.Storage.SerializedStorageKey string
---@alias CDP.Storage.StorageType "appcache" | "cookies" | "file_systems" | "indexeddb" | "local_storage" | "shader_cache" | "websql" | "service_workers" | "cache_storage" | "interest_groups" | "shared_storage" | "storage_buckets" | "all" | "other" Enum of possible storage types.
---Usage for a storage type.
---@class CDP.Storage.UsageForType
---@field storageType CDP.Storage.StorageType Name of storage type.
---@field usage number Storage usage (bytes).
---Pair of issuer origin and number of available (signed, but not used) Trust
---Tokens from that issuer.
---@class CDP.Storage.TrustTokens
---@field issuerOrigin string
---@field count number
---@alias CDP.Storage.InterestGroupAccessType "join" | "leave" | "update" | "loaded" | "bid" | "win" Enum of interest group access types.
---Ad advertising element inside an interest group.
---@class CDP.Storage.InterestGroupAd
---@field renderUrl string
---@field metadata? string
---The full details of an interest group.
---@class CDP.Storage.InterestGroupDetails
---@field ownerOrigin string
---@field name string
---@field expirationTime CDP.Network.TimeSinceEpoch
---@field joiningOrigin string
---@field biddingUrl? string
---@field biddingWasmHelperUrl? string
---@field updateUrl? string
---@field trustedBiddingSignalsUrl? string
---@field trustedBiddingSignalsKeys string[]
---@field userBiddingSignals? string
---@field ads CDP.Storage.InterestGroupAd[]
---@field adComponents CDP.Storage.InterestGroupAd[]
---@alias CDP.Storage.SharedStorageAccessType "documentAddModule" | "documentSelectURL" | "documentRun" | "documentSet" | "documentAppend" | "documentDelete" | "documentClear" | "workletSet" | "workletAppend" | "workletDelete" | "workletClear" | "workletGet" | "workletKeys" | "workletEntries" | "workletLength" | "workletRemainingBudget" Enum of shared storage access types.
---Struct for a single key-value pair in an origin's shared storage.
---@class CDP.Storage.SharedStorageEntry
---@field key string
---@field value string
---Details for an origin's shared storage.
---@class CDP.Storage.SharedStorageMetadata
---@field creationTime CDP.Network.TimeSinceEpoch
---@field length integer
---@field remainingBudget number
---Pair of reporting metadata details for a candidate URL for `selectURL()`.
---@class CDP.Storage.SharedStorageReportingMetadata
---@field eventType string
---@field reportingUrl string
---Bundles a candidate URL with its reporting metadata.
---@class CDP.Storage.SharedStorageUrlWithMetadata
---@field url string Spec of candidate URL.
---@field reportingMetadata CDP.Storage.SharedStorageReportingMetadata[] Any associated reporting metadata.
---Bundles the parameters for shared storage access events whose
---presence/absence can vary according to SharedStorageAccessType.
---@class CDP.Storage.SharedStorageAccessParams
---@field scriptSourceUrl? string Spec of the module script URL.<br>Present only for SharedStorageAccessType.documentAddModule.
---@field operationName? string Name of the registered operation to be run.<br>Present only for SharedStorageAccessType.documentRun and<br>SharedStorageAccessType.documentSelectURL.
---@field serializedData? string The operation's serialized data in bytes (converted to a string).<br>Present only for SharedStorageAccessType.documentRun and<br>SharedStorageAccessType.documentSelectURL.
---@field urlsWithMetadata? CDP.Storage.SharedStorageUrlWithMetadata[] Array of candidate URLs' specs, along with any associated metadata.<br>Present only for SharedStorageAccessType.documentSelectURL.
---@field key? string Key for a specific entry in an origin's shared storage.<br>Present only for SharedStorageAccessType.documentSet,<br>SharedStorageAccessType.documentAppend,<br>SharedStorageAccessType.documentDelete,<br>SharedStorageAccessType.workletSet,<br>SharedStorageAccessType.workletAppend,<br>SharedStorageAccessType.workletDelete, and<br>SharedStorageAccessType.workletGet.
---@field value? string Value for a specific entry in an origin's shared storage.<br>Present only for SharedStorageAccessType.documentSet,<br>SharedStorageAccessType.documentAppend,<br>SharedStorageAccessType.workletSet, and<br>SharedStorageAccessType.workletAppend.
---@field ignoreIfPresent? boolean Whether or not to set an entry for a key if that key is already present.<br>Present only for SharedStorageAccessType.documentSet and<br>SharedStorageAccessType.workletSet.
---@alias CDP.Storage.StorageBucketsDurability "relaxed" | "strict"
---@class CDP.Storage.StorageBucket
---@field storageKey CDP.Storage.SerializedStorageKey
---@field name? string If not specified, it is the default bucket of the storageKey.
---@class CDP.Storage.StorageBucketInfo
---@field bucket CDP.Storage.StorageBucket
---@field id string
---@field expiration CDP.Network.TimeSinceEpoch
---@field quota number Storage quota (bytes).
---@field persistent boolean
---@field durability CDP.Storage.StorageBucketsDurability
---@alias CDP.Storage.AttributionReportingSourceType "navigation" | "event"
---@alias CDP.Storage.UnsignedInt64AsBase10 string
---@alias CDP.Storage.UnsignedInt128AsBase16 string
---@alias CDP.Storage.SignedInt64AsBase10 string
---@class CDP.Storage.AttributionReportingFilterDataEntry
---@field key string
---@field values string[]
---@class CDP.Storage.AttributionReportingAggregationKeysEntry
---@field key string
---@field value CDP.Storage.UnsignedInt128AsBase16
---@class CDP.Storage.AttributionReportingSourceRegistration
---@field time CDP.Network.TimeSinceEpoch
---@field expiry? integer duration in seconds
---@field eventReportWindow? integer duration in seconds
---@field aggregatableReportWindow? integer duration in seconds
---@field type CDP.Storage.AttributionReportingSourceType
---@field sourceOrigin string
---@field reportingOrigin string
---@field destinationSites string[]
---@field eventId CDP.Storage.UnsignedInt64AsBase10
---@field priority CDP.Storage.SignedInt64AsBase10
---@field filterData CDP.Storage.AttributionReportingFilterDataEntry[]
---@field aggregationKeys CDP.Storage.AttributionReportingAggregationKeysEntry[]
---@field debugKey? CDP.Storage.UnsignedInt64AsBase10
---@alias CDP.Storage.AttributionReportingSourceRegistrationResult "success" | "internalError" | "insufficientSourceCapacity" | "insufficientUniqueDestinationCapacity" | "excessiveReportingOrigins" | "prohibitedByBrowserPolicy" | "successNoised" | "destinationReportingLimitReached" | "destinationGlobalLimitReached" | "destinationBothLimitsReached" | "reportingOriginsPerSiteLimitReached" | "exceedsMaxChannelCapacity"
---@class CDP.Storage.getStorageKeyForFrame_parameters
---@field frameId CDP.Page.FrameId
---@class CDP.Storage.getStorageKeyForFrame_return
---@field storageKey CDP.Storage.SerializedStorageKey
---@class CDP.Storage.clearDataForOrigin_parameters
---@field origin string Security origin.
---@field storageTypes string Comma separated list of StorageType to clear.
---@class CDP.Storage.clearDataForStorageKey_parameters
---@field storageKey string Storage key.
---@field storageTypes string Comma separated list of StorageType to clear.
---@class CDP.Storage.getCookies_parameters
---@field browserContextId? CDP.Browser.BrowserContextID Browser context to use when called on the browser endpoint.
---@class CDP.Storage.getCookies_return
---@field cookies CDP.Network.Cookie[] Array of cookie objects.
---@class CDP.Storage.setCookies_parameters
---@field cookies CDP.Network.CookieParam[] Cookies to be set.
---@field browserContextId? CDP.Browser.BrowserContextID Browser context to use when called on the browser endpoint.
---@class CDP.Storage.clearCookies_parameters
---@field browserContextId? CDP.Browser.BrowserContextID Browser context to use when called on the browser endpoint.
---@class CDP.Storage.getUsageAndQuota_parameters
---@field origin string Security origin.
---@class CDP.Storage.getUsageAndQuota_return
---@field usage number Storage usage (bytes).
---@field quota number Storage quota (bytes).
---@field overrideActive boolean Whether or not the origin has an active storage quota override
---@field usageBreakdown CDP.Storage.UsageForType[] Storage usage per type (bytes).
---@class CDP.Storage.overrideQuotaForOrigin_parameters
---@field origin string Security origin.
---@field quotaSize? number The quota size (in bytes) to override the original quota with.<br>If this is called multiple times, the overridden quota will be equal to<br>the quotaSize provided in the final call. If this is called without<br>specifying a quotaSize, the quota will be reset to the default value for<br>the specified origin. If this is called multiple times with different<br>origins, the override will be maintained for each origin until it is<br>disabled (called without a quotaSize).
---@class CDP.Storage.trackCacheStorageForOrigin_parameters
---@field origin string Security origin.
---@class CDP.Storage.trackCacheStorageForStorageKey_parameters
---@field storageKey string Storage key.
---@class CDP.Storage.trackIndexedDBForOrigin_parameters
---@field origin string Security origin.
---@class CDP.Storage.trackIndexedDBForStorageKey_parameters
---@field storageKey string Storage key.
---@class CDP.Storage.untrackCacheStorageForOrigin_parameters
---@field origin string Security origin.
---@class CDP.Storage.untrackCacheStorageForStorageKey_parameters
---@field storageKey string Storage key.
---@class CDP.Storage.untrackIndexedDBForOrigin_parameters
---@field origin string Security origin.
---@class CDP.Storage.untrackIndexedDBForStorageKey_parameters
---@field storageKey string Storage key.
---@class CDP.Storage.getTrustTokens_return
---@field tokens CDP.Storage.TrustTokens[]
---@class CDP.Storage.clearTrustTokens_parameters
---@field issuerOrigin string
---@class CDP.Storage.clearTrustTokens_return
---@field didDeleteTokens boolean True if any tokens were deleted, false otherwise.
---@class CDP.Storage.getInterestGroupDetails_parameters
---@field ownerOrigin string
---@field name string
---@class CDP.Storage.getInterestGroupDetails_return
---@field details CDP.Storage.InterestGroupDetails
---@class CDP.Storage.setInterestGroupTracking_parameters
---@field enable boolean
---@class CDP.Storage.getSharedStorageMetadata_parameters
---@field ownerOrigin string
---@class CDP.Storage.getSharedStorageMetadata_return
---@field metadata CDP.Storage.SharedStorageMetadata
---@class CDP.Storage.getSharedStorageEntries_parameters
---@field ownerOrigin string
---@class CDP.Storage.getSharedStorageEntries_return
---@field entries CDP.Storage.SharedStorageEntry[]
---@class CDP.Storage.setSharedStorageEntry_parameters
---@field ownerOrigin string
---@field key string
---@field value string
---@field ignoreIfPresent? boolean If `ignoreIfPresent` is included and true, then only sets the entry if<br>`key` doesn't already exist.
---@class CDP.Storage.deleteSharedStorageEntry_parameters
---@field ownerOrigin string
---@field key string
---@class CDP.Storage.clearSharedStorageEntries_parameters
---@field ownerOrigin string
---@class CDP.Storage.resetSharedStorageBudget_parameters
---@field ownerOrigin string
---@class CDP.Storage.setSharedStorageTracking_parameters
---@field enable boolean
---@class CDP.Storage.setStorageBucketTracking_parameters
---@field storageKey string
---@field enable boolean
---@class CDP.Storage.deleteStorageBucket_parameters
---@field bucket CDP.Storage.StorageBucket
---@class CDP.Storage.runBounceTrackingMitigations_return
---@field deletedSites string[]
---@class CDP.Storage.setAttributionReportingLocalTestingMode_parameters
---@field enabled boolean If enabled, noise is suppressed and reports are sent immediately.
---@class CDP.Storage.setAttributionReportingTracking_parameters
---@field enable boolean
---@class CDP.Storage.cacheStorageContentUpdated_event
---@field origin string Origin to update.
---@field storageKey string Storage key to update.
---@field bucketId string Storage bucket to update.
---@field cacheName string Name of cache in origin.
---@class CDP.Storage.cacheStorageListUpdated_event
---@field origin string Origin to update.
---@field storageKey string Storage key to update.
---@field bucketId string Storage bucket to update.
---@class CDP.Storage.indexedDBContentUpdated_event
---@field origin string Origin to update.
---@field storageKey string Storage key to update.
---@field bucketId string Storage bucket to update.
---@field databaseName string Database to update.
---@field objectStoreName string ObjectStore to update.
---@class CDP.Storage.indexedDBListUpdated_event
---@field origin string Origin to update.
---@field storageKey string Storage key to update.
---@field bucketId string Storage bucket to update.
---@class CDP.Storage.interestGroupAccessed_event
---@field accessTime CDP.Network.TimeSinceEpoch
---@field type CDP.Storage.InterestGroupAccessType
---@field ownerOrigin string
---@field name string
---@class CDP.Storage.sharedStorageAccessed_event
---@field accessTime CDP.Network.TimeSinceEpoch Time of the access.
---@field type CDP.Storage.SharedStorageAccessType Enum value indicating the Shared Storage API method invoked.
---@field mainFrameId CDP.Page.FrameId DevTools Frame Token for the primary frame tree's root.
---@field ownerOrigin string Serialized origin for the context that invoked the Shared Storage API.
---@field params CDP.Storage.SharedStorageAccessParams The sub-parameters warapped by `params` are all optional and their<br>presence/absence depends on `type`.
---@class CDP.Storage.storageBucketCreatedOrUpdated_event
---@field bucketInfo CDP.Storage.StorageBucketInfo
---@class CDP.Storage.storageBucketDeleted_event
---@field bucketId string
---@class CDP.Storage.attributionReportingSourceRegistered_event
---@field registration CDP.Storage.AttributionReportingSourceRegistration
---@field result CDP.Storage.AttributionReportingSourceRegistrationResult
---@class CDP.Storage: CDP._ClientContainer
---Returns a storage key given a frame id.
---@field getStorageKeyForFrame fun(self: CDP._ClientContainer, params: CDP.Storage.getStorageKeyForFrame_parameters): CDP.Error?, CDP.Storage.getStorageKeyForFrame_return?
---Clears storage for origin.
---@field clearDataForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.clearDataForOrigin_parameters): CDP.Error?
---Clears storage for storage key.
---@field clearDataForStorageKey fun(self: CDP._ClientContainer, params: CDP.Storage.clearDataForStorageKey_parameters): CDP.Error?
---Returns all browser cookies.
---@field getCookies fun(self: CDP._ClientContainer, params: CDP.Storage.getCookies_parameters): CDP.Error?, CDP.Storage.getCookies_return?
---Sets given cookies.
---@field setCookies fun(self: CDP._ClientContainer, params: CDP.Storage.setCookies_parameters): CDP.Error?
---Clears cookies.
---@field clearCookies fun(self: CDP._ClientContainer, params: CDP.Storage.clearCookies_parameters): CDP.Error?
---Returns usage and quota in bytes.
---@field getUsageAndQuota fun(self: CDP._ClientContainer, params: CDP.Storage.getUsageAndQuota_parameters): CDP.Error?, CDP.Storage.getUsageAndQuota_return?
---Override quota for the specified origin
---@field overrideQuotaForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.overrideQuotaForOrigin_parameters): CDP.Error?
---Registers origin to be notified when an update occurs to its cache storage list.
---@field trackCacheStorageForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.trackCacheStorageForOrigin_parameters): CDP.Error?
---Registers storage key to be notified when an update occurs to its cache storage list.
---@field trackCacheStorageForStorageKey fun(self: CDP._ClientContainer, params: CDP.Storage.trackCacheStorageForStorageKey_parameters): CDP.Error?
---Registers origin to be notified when an update occurs to its IndexedDB.
---@field trackIndexedDBForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.trackIndexedDBForOrigin_parameters): CDP.Error?
---Registers storage key to be notified when an update occurs to its IndexedDB.
---@field trackIndexedDBForStorageKey fun(self: CDP._ClientContainer, params: CDP.Storage.trackIndexedDBForStorageKey_parameters): CDP.Error?
---Unregisters origin from receiving notifications for cache storage.
---@field untrackCacheStorageForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.untrackCacheStorageForOrigin_parameters): CDP.Error?
---Unregisters storage key from receiving notifications for cache storage.
---@field untrackCacheStorageForStorageKey fun(self: CDP._ClientContainer, params: CDP.Storage.untrackCacheStorageForStorageKey_parameters): CDP.Error?
---Unregisters origin from receiving notifications for IndexedDB.
---@field untrackIndexedDBForOrigin fun(self: CDP._ClientContainer, params: CDP.Storage.untrackIndexedDBForOrigin_parameters): CDP.Error?
---Unregisters storage key from receiving notifications for IndexedDB.
---@field untrackIndexedDBForStorageKey fun(self: CDP._ClientContainer, params: CDP.Storage.untrackIndexedDBForStorageKey_parameters): CDP.Error?
---Returns the number of stored Trust Tokens per issuer for the
---current browsing context.
---@field getTrustTokens fun(self: CDP._ClientContainer): CDP.Error?, CDP.Storage.getTrustTokens_return?
---Removes all Trust Tokens issued by the provided issuerOrigin.
---Leaves other stored data, including the issuer's Redemption Records, intact.
---@field clearTrustTokens fun(self: CDP._ClientContainer, params: CDP.Storage.clearTrustTokens_parameters): CDP.Error?, CDP.Storage.clearTrustTokens_return?
---Gets details for a named interest group.
---@field getInterestGroupDetails fun(self: CDP._ClientContainer, params: CDP.Storage.getInterestGroupDetails_parameters): CDP.Error?, CDP.Storage.getInterestGroupDetails_return?
---Enables/Disables issuing of interestGroupAccessed events.
---@field setInterestGroupTracking fun(self: CDP._ClientContainer, params: CDP.Storage.setInterestGroupTracking_parameters): CDP.Error?
---Gets metadata for an origin's shared storage.
---@field getSharedStorageMetadata fun(self: CDP._ClientContainer, params: CDP.Storage.getSharedStorageMetadata_parameters): CDP.Error?, CDP.Storage.getSharedStorageMetadata_return?
---Gets the entries in an given origin's shared storage.
---@field getSharedStorageEntries fun(self: CDP._ClientContainer, params: CDP.Storage.getSharedStorageEntries_parameters): CDP.Error?, CDP.Storage.getSharedStorageEntries_return?
---Sets entry with `key` and `value` for a given origin's shared storage.
---@field setSharedStorageEntry fun(self: CDP._ClientContainer, params: CDP.Storage.setSharedStorageEntry_parameters): CDP.Error?
---Deletes entry for `key` (if it exists) for a given origin's shared storage.
---@field deleteSharedStorageEntry fun(self: CDP._ClientContainer, params: CDP.Storage.deleteSharedStorageEntry_parameters): CDP.Error?
---Clears all entries for a given origin's shared storage.
---@field clearSharedStorageEntries fun(self: CDP._ClientContainer, params: CDP.Storage.clearSharedStorageEntries_parameters): CDP.Error?
---Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
---@field resetSharedStorageBudget fun(self: CDP._ClientContainer, params: CDP.Storage.resetSharedStorageBudget_parameters): CDP.Error?
---Enables/disables issuing of sharedStorageAccessed events.
---@field setSharedStorageTracking fun(self: CDP._ClientContainer, params: CDP.Storage.setSharedStorageTracking_parameters): CDP.Error?
---Set tracking for a storage key's buckets.
---@field setStorageBucketTracking fun(self: CDP._ClientContainer, params: CDP.Storage.setStorageBucketTracking_parameters): CDP.Error?
---Deletes the Storage Bucket with the given storage key and bucket name.
---@field deleteStorageBucket fun(self: CDP._ClientContainer, params: CDP.Storage.deleteStorageBucket_parameters): CDP.Error?
---Deletes state for sites identified as potential bounce trackers, immediately.
---@field runBounceTrackingMitigations fun(self: CDP._ClientContainer): CDP.Error?, CDP.Storage.runBounceTrackingMitigations_return?
---https://wicg.github.io/attribution-reporting-api/
---@field setAttributionReportingLocalTestingMode fun(self: CDP._ClientContainer, params: CDP.Storage.setAttributionReportingLocalTestingMode_parameters): CDP.Error?
---Enables/disables issuing of Attribution Reporting events.
---@field setAttributionReportingTracking fun(self: CDP._ClientContainer, params: CDP.Storage.setAttributionReportingTracking_parameters): CDP.Error?
---A cache's contents have been modified.
---@field cacheStorageContentUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.cacheStorageContentUpdated_event)): CDP.Error?
---A cache has been added/deleted.
---@field cacheStorageListUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.cacheStorageListUpdated_event)): CDP.Error?
---The origin's IndexedDB object store has been modified.
---@field indexedDBContentUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.indexedDBContentUpdated_event)): CDP.Error?
---The origin's IndexedDB database list has been modified.
---@field indexedDBListUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.indexedDBListUpdated_event)): CDP.Error?
---One of the interest groups was accessed by the associated page.
---@field interestGroupAccessed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.interestGroupAccessed_event)): CDP.Error?
---Shared storage was accessed by the associated page.
---The following parameters are included in all events.
---@field sharedStorageAccessed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.sharedStorageAccessed_event)): CDP.Error?
---@field storageBucketCreatedOrUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.storageBucketCreatedOrUpdated_event)): CDP.Error?
---@field storageBucketDeleted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.storageBucketDeleted_event)): CDP.Error?
---TODO(crbug.com/1458532): Add other Attribution Reporting events, e.g.
---trigger registration.
---@field attributionReportingSourceRegistered fun(self: CDP._ClientContainer, cb: fun(event: CDP.Storage.attributionReportingSourceRegistered_event)): CDP.Error?

---Describes a single graphics processor (GPU).
---@class CDP.SystemInfo.GPUDevice
---@field vendorId number PCI ID of the GPU vendor, if available; 0 otherwise.
---@field deviceId number PCI ID of the GPU device, if available; 0 otherwise.
---@field subSysId? number Sub sys ID of the GPU, only available on Windows.
---@field revision? number Revision of the GPU, only available on Windows.
---@field vendorString string String description of the GPU vendor, if the PCI ID is not available.
---@field deviceString string String description of the GPU device, if the PCI ID is not available.
---@field driverVendor string String description of the GPU driver vendor.
---@field driverVersion string String description of the GPU driver version.
---Describes the width and height dimensions of an entity.
---@class CDP.SystemInfo.Size
---@field width integer Width in pixels.
---@field height integer Height in pixels.
---Describes a supported video decoding profile with its associated minimum and
---maximum resolutions.
---@class CDP.SystemInfo.VideoDecodeAcceleratorCapability
---@field profile string Video codec profile that is supported, e.g. VP9 Profile 2.
---@field maxResolution CDP.SystemInfo.Size Maximum video dimensions in pixels supported for this |profile|.
---@field minResolution CDP.SystemInfo.Size Minimum video dimensions in pixels supported for this |profile|.
---Describes a supported video encoding profile with its associated maximum
---resolution and maximum framerate.
---@class CDP.SystemInfo.VideoEncodeAcceleratorCapability
---@field profile string Video codec profile that is supported, e.g H264 Main.
---@field maxResolution CDP.SystemInfo.Size Maximum video dimensions in pixels supported for this |profile|.
---@field maxFramerateNumerator integer Maximum encoding framerate in frames per second supported for this<br>|profile|, as fraction's numerator and denominator, e.g. 24/1 fps,<br>24000/1001 fps, etc.
---@field maxFramerateDenominator integer
---@alias CDP.SystemInfo.SubsamplingFormat "yuv420" | "yuv422" | "yuv444" YUV subsampling type of the pixels of a given image.
---@alias CDP.SystemInfo.ImageType "jpeg" | "webp" | "unknown" Image format of a given image.
---Describes a supported image decoding profile with its associated minimum and
---maximum resolutions and subsampling.
---@class CDP.SystemInfo.ImageDecodeAcceleratorCapability
---@field imageType CDP.SystemInfo.ImageType Image coded, e.g. Jpeg.
---@field maxDimensions CDP.SystemInfo.Size Maximum supported dimensions of the image in pixels.
---@field minDimensions CDP.SystemInfo.Size Minimum supported dimensions of the image in pixels.
---@field subsamplings CDP.SystemInfo.SubsamplingFormat[] Optional array of supported subsampling formats, e.g. 4:2:0, if known.
---Provides information about the GPU(s) on the system.
---@class CDP.SystemInfo.GPUInfo
---@field devices CDP.SystemInfo.GPUDevice[] The graphics devices on the system. Element 0 is the primary GPU.
---@field auxAttributes? table An optional dictionary of additional GPU related attributes.
---@field featureStatus? table An optional dictionary of graphics features and their status.
---@field driverBugWorkarounds string[] An optional array of GPU driver bug workarounds.
---@field videoDecoding CDP.SystemInfo.VideoDecodeAcceleratorCapability[] Supported accelerated video decoding capabilities.
---@field videoEncoding CDP.SystemInfo.VideoEncodeAcceleratorCapability[] Supported accelerated video encoding capabilities.
---@field imageDecoding CDP.SystemInfo.ImageDecodeAcceleratorCapability[] Supported accelerated image decoding capabilities.
---Represents process info.
---@class CDP.SystemInfo.ProcessInfo
---@field type string Specifies process type.
---@field id integer Specifies process id.
---@field cpuTime number Specifies cumulative CPU usage in seconds across all threads of the<br>process since the process start.
---@class CDP.SystemInfo.getInfo_return
---@field gpu CDP.SystemInfo.GPUInfo Information about the GPUs on the system.
---@field modelName string A platform-dependent description of the model of the machine. On Mac OS, this is, for<br>example, 'MacBookPro'. Will be the empty string if not supported.
---@field modelVersion string A platform-dependent description of the version of the machine. On Mac OS, this is, for<br>example, '10.1'. Will be the empty string if not supported.
---@field commandLine string The command line string used to launch the browser. Will be the empty string if not<br>supported.
---@class CDP.SystemInfo.getFeatureState_parameters
---@field featureState string
---@class CDP.SystemInfo.getFeatureState_return
---@field featureEnabled boolean
---@class CDP.SystemInfo.getProcessInfo_return
---@field processInfo CDP.SystemInfo.ProcessInfo[] An array of process info blocks.
---The SystemInfo domain defines methods and events for querying low-level system information.
---@class CDP.SystemInfo: CDP._ClientContainer
---Returns information about the system.
---@field getInfo fun(self: CDP._ClientContainer): CDP.Error?, CDP.SystemInfo.getInfo_return?
---Returns information about the feature state.
---@field getFeatureState fun(self: CDP._ClientContainer, params: CDP.SystemInfo.getFeatureState_parameters): CDP.Error?, CDP.SystemInfo.getFeatureState_return?
---Returns information about all running processes.
---@field getProcessInfo fun(self: CDP._ClientContainer): CDP.Error?, CDP.SystemInfo.getProcessInfo_return?

---@alias CDP.Target.TargetID string
---@alias CDP.Target.SessionID string Unique identifier of attached debugging session.
---@class CDP.Target.TargetInfo
---@field targetId CDP.Target.TargetID
---@field type string
---@field title string
---@field url string
---@field attached boolean Whether the target has an attached client.
---@field openerId? CDP.Target.TargetID Opener target Id
---@field canAccessOpener boolean Whether the target has access to the originating window.
---@field openerFrameId? CDP.Page.FrameId Frame id of originating window (is only set if target has an opener).
---@field browserContextId? CDP.Browser.BrowserContextID
---@field subtype? string Provides additional details for specific target types. For example, for<br>the type of "page", this may be set to "portal" or "prerender".
---A filter used by target query/discovery/auto-attach operations.
---@class CDP.Target.FilterEntry
---@field exclude? boolean If set, causes exclusion of mathcing targets from the list.
---@field type? string If not present, matches any type.
---@alias CDP.Target.TargetFilter CDP.Target.FilterEntry[] The entries in TargetFilter are matched sequentially against targets and<br>the first entry that matches determines if the target is included or not,<br>depending on the value of `exclude` field in the entry.<br>If filter is not specified, the one assumed is<br>[{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}]<br>(i.e. include everything but `browser` and `tab`).
---@class CDP.Target.RemoteLocation
---@field host string
---@field port integer
---@class CDP.Target.activateTarget_parameters
---@field targetId CDP.Target.TargetID
---@class CDP.Target.attachToTarget_parameters
---@field targetId CDP.Target.TargetID
---@field flatten? boolean Enables "flat" access to the session via specifying sessionId attribute in the commands.<br>We plan to make this the default, deprecate non-flattened mode,<br>and eventually retire it. See crbug.com/991325.
---@class CDP.Target.attachToTarget_return
---@field sessionId CDP.Target.SessionID Id assigned to the session.
---@class CDP.Target.attachToBrowserTarget_return
---@field sessionId CDP.Target.SessionID Id assigned to the session.
---@class CDP.Target.closeTarget_parameters
---@field targetId CDP.Target.TargetID
---@class CDP.Target.closeTarget_return
---@field success boolean Always set to true. If an error occurs, the response indicates protocol error.
---@class CDP.Target.exposeDevToolsProtocol_parameters
---@field targetId CDP.Target.TargetID
---@field bindingName? string Binding name, 'cdp' if not specified.
---@class CDP.Target.createBrowserContext_parameters
---@field disposeOnDetach? boolean If specified, disposes this context when debugging session disconnects.
---@field proxyServer? string Proxy server, similar to the one passed to --proxy-server
---@field proxyBypassList? string Proxy bypass list, similar to the one passed to --proxy-bypass-list
---@field originsWithUniversalNetworkAccess? string[] An optional list of origins to grant unlimited cross-origin access to.<br>Parts of the URL other than those constituting origin are ignored.
---@class CDP.Target.createBrowserContext_return
---@field browserContextId CDP.Browser.BrowserContextID The id of the context created.
---@class CDP.Target.getBrowserContexts_return
---@field browserContextIds CDP.Browser.BrowserContextID[] An array of browser context ids.
---@class CDP.Target.createTarget_parameters
---@field url string The initial URL the page will be navigated to. An empty string indicates about:blank.
---@field width? integer Frame width in DIP (headless chrome only).
---@field height? integer Frame height in DIP (headless chrome only).
---@field browserContextId? CDP.Browser.BrowserContextID The browser context to create the page in.
---@field enableBeginFrameControl? boolean Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,<br>not supported on MacOS yet, false by default).
---@field newWindow? boolean Whether to create a new Window or Tab (chrome-only, false by default).
---@field background? boolean Whether to create the target in background or foreground (chrome-only,<br>false by default).
---@field forTab? boolean Whether to create the target of type "tab".
---@class CDP.Target.createTarget_return
---@field targetId CDP.Target.TargetID The id of the page opened.
---@class CDP.Target.detachFromTarget_parameters
---@field sessionId? CDP.Target.SessionID Session to detach.
---@field targetId? CDP.Target.TargetID Deprecated.
---@class CDP.Target.disposeBrowserContext_parameters
---@field browserContextId CDP.Browser.BrowserContextID
---@class CDP.Target.getTargetInfo_parameters
---@field targetId? CDP.Target.TargetID
---@class CDP.Target.getTargetInfo_return
---@field targetInfo CDP.Target.TargetInfo
---@class CDP.Target.getTargets_parameters
---@field filter? CDP.Target.TargetFilter Only targets matching filter will be reported. If filter is not specified<br>and target discovery is currently enabled, a filter used for target discovery<br>is used for consistency.
---@class CDP.Target.getTargets_return
---@field targetInfos CDP.Target.TargetInfo[] The list of targets.
---@class CDP.Target.sendMessageToTarget_parameters
---@field message string
---@field sessionId? CDP.Target.SessionID Identifier of the session.
---@field targetId? CDP.Target.TargetID Deprecated.
---@class CDP.Target.setAutoAttach_parameters
---@field autoAttach boolean Whether to auto-attach to related targets.
---@field waitForDebuggerOnStart boolean Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`<br>to run paused targets.
---@field flatten? boolean Enables "flat" access to the session via specifying sessionId attribute in the commands.<br>We plan to make this the default, deprecate non-flattened mode,<br>and eventually retire it. See crbug.com/991325.
---@field filter? CDP.Target.TargetFilter Only targets matching filter will be attached.
---@class CDP.Target.autoAttachRelated_parameters
---@field targetId CDP.Target.TargetID
---@field waitForDebuggerOnStart boolean Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`<br>to run paused targets.
---@field filter? CDP.Target.TargetFilter Only targets matching filter will be attached.
---@class CDP.Target.setDiscoverTargets_parameters
---@field discover boolean Whether to discover available targets.
---@field filter? CDP.Target.TargetFilter Only targets matching filter will be attached. If `discover` is false,<br>`filter` must be omitted or empty.
---@class CDP.Target.setRemoteLocations_parameters
---@field locations CDP.Target.RemoteLocation[] List of remote locations.
---@class CDP.Target.attachedToTarget_event
---@field sessionId CDP.Target.SessionID Identifier assigned to the session used to send/receive messages.
---@field targetInfo CDP.Target.TargetInfo
---@field waitingForDebugger boolean
---@class CDP.Target.detachedFromTarget_event
---@field sessionId CDP.Target.SessionID Detached session identifier.
---@field targetId? CDP.Target.TargetID Deprecated.
---@class CDP.Target.receivedMessageFromTarget_event
---@field sessionId CDP.Target.SessionID Identifier of a session which sends a message.
---@field message string
---@field targetId? CDP.Target.TargetID Deprecated.
---@class CDP.Target.targetCreated_event
---@field targetInfo CDP.Target.TargetInfo
---@class CDP.Target.targetDestroyed_event
---@field targetId CDP.Target.TargetID
---@class CDP.Target.targetCrashed_event
---@field targetId CDP.Target.TargetID
---@field status string Termination status type.
---@field errorCode integer Termination error code.
---@class CDP.Target.targetInfoChanged_event
---@field targetInfo CDP.Target.TargetInfo
---Supports additional targets discovery and allows to attach to them.
---@class CDP.Target: CDP._ClientContainer
---Activates (focuses) the target.
---@field activateTarget fun(self: CDP._ClientContainer, params: CDP.Target.activateTarget_parameters): CDP.Error?
---Attaches to the target with given id.
---@field attachToTarget fun(self: CDP._ClientContainer, params: CDP.Target.attachToTarget_parameters): CDP.Error?, CDP.Target.attachToTarget_return?
---Attaches to the browser target, only uses flat sessionId mode.
---@field attachToBrowserTarget fun(self: CDP._ClientContainer): CDP.Error?, CDP.Target.attachToBrowserTarget_return?
---Closes the target. If the target is a page that gets closed too.
---@field closeTarget fun(self: CDP._ClientContainer, params: CDP.Target.closeTarget_parameters): CDP.Error?, CDP.Target.closeTarget_return?
---Inject object to the target's main frame that provides a communication
---channel with browser target.
---
---Injected object will be available as `window[bindingName]`.
---
---The object has the follwing API:
---- `binding.send(json)` - a method to send messages over the remote debugging protocol
---- `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
---@field exposeDevToolsProtocol fun(self: CDP._ClientContainer, params: CDP.Target.exposeDevToolsProtocol_parameters): CDP.Error?
---Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
---one.
---@field createBrowserContext fun(self: CDP._ClientContainer, params: CDP.Target.createBrowserContext_parameters): CDP.Error?, CDP.Target.createBrowserContext_return?
---Returns all browser contexts created with `Target.createBrowserContext` method.
---@field getBrowserContexts fun(self: CDP._ClientContainer): CDP.Error?, CDP.Target.getBrowserContexts_return?
---Creates a new page.
---@field createTarget fun(self: CDP._ClientContainer, params: CDP.Target.createTarget_parameters): CDP.Error?, CDP.Target.createTarget_return?
---Detaches session with given id.
---@field detachFromTarget fun(self: CDP._ClientContainer, params: CDP.Target.detachFromTarget_parameters): CDP.Error?
---Deletes a BrowserContext. All the belonging pages will be closed without calling their
---beforeunload hooks.
---@field disposeBrowserContext fun(self: CDP._ClientContainer, params: CDP.Target.disposeBrowserContext_parameters): CDP.Error?
---Returns information about a target.
---@field getTargetInfo fun(self: CDP._ClientContainer, params: CDP.Target.getTargetInfo_parameters): CDP.Error?, CDP.Target.getTargetInfo_return?
---Retrieves a list of available targets.
---@field getTargets fun(self: CDP._ClientContainer, params: CDP.Target.getTargets_parameters): CDP.Error?, CDP.Target.getTargets_return?
---Sends protocol message over session with given id.
---Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
---and crbug.com/991325.
---@field sendMessageToTarget fun(self: CDP._ClientContainer, params: CDP.Target.sendMessageToTarget_parameters): CDP.Error?
---Controls whether to automatically attach to new targets which are considered to be related to
---this one. When turned on, attaches to all existing related targets as well. When turned off,
---automatically detaches from all currently attached targets.
---This also clears all targets added by `autoAttachRelated` from the list of targets to watch
---for creation of related targets.
---@field setAutoAttach fun(self: CDP._ClientContainer, params: CDP.Target.setAutoAttach_parameters): CDP.Error?
---Adds the specified target to the list of targets that will be monitored for any related target
---creation (such as child frames, child workers and new versions of service worker) and reported
---through `attachedToTarget`. The specified target is also auto-attached.
---This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
---`setAutoAttach`. Only available at the Browser target.
---@field autoAttachRelated fun(self: CDP._ClientContainer, params: CDP.Target.autoAttachRelated_parameters): CDP.Error?
---Controls whether to discover available targets and notify via
---`targetCreated/targetInfoChanged/targetDestroyed` events.
---@field setDiscoverTargets fun(self: CDP._ClientContainer, params: CDP.Target.setDiscoverTargets_parameters): CDP.Error?
---Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
---`true`.
---@field setRemoteLocations fun(self: CDP._ClientContainer, params: CDP.Target.setRemoteLocations_parameters): CDP.Error?
---Issued when attached to target because of auto-attach or `attachToTarget` command.
---@field attachedToTarget fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.attachedToTarget_event)): CDP.Error?
---Issued when detached from target for any reason (including `detachFromTarget` command). Can be
---issued multiple times per target if multiple sessions have been attached to it.
---@field detachedFromTarget fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.detachedFromTarget_event)): CDP.Error?
---Notifies about a new protocol message received from the session (as reported in
---`attachedToTarget` event).
---@field receivedMessageFromTarget fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.receivedMessageFromTarget_event)): CDP.Error?
---Issued when a possible inspection target is created.
---@field targetCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.targetCreated_event)): CDP.Error?
---Issued when a target is destroyed.
---@field targetDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.targetDestroyed_event)): CDP.Error?
---Issued when a target has crashed.
---@field targetCrashed fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.targetCrashed_event)): CDP.Error?
---Issued when some information about a target has changed. This only happens between
---`targetCreated` and `targetDestroyed`.
---@field targetInfoChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Target.targetInfoChanged_event)): CDP.Error?

---@class CDP.Tethering.bind_parameters
---@field port integer Port number to bind.
---@class CDP.Tethering.unbind_parameters
---@field port integer Port number to unbind.
---@class CDP.Tethering.accepted_event
---@field port integer Port number that was successfully bound.
---@field connectionId string Connection id to be used.
---The Tethering domain defines methods and events for browser port binding.
---@class CDP.Tethering: CDP._ClientContainer
---Request browser port binding.
---@field bind fun(self: CDP._ClientContainer, params: CDP.Tethering.bind_parameters): CDP.Error?
---Request browser port unbinding.
---@field unbind fun(self: CDP._ClientContainer, params: CDP.Tethering.unbind_parameters): CDP.Error?
---Informs that port was successfully bound and got a specified connection id.
---@field accepted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Tethering.accepted_event)): CDP.Error?

---@alias CDP.Tracing.MemoryDumpConfig table Configuration for memory dump. Used only when "memory-infra" category is enabled.
---@class CDP.Tracing.TraceConfig
---@field recordMode? "recordUntilFull" | "recordContinuously" | "recordAsMuchAsPossible" | "echoToConsole" Controls how the trace buffer stores data.
---@field traceBufferSizeInKb? number Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value<br>of 200 MB would be used.
---@field enableSampling? boolean Turns on JavaScript stack sampling.
---@field enableSystrace? boolean Turns on system tracing.
---@field enableArgumentFilter? boolean Turns on argument filter.
---@field includedCategories? string[] Included category filters.
---@field excludedCategories? string[] Excluded category filters.
---@field syntheticDelays? string[] Configuration to synthesize the delays in tracing.
---@field memoryDumpConfig? CDP.Tracing.MemoryDumpConfig Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
---@alias CDP.Tracing.StreamFormat "json" | "proto" Data format of a trace. Can be either the legacy JSON format or the<br>protocol buffer format. Note that the JSON format will be deprecated soon.
---@alias CDP.Tracing.StreamCompression "none" | "gzip" Compression type to use for traces returned via streams.
---@alias CDP.Tracing.MemoryDumpLevelOfDetail "background" | "light" | "detailed" Details exposed when memory request explicitly declared.<br>Keep consistent with memory_dump_request_args.h and<br>memory_instrumentation.mojom
---@alias CDP.Tracing.TracingBackend "auto" | "chrome" | "system" Backend type to use for tracing. `chrome` uses the Chrome-integrated<br>tracing service and is supported on all platforms. `system` is only<br>supported on Chrome OS and uses the Perfetto system tracing service.<br>`auto` chooses `system` when the perfettoConfig provided to Tracing.start<br>specifies at least one non-Chrome data source; otherwise uses `chrome`.
---@class CDP.Tracing.getCategories_return
---@field categories string[] A list of supported tracing categories.
---@class CDP.Tracing.recordClockSyncMarker_parameters
---@field syncId string The ID of this clock sync marker
---@class CDP.Tracing.requestMemoryDump_parameters
---@field deterministic? boolean Enables more deterministic results by forcing garbage collection
---@field levelOfDetail? CDP.Tracing.MemoryDumpLevelOfDetail Specifies level of details in memory dump. Defaults to "detailed".
---@class CDP.Tracing.requestMemoryDump_return
---@field dumpGuid string GUID of the resulting global memory dump.
---@field success boolean True iff the global memory dump succeeded.
---@class CDP.Tracing.start_parameters
---@field categories? string Category/tag filter
---@field options? string Tracing options
---@field bufferUsageReportingInterval? number If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
---@field transferMode? "ReportEvents" | "ReturnAsStream" Whether to report trace events as series of dataCollected events or to save trace to a<br>stream (defaults to `ReportEvents`).
---@field streamFormat? CDP.Tracing.StreamFormat Trace data format to use. This only applies when using `ReturnAsStream`<br>transfer mode (defaults to `json`).
---@field streamCompression? CDP.Tracing.StreamCompression Compression format to use. This only applies when using `ReturnAsStream`<br>transfer mode (defaults to `none`)
---@field traceConfig? CDP.Tracing.TraceConfig
---@field perfettoConfig? string Base64-encoded serialized perfetto.protos.TraceConfig protobuf message<br>When specified, the parameters `categories`, `options`, `traceConfig`<br>are ignored. (Encoded as a base64 string when passed over JSON)
---@field tracingBackend? CDP.Tracing.TracingBackend Backend type (defaults to `auto`)
---@class CDP.Tracing.bufferUsage_event
---@field percentFull? number A number in range [0..1] that indicates the used size of event buffer as a fraction of its<br>total size.
---@field eventCount? number An approximate number of events in the trace log.
---@field value? number A number in range [0..1] that indicates the used size of event buffer as a fraction of its<br>total size.
---@class CDP.Tracing.dataCollected_event
---@field value table[]
---@class CDP.Tracing.tracingComplete_event
---@field dataLossOccurred boolean Indicates whether some trace data is known to have been lost, e.g. because the trace ring<br>buffer wrapped around.
---@field stream? CDP.IO.StreamHandle A handle of the stream that holds resulting trace data.
---@field traceFormat? CDP.Tracing.StreamFormat Trace data format of returned stream.
---@field streamCompression? CDP.Tracing.StreamCompression Compression format of returned stream.
---@class CDP.Tracing: CDP._ClientContainer
---Stop trace events collection.
---@field end fun(self: CDP._ClientContainer): CDP.Error?
---Gets supported tracing categories.
---@field getCategories fun(self: CDP._ClientContainer): CDP.Error?, CDP.Tracing.getCategories_return?
---Record a clock sync marker in the trace.
---@field recordClockSyncMarker fun(self: CDP._ClientContainer, params: CDP.Tracing.recordClockSyncMarker_parameters): CDP.Error?
---Request a global memory dump.
---@field requestMemoryDump fun(self: CDP._ClientContainer, params: CDP.Tracing.requestMemoryDump_parameters): CDP.Error?, CDP.Tracing.requestMemoryDump_return?
---Start trace events collection.
---@field start fun(self: CDP._ClientContainer, params: CDP.Tracing.start_parameters): CDP.Error?
---@field bufferUsage fun(self: CDP._ClientContainer, cb: fun(event: CDP.Tracing.bufferUsage_event)): CDP.Error?
---Contains a bucket of collected trace events. When tracing is stopped collected events will be
---sent as a sequence of dataCollected events followed by tracingComplete event.
---@field dataCollected fun(self: CDP._ClientContainer, cb: fun(event: CDP.Tracing.dataCollected_event)): CDP.Error?
---Signals that tracing is stopped and there is no trace buffers pending flush, all data were
---delivered via dataCollected events.
---@field tracingComplete fun(self: CDP._ClientContainer, cb: fun(event: CDP.Tracing.tracingComplete_event)): CDP.Error?

---@alias CDP.Fetch.RequestId string Unique request identifier.
---@alias CDP.Fetch.RequestStage "Request" | "Response" Stages of the request to handle. Request will intercept before the request is<br>sent. Response will intercept after the response is received (but before response<br>body is received).
---@class CDP.Fetch.RequestPattern
---@field urlPattern? string Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is<br>backslash. Omitting is equivalent to `"*"`.
---@field resourceType? CDP.Network.ResourceType If set, only requests for matching resource types will be intercepted.
---@field requestStage? CDP.Fetch.RequestStage Stage at which to begin intercepting requests. Default is Request.
---Response HTTP header entry
---@class CDP.Fetch.HeaderEntry
---@field name string
---@field value string
---Authorization challenge for HTTP status code 401 or 407.
---@class CDP.Fetch.AuthChallenge
---@field source? "Server" | "Proxy" Source of the authentication challenge.
---@field origin string Origin of the challenger.
---@field scheme string The authentication scheme used, such as basic or digest
---@field realm string The realm of the challenge. May be empty.
---Response to an AuthChallenge.
---@class CDP.Fetch.AuthChallengeResponse
---@field response "Default" | "CancelAuth" | "ProvideCredentials" The decision on what to do in response to the authorization challenge.  Default means<br>deferring to the default behavior of the net stack, which will likely either the Cancel<br>authentication or display a popup dialog box.
---@field username? string The username to provide, possibly empty. Should only be set if response is<br>ProvideCredentials.
---@field password? string The password to provide, possibly empty. Should only be set if response is<br>ProvideCredentials.
---@class CDP.Fetch.enable_parameters
---@field patterns? CDP.Fetch.RequestPattern[] If specified, only requests matching any of these patterns will produce<br>fetchRequested event and will be paused until clients response. If not set,<br>all requests will be affected.
---@field handleAuthRequests? boolean If true, authRequired events will be issued and requests will be paused<br>expecting a call to continueWithAuth.
---@class CDP.Fetch.failRequest_parameters
---@field requestId CDP.Fetch.RequestId An id the client received in requestPaused event.
---@field errorReason CDP.Network.ErrorReason Causes the request to fail with the given reason.
---@class CDP.Fetch.fulfillRequest_parameters
---@field requestId CDP.Fetch.RequestId An id the client received in requestPaused event.
---@field responseCode integer An HTTP response code.
---@field responseHeaders? CDP.Fetch.HeaderEntry[] Response headers.
---@field binaryResponseHeaders? string Alternative way of specifying response headers as a \0-separated<br>series of name: value pairs. Prefer the above method unless you<br>need to represent some non-UTF8 values that can't be transmitted<br>over the protocol as text. (Encoded as a base64 string when passed over JSON)
---@field body? string A response body. If absent, original response body will be used if<br>the request is intercepted at the response stage and empty body<br>will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)
---@field responsePhrase? string A textual representation of responseCode.<br>If absent, a standard phrase matching responseCode is used.
---@class CDP.Fetch.continueRequest_parameters
---@field requestId CDP.Fetch.RequestId An id the client received in requestPaused event.
---@field url? string If set, the request url will be modified in a way that's not observable by page.
---@field method? string If set, the request method is overridden.
---@field postData? string If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)
---@field headers? CDP.Fetch.HeaderEntry[] If set, overrides the request headers. Note that the overrides do not<br>extend to subsequent redirect hops, if a redirect happens. Another override<br>may be applied to a different request produced by a redirect.
---@field interceptResponse? boolean If set, overrides response interception behavior for this request.
---@class CDP.Fetch.continueWithAuth_parameters
---@field requestId CDP.Fetch.RequestId An id the client received in authRequired event.
---@field authChallengeResponse CDP.Fetch.AuthChallengeResponse Response to  with an authChallenge.
---@class CDP.Fetch.continueResponse_parameters
---@field requestId CDP.Fetch.RequestId An id the client received in requestPaused event.
---@field responseCode? integer An HTTP response code. If absent, original response code will be used.
---@field responsePhrase? string A textual representation of responseCode.<br>If absent, a standard phrase matching responseCode is used.
---@field responseHeaders? CDP.Fetch.HeaderEntry[] Response headers. If absent, original response headers will be used.
---@field binaryResponseHeaders? string Alternative way of specifying response headers as a \0-separated<br>series of name: value pairs. Prefer the above method unless you<br>need to represent some non-UTF8 values that can't be transmitted<br>over the protocol as text. (Encoded as a base64 string when passed over JSON)
---@class CDP.Fetch.getResponseBody_parameters
---@field requestId CDP.Fetch.RequestId Identifier for the intercepted request to get body for.
---@class CDP.Fetch.getResponseBody_return
---@field body string Response body.
---@field base64Encoded boolean True, if content was sent as base64.
---@class CDP.Fetch.takeResponseBodyAsStream_parameters
---@field requestId CDP.Fetch.RequestId
---@class CDP.Fetch.takeResponseBodyAsStream_return
---@field stream CDP.IO.StreamHandle
---@class CDP.Fetch.requestPaused_event
---@field requestId CDP.Fetch.RequestId Each request the page makes will have a unique id.
---@field request CDP.Network.Request The details of the request.
---@field frameId CDP.Page.FrameId The id of the frame that initiated the request.
---@field resourceType CDP.Network.ResourceType How the requested resource will be used.
---@field responseErrorReason? CDP.Network.ErrorReason Response error if intercepted at response stage.
---@field responseStatusCode? integer Response code if intercepted at response stage.
---@field responseStatusText? string Response status text if intercepted at response stage.
---@field responseHeaders? CDP.Fetch.HeaderEntry[] Response headers if intercepted at the response stage.
---@field networkId? CDP.Network.RequestId If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,<br>then this networkId will be the same as the requestId present in the requestWillBeSent event.
---@field redirectedRequestId? CDP.Fetch.RequestId If the request is due to a redirect response from the server, the id of the request that<br>has caused the redirect.
---@class CDP.Fetch.authRequired_event
---@field requestId CDP.Fetch.RequestId Each request the page makes will have a unique id.
---@field request CDP.Network.Request The details of the request.
---@field frameId CDP.Page.FrameId The id of the frame that initiated the request.
---@field resourceType CDP.Network.ResourceType How the requested resource will be used.
---@field authChallenge CDP.Fetch.AuthChallenge Details of the Authorization Challenge encountered.<br>If this is set, client should respond with continueRequest that<br>contains AuthChallengeResponse.
---A domain for letting clients substitute browser's network layer with client code.
---@class CDP.Fetch: CDP._ClientContainer
---Disables the fetch domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Enables issuing of requestPaused events. A request will be paused until client
---calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
---@field enable fun(self: CDP._ClientContainer, params: CDP.Fetch.enable_parameters): CDP.Error?
---Causes the request to fail with specified reason.
---@field failRequest fun(self: CDP._ClientContainer, params: CDP.Fetch.failRequest_parameters): CDP.Error?
---Provides response to the request.
---@field fulfillRequest fun(self: CDP._ClientContainer, params: CDP.Fetch.fulfillRequest_parameters): CDP.Error?
---Continues the request, optionally modifying some of its parameters.
---@field continueRequest fun(self: CDP._ClientContainer, params: CDP.Fetch.continueRequest_parameters): CDP.Error?
---Continues a request supplying authChallengeResponse following authRequired event.
---@field continueWithAuth fun(self: CDP._ClientContainer, params: CDP.Fetch.continueWithAuth_parameters): CDP.Error?
---Continues loading of the paused response, optionally modifying the
---response headers. If either responseCode or headers are modified, all of them
---must be present.
---@field continueResponse fun(self: CDP._ClientContainer, params: CDP.Fetch.continueResponse_parameters): CDP.Error?
---Causes the body of the response to be received from the server and
---returned as a single string. May only be issued for a request that
---is paused in the Response stage and is mutually exclusive with
---takeResponseBodyForInterceptionAsStream. Calling other methods that
---affect the request or disabling fetch domain before body is received
---results in an undefined behavior.
---Note that the response body is not available for redirects. Requests
---paused in the _redirect received_ state may be differentiated by
---`responseCode` and presence of `location` response header, see
---comments to `requestPaused` for details.
---@field getResponseBody fun(self: CDP._ClientContainer, params: CDP.Fetch.getResponseBody_parameters): CDP.Error?, CDP.Fetch.getResponseBody_return?
---Returns a handle to the stream representing the response body.
---The request must be paused in the HeadersReceived stage.
---Note that after this command the request can't be continued
---as is -- client either needs to cancel it or to provide the
---response body.
---The stream only supports sequential read, IO.read will fail if the position
---is specified.
---This method is mutually exclusive with getResponseBody.
---Calling other methods that affect the request or disabling fetch
---domain before body is received results in an undefined behavior.
---@field takeResponseBodyAsStream fun(self: CDP._ClientContainer, params: CDP.Fetch.takeResponseBodyAsStream_parameters): CDP.Error?, CDP.Fetch.takeResponseBodyAsStream_return?
---Issued when the domain is enabled and the request URL matches the
---specified filter. The request is paused until the client responds
---with one of continueRequest, failRequest or fulfillRequest.
---The stage of the request can be determined by presence of responseErrorReason
---and responseStatusCode -- the request is at the response stage if either
---of these fields is present and in the request stage otherwise.
---Redirect responses and subsequent requests are reported similarly to regular
---responses and requests. Redirect responses may be distinguished by the value
---of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
---presence of the `location` header. Requests resulting from a redirect will
---have `redirectedRequestId` field set.
---@field requestPaused fun(self: CDP._ClientContainer, cb: fun(event: CDP.Fetch.requestPaused_event)): CDP.Error?
---Issued when the domain is enabled with handleAuthRequests set to true.
---The request is paused until client responds with continueWithAuth.
---@field authRequired fun(self: CDP._ClientContainer, cb: fun(event: CDP.Fetch.authRequired_event)): CDP.Error?

---@alias CDP.WebAudio.GraphObjectId string An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
---@alias CDP.WebAudio.ContextType "realtime" | "offline" Enum of BaseAudioContext types
---@alias CDP.WebAudio.ContextState "suspended" | "running" | "closed" Enum of AudioContextState from the spec
---@alias CDP.WebAudio.NodeType string Enum of AudioNode types
---@alias CDP.WebAudio.ChannelCountMode "clamped-max" | "explicit" | "max" Enum of AudioNode::ChannelCountMode from the spec
---@alias CDP.WebAudio.ChannelInterpretation "discrete" | "speakers" Enum of AudioNode::ChannelInterpretation from the spec
---@alias CDP.WebAudio.ParamType string Enum of AudioParam types
---@alias CDP.WebAudio.AutomationRate "a-rate" | "k-rate" Enum of AudioParam::AutomationRate from the spec
---Fields in AudioContext that change in real-time.
---@class CDP.WebAudio.ContextRealtimeData
---@field currentTime number The current context time in second in BaseAudioContext.
---@field renderCapacity number The time spent on rendering graph divided by render quantum duration,<br>and multiplied by 100. 100 means the audio renderer reached the full<br>capacity and glitch may occur.
---@field callbackIntervalMean number A running mean of callback interval.
---@field callbackIntervalVariance number A running variance of callback interval.
---Protocol object for BaseAudioContext
---@class CDP.WebAudio.BaseAudioContext
---@field contextId CDP.WebAudio.GraphObjectId
---@field contextType CDP.WebAudio.ContextType
---@field contextState CDP.WebAudio.ContextState
---@field realtimeData? CDP.WebAudio.ContextRealtimeData
---@field callbackBufferSize number Platform-dependent callback buffer size.
---@field maxOutputChannelCount number Number of output channels supported by audio hardware in use.
---@field sampleRate number Context sample rate.
---Protocol object for AudioListener
---@class CDP.WebAudio.AudioListener
---@field listenerId CDP.WebAudio.GraphObjectId
---@field contextId CDP.WebAudio.GraphObjectId
---Protocol object for AudioNode
---@class CDP.WebAudio.AudioNode
---@field nodeId CDP.WebAudio.GraphObjectId
---@field contextId CDP.WebAudio.GraphObjectId
---@field nodeType CDP.WebAudio.NodeType
---@field numberOfInputs number
---@field numberOfOutputs number
---@field channelCount number
---@field channelCountMode CDP.WebAudio.ChannelCountMode
---@field channelInterpretation CDP.WebAudio.ChannelInterpretation
---Protocol object for AudioParam
---@class CDP.WebAudio.AudioParam
---@field paramId CDP.WebAudio.GraphObjectId
---@field nodeId CDP.WebAudio.GraphObjectId
---@field contextId CDP.WebAudio.GraphObjectId
---@field paramType CDP.WebAudio.ParamType
---@field rate CDP.WebAudio.AutomationRate
---@field defaultValue number
---@field minValue number
---@field maxValue number
---@class CDP.WebAudio.getRealtimeData_parameters
---@field contextId CDP.WebAudio.GraphObjectId
---@class CDP.WebAudio.getRealtimeData_return
---@field realtimeData CDP.WebAudio.ContextRealtimeData
---@class CDP.WebAudio.contextCreated_event
---@field context CDP.WebAudio.BaseAudioContext
---@class CDP.WebAudio.contextWillBeDestroyed_event
---@field contextId CDP.WebAudio.GraphObjectId
---@class CDP.WebAudio.contextChanged_event
---@field context CDP.WebAudio.BaseAudioContext
---@class CDP.WebAudio.audioListenerCreated_event
---@field listener CDP.WebAudio.AudioListener
---@class CDP.WebAudio.audioListenerWillBeDestroyed_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field listenerId CDP.WebAudio.GraphObjectId
---@class CDP.WebAudio.audioNodeCreated_event
---@field node CDP.WebAudio.AudioNode
---@class CDP.WebAudio.audioNodeWillBeDestroyed_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field nodeId CDP.WebAudio.GraphObjectId
---@class CDP.WebAudio.audioParamCreated_event
---@field param CDP.WebAudio.AudioParam
---@class CDP.WebAudio.audioParamWillBeDestroyed_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field nodeId CDP.WebAudio.GraphObjectId
---@field paramId CDP.WebAudio.GraphObjectId
---@class CDP.WebAudio.nodesConnected_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field sourceId CDP.WebAudio.GraphObjectId
---@field destinationId CDP.WebAudio.GraphObjectId
---@field sourceOutputIndex? number
---@field destinationInputIndex? number
---@class CDP.WebAudio.nodesDisconnected_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field sourceId CDP.WebAudio.GraphObjectId
---@field destinationId CDP.WebAudio.GraphObjectId
---@field sourceOutputIndex? number
---@field destinationInputIndex? number
---@class CDP.WebAudio.nodeParamConnected_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field sourceId CDP.WebAudio.GraphObjectId
---@field destinationId CDP.WebAudio.GraphObjectId
---@field sourceOutputIndex? number
---@class CDP.WebAudio.nodeParamDisconnected_event
---@field contextId CDP.WebAudio.GraphObjectId
---@field sourceId CDP.WebAudio.GraphObjectId
---@field destinationId CDP.WebAudio.GraphObjectId
---@field sourceOutputIndex? number
---This domain allows inspection of Web Audio API.
---https://webaudio.github.io/web-audio-api/
---@class CDP.WebAudio: CDP._ClientContainer
---Enables the WebAudio domain and starts sending context lifetime events.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Disables the WebAudio domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Fetch the realtime data from the registered contexts.
---@field getRealtimeData fun(self: CDP._ClientContainer, params: CDP.WebAudio.getRealtimeData_parameters): CDP.Error?, CDP.WebAudio.getRealtimeData_return?
---Notifies that a new BaseAudioContext has been created.
---@field contextCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.contextCreated_event)): CDP.Error?
---Notifies that an existing BaseAudioContext will be destroyed.
---@field contextWillBeDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.contextWillBeDestroyed_event)): CDP.Error?
---Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
---@field contextChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.contextChanged_event)): CDP.Error?
---Notifies that the construction of an AudioListener has finished.
---@field audioListenerCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioListenerCreated_event)): CDP.Error?
---Notifies that a new AudioListener has been created.
---@field audioListenerWillBeDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioListenerWillBeDestroyed_event)): CDP.Error?
---Notifies that a new AudioNode has been created.
---@field audioNodeCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioNodeCreated_event)): CDP.Error?
---Notifies that an existing AudioNode has been destroyed.
---@field audioNodeWillBeDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioNodeWillBeDestroyed_event)): CDP.Error?
---Notifies that a new AudioParam has been created.
---@field audioParamCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioParamCreated_event)): CDP.Error?
---Notifies that an existing AudioParam has been destroyed.
---@field audioParamWillBeDestroyed fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.audioParamWillBeDestroyed_event)): CDP.Error?
---Notifies that two AudioNodes are connected.
---@field nodesConnected fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.nodesConnected_event)): CDP.Error?
---Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
---@field nodesDisconnected fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.nodesDisconnected_event)): CDP.Error?
---Notifies that an AudioNode is connected to an AudioParam.
---@field nodeParamConnected fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.nodeParamConnected_event)): CDP.Error?
---Notifies that an AudioNode is disconnected to an AudioParam.
---@field nodeParamDisconnected fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAudio.nodeParamDisconnected_event)): CDP.Error?

---@alias CDP.WebAuthn.AuthenticatorId string
---@alias CDP.WebAuthn.AuthenticatorProtocol "u2f" | "ctap2"
---@alias CDP.WebAuthn.Ctap2Version "ctap2_0" | "ctap2_1"
---@alias CDP.WebAuthn.AuthenticatorTransport "usb" | "nfc" | "ble" | "cable" | "internal"
---@class CDP.WebAuthn.VirtualAuthenticatorOptions
---@field protocol CDP.WebAuthn.AuthenticatorProtocol
---@field ctap2Version? CDP.WebAuthn.Ctap2Version Defaults to ctap2_0. Ignored if |protocol| == u2f.
---@field transport CDP.WebAuthn.AuthenticatorTransport
---@field hasResidentKey? boolean Defaults to false.
---@field hasUserVerification? boolean Defaults to false.
---@field hasLargeBlob? boolean If set to true, the authenticator will support the largeBlob extension.<br>https://w3c.github.io/webauthn#largeBlob<br>Defaults to false.
---@field hasCredBlob? boolean If set to true, the authenticator will support the credBlob extension.<br>https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension<br>Defaults to false.
---@field hasMinPinLength? boolean If set to true, the authenticator will support the minPinLength extension.<br>https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension<br>Defaults to false.
---@field hasPrf? boolean If set to true, the authenticator will support the prf extension.<br>https://w3c.github.io/webauthn/#prf-extension<br>Defaults to false.
---@field automaticPresenceSimulation? boolean If set to true, tests of user presence will succeed immediately.<br>Otherwise, they will not be resolved. Defaults to true.
---@field isUserVerified? boolean Sets whether User Verification succeeds or fails for an authenticator.<br>Defaults to false.
---@class CDP.WebAuthn.Credential
---@field credentialId string
---@field isResidentCredential boolean
---@field rpId? string Relying Party ID the credential is scoped to. Must be set when adding a<br>credential.
---@field privateKey string The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)
---@field userHandle? string An opaque byte sequence with a maximum size of 64 bytes mapping the<br>credential to a specific user. (Encoded as a base64 string when passed over JSON)
---@field signCount integer Signature counter. This is incremented by one for each successful<br>assertion.<br>See https://w3c.github.io/webauthn/#signature-counter
---@field largeBlob? string The large blob associated with the credential.<br>See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)
---@class CDP.WebAuthn.enable_parameters
---@field enableUI? boolean Whether to enable the WebAuthn user interface. Enabling the UI is<br>recommended for debugging and demo purposes, as it is closer to the real<br>experience. Disabling the UI is recommended for automated testing.<br>Supported at the embedder's discretion if UI is available.<br>Defaults to false.
---@class CDP.WebAuthn.addVirtualAuthenticator_parameters
---@field options CDP.WebAuthn.VirtualAuthenticatorOptions
---@class CDP.WebAuthn.addVirtualAuthenticator_return
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@class CDP.WebAuthn.setResponseOverrideBits_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field isBogusSignature? boolean If isBogusSignature is set, overrides the signature in the authenticator response to be zero.<br>Defaults to false.
---@field isBadUV? boolean If isBadUV is set, overrides the UV bit in the flags in the authenticator response to<br>be zero. Defaults to false.
---@field isBadUP? boolean If isBadUP is set, overrides the UP bit in the flags in the authenticator response to<br>be zero. Defaults to false.
---@class CDP.WebAuthn.removeVirtualAuthenticator_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@class CDP.WebAuthn.addCredential_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field credential CDP.WebAuthn.Credential
---@class CDP.WebAuthn.getCredential_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field credentialId string
---@class CDP.WebAuthn.getCredential_return
---@field credential CDP.WebAuthn.Credential
---@class CDP.WebAuthn.getCredentials_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@class CDP.WebAuthn.getCredentials_return
---@field credentials CDP.WebAuthn.Credential[]
---@class CDP.WebAuthn.removeCredential_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field credentialId string
---@class CDP.WebAuthn.clearCredentials_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@class CDP.WebAuthn.setUserVerified_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field isUserVerified boolean
---@class CDP.WebAuthn.setAutomaticPresenceSimulation_parameters
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field enabled boolean
---@class CDP.WebAuthn.credentialAdded_event
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field credential CDP.WebAuthn.Credential
---@class CDP.WebAuthn.credentialAsserted_event
---@field authenticatorId CDP.WebAuthn.AuthenticatorId
---@field credential CDP.WebAuthn.Credential
---This domain allows configuring virtual authenticators to test the WebAuthn
---API.
---@class CDP.WebAuthn: CDP._ClientContainer
---Enable the WebAuthn domain and start intercepting credential storage and
---retrieval with a virtual authenticator.
---@field enable fun(self: CDP._ClientContainer, params: CDP.WebAuthn.enable_parameters): CDP.Error?
---Disable the WebAuthn domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Creates and adds a virtual authenticator.
---@field addVirtualAuthenticator fun(self: CDP._ClientContainer, params: CDP.WebAuthn.addVirtualAuthenticator_parameters): CDP.Error?, CDP.WebAuthn.addVirtualAuthenticator_return?
---Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
---@field setResponseOverrideBits fun(self: CDP._ClientContainer, params: CDP.WebAuthn.setResponseOverrideBits_parameters): CDP.Error?
---Removes the given authenticator.
---@field removeVirtualAuthenticator fun(self: CDP._ClientContainer, params: CDP.WebAuthn.removeVirtualAuthenticator_parameters): CDP.Error?
---Adds the credential to the specified authenticator.
---@field addCredential fun(self: CDP._ClientContainer, params: CDP.WebAuthn.addCredential_parameters): CDP.Error?
---Returns a single credential stored in the given virtual authenticator that
---matches the credential ID.
---@field getCredential fun(self: CDP._ClientContainer, params: CDP.WebAuthn.getCredential_parameters): CDP.Error?, CDP.WebAuthn.getCredential_return?
---Returns all the credentials stored in the given virtual authenticator.
---@field getCredentials fun(self: CDP._ClientContainer, params: CDP.WebAuthn.getCredentials_parameters): CDP.Error?, CDP.WebAuthn.getCredentials_return?
---Removes a credential from the authenticator.
---@field removeCredential fun(self: CDP._ClientContainer, params: CDP.WebAuthn.removeCredential_parameters): CDP.Error?
---Clears all the credentials from the specified device.
---@field clearCredentials fun(self: CDP._ClientContainer, params: CDP.WebAuthn.clearCredentials_parameters): CDP.Error?
---Sets whether User Verification succeeds or fails for an authenticator.
---The default is true.
---@field setUserVerified fun(self: CDP._ClientContainer, params: CDP.WebAuthn.setUserVerified_parameters): CDP.Error?
---Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
---The default is true.
---@field setAutomaticPresenceSimulation fun(self: CDP._ClientContainer, params: CDP.WebAuthn.setAutomaticPresenceSimulation_parameters): CDP.Error?
---Triggered when a credential is added to an authenticator.
---@field credentialAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAuthn.credentialAdded_event)): CDP.Error?
---Triggered when a credential is used in a webauthn assertion.
---@field credentialAsserted fun(self: CDP._ClientContainer, cb: fun(event: CDP.WebAuthn.credentialAsserted_event)): CDP.Error?

---@alias CDP.Media.PlayerId string Players will get an ID that is unique within the agent context.
---@alias CDP.Media.Timestamp number
---Have one type per entry in MediaLogRecord::Type
---Corresponds to kMessage
---@class CDP.Media.PlayerMessage
---@field level "error" | "warning" | "info" | "debug" Keep in sync with MediaLogMessageLevel<br>We are currently keeping the message level 'error' separate from the<br>PlayerError type because right now they represent different things,<br>this one being a DVLOG(ERROR) style log message that gets printed<br>based on what log level is selected in the UI, and the other is a<br>representation of a media::PipelineStatus object. Soon however we're<br>going to be moving away from using PipelineStatus for errors and<br>introducing a new error type which should hopefully let us integrate<br>the error log level into the PlayerError type.
---@field message string
---Corresponds to kMediaPropertyChange
---@class CDP.Media.PlayerProperty
---@field name string
---@field value string
---Corresponds to kMediaEventTriggered
---@class CDP.Media.PlayerEvent
---@field timestamp CDP.Media.Timestamp
---@field value string
---Represents logged source line numbers reported in an error.
---NOTE: file and line are from chromium c++ implementation code, not js.
---@class CDP.Media.PlayerErrorSourceLocation
---@field file string
---@field line integer
---Corresponds to kMediaError
---@class CDP.Media.PlayerError
---@field errorType string
---@field code integer Code is the numeric enum entry for a specific set of error codes, such<br>as PipelineStatusCodes in media/base/pipeline_status.h
---@field stack CDP.Media.PlayerErrorSourceLocation[] A trace of where this error was caused / where it passed through.
---@field cause CDP.Media.PlayerError[] Errors potentially have a root cause error, ie, a DecoderError might be<br>caused by an WindowsError
---@field data table Extra data attached to an error, such as an HRESULT, Video Codec, etc.
---@class CDP.Media.playerPropertiesChanged_event
---@field playerId CDP.Media.PlayerId
---@field properties CDP.Media.PlayerProperty[]
---@class CDP.Media.playerEventsAdded_event
---@field playerId CDP.Media.PlayerId
---@field events CDP.Media.PlayerEvent[]
---@class CDP.Media.playerMessagesLogged_event
---@field playerId CDP.Media.PlayerId
---@field messages CDP.Media.PlayerMessage[]
---@class CDP.Media.playerErrorsRaised_event
---@field playerId CDP.Media.PlayerId
---@field errors CDP.Media.PlayerError[]
---@class CDP.Media.playersCreated_event
---@field players CDP.Media.PlayerId[]
---This domain allows detailed inspection of media elements
---@class CDP.Media: CDP._ClientContainer
---Enables the Media domain
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Disables the Media domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---This can be called multiple times, and can be used to set / override /
---remove player properties. A null propValue indicates removal.
---@field playerPropertiesChanged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Media.playerPropertiesChanged_event)): CDP.Error?
---Send events as a list, allowing them to be batched on the browser for less
---congestion. If batched, events must ALWAYS be in chronological order.
---@field playerEventsAdded fun(self: CDP._ClientContainer, cb: fun(event: CDP.Media.playerEventsAdded_event)): CDP.Error?
---Send a list of any messages that need to be delivered.
---@field playerMessagesLogged fun(self: CDP._ClientContainer, cb: fun(event: CDP.Media.playerMessagesLogged_event)): CDP.Error?
---Send a list of any errors that need to be delivered.
---@field playerErrorsRaised fun(self: CDP._ClientContainer, cb: fun(event: CDP.Media.playerErrorsRaised_event)): CDP.Error?
---Called whenever a player is created, or when a new agent joins and receives
---a list of active players. If an agent is restored, it will receive the full
---list of player ids and all events again.
---@field playersCreated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Media.playersCreated_event)): CDP.Error?

---@alias CDP.DeviceAccess.RequestId string Device request id.
---@alias CDP.DeviceAccess.DeviceId string A device id.
---Device information displayed in a user prompt to select a device.
---@class CDP.DeviceAccess.PromptDevice
---@field id CDP.DeviceAccess.DeviceId
---@field name string Display name as it appears in a device request user prompt.
---@class CDP.DeviceAccess.selectPrompt_parameters
---@field id CDP.DeviceAccess.RequestId
---@field deviceId CDP.DeviceAccess.DeviceId
---@class CDP.DeviceAccess.cancelPrompt_parameters
---@field id CDP.DeviceAccess.RequestId
---@class CDP.DeviceAccess.deviceRequestPrompted_event
---@field id CDP.DeviceAccess.RequestId
---@field devices CDP.DeviceAccess.PromptDevice[]
---@class CDP.DeviceAccess: CDP._ClientContainer
---Enable events in this domain.
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---Disable events in this domain.
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Select a device in response to a DeviceAccess.deviceRequestPrompted event.
---@field selectPrompt fun(self: CDP._ClientContainer, params: CDP.DeviceAccess.selectPrompt_parameters): CDP.Error?
---Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
---@field cancelPrompt fun(self: CDP._ClientContainer, params: CDP.DeviceAccess.cancelPrompt_parameters): CDP.Error?
---A device request opened a user prompt to select a device. Respond with the
---selectPrompt or cancelPrompt command.
---@field deviceRequestPrompted fun(self: CDP._ClientContainer, cb: fun(event: CDP.DeviceAccess.deviceRequestPrompted_event)): CDP.Error?

---@alias CDP.Preload.RuleSetId string Unique id
---Corresponds to SpeculationRuleSet
---@class CDP.Preload.RuleSet
---@field id CDP.Preload.RuleSetId
---@field loaderId CDP.Network.LoaderId Identifies a document which the rule set is associated with.
---@field sourceText string Source text of JSON representing the rule set. If it comes from<br>`<script>` tag, it is the textContent of the node. Note that it is<br>a JSON for valid case.<br><br>See also:<br>- https://wicg.github.io/nav-speculation/speculation-rules.html<br>- https://github.com/WICG/nav-speculation/blob/main/triggers.md
---@field backendNodeId? CDP.DOM.BackendNodeId A speculation rule set is either added through an inline<br>`<script>` tag or through an external resource via the<br>'Speculation-Rules' HTTP header. For the first case, we include<br>the BackendNodeId of the relevant `<script>` tag. For the second<br>case, we include the external URL where the rule set was loaded<br>from, and also RequestId if Network domain is enabled.<br><br>See also:<br>- https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script<br>- https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
---@field url? string
---@field requestId? CDP.Network.RequestId
---@field errorType? CDP.Preload.RuleSetErrorType Error information<br>`errorMessage` is null iff `errorType` is null.
---@field errorMessage? string TODO(https://crbug.com/1425354): Replace this property with structured error.
---@alias CDP.Preload.RuleSetErrorType "SourceIsNotJsonObject" | "InvalidRulesSkipped"
---@alias CDP.Preload.SpeculationAction "Prefetch" | "Prerender" The type of preloading attempted. It corresponds to<br>mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it<br>isn't being used by clients).
---@alias CDP.Preload.SpeculationTargetHint "Blank" | "Self" Corresponds to mojom::SpeculationTargetHint.<br>See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
---A key that identifies a preloading attempt.
---
---The url used is the url specified by the trigger (i.e. the initial URL), and
---not the final url that is navigated to. For example, prerendering allows
---same-origin main frame navigations during the attempt, but the attempt is
---still keyed with the initial URL.
---@class CDP.Preload.PreloadingAttemptKey
---@field loaderId CDP.Network.LoaderId
---@field action CDP.Preload.SpeculationAction
---@field url string
---@field targetHint? CDP.Preload.SpeculationTargetHint
---Lists sources for a preloading attempt, specifically the ids of rule sets
---that had a speculation rule that triggered the attempt, and the
---BackendNodeIds of <a href> or <area href> elements that triggered the
---attempt (in the case of attempts triggered by a document rule). It is
---possible for mulitple rule sets and links to trigger a single attempt.
---@class CDP.Preload.PreloadingAttemptSource
---@field key CDP.Preload.PreloadingAttemptKey
---@field ruleSetIds CDP.Preload.RuleSetId[]
---@field nodeIds CDP.DOM.BackendNodeId[]
---@alias CDP.Preload.PrerenderFinalStatus "Activated" | "Destroyed" | "LowEndDevice" | "InvalidSchemeRedirect" | "InvalidSchemeNavigation" | "InProgressNavigation" | "NavigationRequestBlockedByCsp" | "MainFrameNavigation" | "MojoBinderPolicy" | "RendererProcessCrashed" | "RendererProcessKilled" | "Download" | "TriggerDestroyed" | "NavigationNotCommitted" | "NavigationBadHttpStatus" | "ClientCertRequested" | "NavigationRequestNetworkError" | "MaxNumOfRunningPrerendersExceeded" | "CancelAllHostsForTesting" | "DidFailLoad" | "Stop" | "SslCertificateError" | "LoginAuthRequested" | "UaChangeRequiresReload" | "BlockedByClient" | "AudioOutputDeviceRequested" | "MixedContent" | "TriggerBackgrounded" | "MemoryLimitExceeded" | "FailToGetMemoryUsage" | "DataSaverEnabled" | "HasEffectiveUrl" | "ActivatedBeforeStarted" | "InactivePageRestriction" | "StartFailed" | "TimeoutBackgrounded" | "CrossSiteRedirectInInitialNavigation" | "CrossSiteNavigationInInitialNavigation" | "SameSiteCrossOriginRedirectNotOptInInInitialNavigation" | "SameSiteCrossOriginNavigationNotOptInInInitialNavigation" | "ActivationNavigationParameterMismatch" | "ActivatedInBackground" | "EmbedderHostDisallowed" | "ActivationNavigationDestroyedBeforeSuccess" | "TabClosedByUserGesture" | "TabClosedWithoutUserGesture" | "PrimaryMainFrameRendererProcessCrashed" | "PrimaryMainFrameRendererProcessKilled" | "ActivationFramePolicyNotCompatible" | "PreloadingDisabled" | "BatterySaverEnabled" | "ActivatedDuringMainFrameNavigation" | "PreloadingUnsupportedByWebContents" | "CrossSiteRedirectInMainFrameNavigation" | "CrossSiteNavigationInMainFrameNavigation" | "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation" | "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation" | "MemoryPressureOnTrigger" | "MemoryPressureAfterTriggered" | "PrerenderingDisabledByDevTools" | "ResourceLoadBlockedByClient" | "SpeculationRuleRemoved" | "ActivatedWithAuxiliaryBrowsingContexts" List of FinalStatus reasons for Prerender2.
---@alias CDP.Preload.PreloadingStatus "Pending" | "Running" | "Ready" | "Success" | "Failure" | "NotSupported" Preloading status values, see also PreloadingTriggeringOutcome. This<br>status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
---@alias CDP.Preload.PrefetchStatus "PrefetchAllowed" | "PrefetchFailedIneligibleRedirect" | "PrefetchFailedInvalidRedirect" | "PrefetchFailedMIMENotSupported" | "PrefetchFailedNetError" | "PrefetchFailedNon2XX" | "PrefetchFailedPerPageLimitExceeded" | "PrefetchEvicted" | "PrefetchHeldback" | "PrefetchIneligibleRetryAfter" | "PrefetchIsPrivacyDecoy" | "PrefetchIsStale" | "PrefetchNotEligibleBrowserContextOffTheRecord" | "PrefetchNotEligibleDataSaverEnabled" | "PrefetchNotEligibleExistingProxy" | "PrefetchNotEligibleHostIsNonUnique" | "PrefetchNotEligibleNonDefaultStoragePartition" | "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy" | "PrefetchNotEligibleSchemeIsNotHttps" | "PrefetchNotEligibleUserHasCookies" | "PrefetchNotEligibleUserHasServiceWorker" | "PrefetchNotEligibleBatterySaverEnabled" | "PrefetchNotEligiblePreloadingDisabled" | "PrefetchNotFinishedInTime" | "PrefetchNotStarted" | "PrefetchNotUsedCookiesChanged" | "PrefetchProxyNotAvailable" | "PrefetchResponseUsed" | "PrefetchSuccessfulButNotUsed" | "PrefetchNotUsedProbeFailed" TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and<br>filter out the ones that aren't necessary to the developers.
---@class CDP.Preload.ruleSetUpdated_event
---@field ruleSet CDP.Preload.RuleSet
---@class CDP.Preload.ruleSetRemoved_event
---@field id CDP.Preload.RuleSetId
---@class CDP.Preload.prerenderAttemptCompleted_event
---@field key CDP.Preload.PreloadingAttemptKey
---@field initiatingFrameId CDP.Page.FrameId The frame id of the frame initiating prerendering.
---@field prerenderingUrl string
---@field finalStatus CDP.Preload.PrerenderFinalStatus
---@field disallowedApiMethod? string This is used to give users more information about the name of the API call<br>that is incompatible with prerender and has caused the cancellation of the attempt
---@class CDP.Preload.preloadEnabledStateUpdated_event
---@field disabledByPreference boolean
---@field disabledByDataSaver boolean
---@field disabledByBatterySaver boolean
---@field disabledByHoldbackPrefetchSpeculationRules boolean
---@field disabledByHoldbackPrerenderSpeculationRules boolean
---@class CDP.Preload.prefetchStatusUpdated_event
---@field key CDP.Preload.PreloadingAttemptKey
---@field initiatingFrameId CDP.Page.FrameId The frame id of the frame initiating prefetch.
---@field prefetchUrl string
---@field status CDP.Preload.PreloadingStatus
---@field prefetchStatus CDP.Preload.PrefetchStatus
---@field requestId CDP.Network.RequestId
---@class CDP.Preload.prerenderStatusUpdated_event
---@field key CDP.Preload.PreloadingAttemptKey
---@field status CDP.Preload.PreloadingStatus
---@field prerenderStatus? CDP.Preload.PrerenderFinalStatus
---@field disallowedMojoInterface? string This is used to give users more information about the name of Mojo interface<br>that is incompatible with prerender and has caused the cancellation of the attempt.
---@class CDP.Preload.preloadingAttemptSourcesUpdated_event
---@field loaderId CDP.Network.LoaderId
---@field preloadingAttemptSources CDP.Preload.PreloadingAttemptSource[]
---@class CDP.Preload: CDP._ClientContainer
---@field enable fun(self: CDP._ClientContainer): CDP.Error?
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---Upsert. Currently, it is only emitted when a rule set added.
---@field ruleSetUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.ruleSetUpdated_event)): CDP.Error?
---@field ruleSetRemoved fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.ruleSetRemoved_event)): CDP.Error?
---Fired when a prerender attempt is completed.
---@field prerenderAttemptCompleted fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.prerenderAttemptCompleted_event)): CDP.Error?
---Fired when a preload enabled state is updated.
---@field preloadEnabledStateUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.preloadEnabledStateUpdated_event)): CDP.Error?
---Fired when a prefetch attempt is updated.
---@field prefetchStatusUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.prefetchStatusUpdated_event)): CDP.Error?
---Fired when a prerender attempt is updated.
---@field prerenderStatusUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.prerenderStatusUpdated_event)): CDP.Error?
---Send a list of sources for all preloading attempts in a document.
---@field preloadingAttemptSourcesUpdated fun(self: CDP._ClientContainer, cb: fun(event: CDP.Preload.preloadingAttemptSourcesUpdated_event)): CDP.Error?

---@alias CDP.FedCm.LoginState "SignIn" | "SignUp" Whether this is a sign-up or sign-in action for this account, i.e.<br>whether this account has ever been used to sign in to this RP before.
---@alias CDP.FedCm.DialogType "AccountChooser" | "AutoReauthn" | "ConfirmIdpSignin" Whether the dialog shown is an account chooser or an auto re-authentication dialog.
---Corresponds to IdentityRequestAccount
---@class CDP.FedCm.Account
---@field accountId string
---@field email string
---@field name string
---@field givenName string
---@field pictureUrl string
---@field idpConfigUrl string
---@field idpSigninUrl string
---@field loginState CDP.FedCm.LoginState
---@field termsOfServiceUrl? string These two are only set if the loginState is signUp
---@field privacyPolicyUrl? string
---@class CDP.FedCm.enable_parameters
---@field disableRejectionDelay? boolean Allows callers to disable the promise rejection delay that would<br>normally happen, if this is unimportant to what's being tested.<br>(step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
---@class CDP.FedCm.selectAccount_parameters
---@field dialogId string
---@field accountIndex integer
---@class CDP.FedCm.confirmIdpSignin_parameters
---@field dialogId string
---@class CDP.FedCm.dismissDialog_parameters
---@field dialogId string
---@field triggerCooldown? boolean
---@class CDP.FedCm.dialogShown_event
---@field dialogId string
---@field dialogType CDP.FedCm.DialogType
---@field accounts CDP.FedCm.Account[]
---@field title string These exist primarily so that the caller can verify the<br>RP context was used appropriately.
---@field subtitle? string
---This domain allows interacting with the FedCM dialog.
---@class CDP.FedCm: CDP._ClientContainer
---@field enable fun(self: CDP._ClientContainer, params: CDP.FedCm.enable_parameters): CDP.Error?
---@field disable fun(self: CDP._ClientContainer): CDP.Error?
---@field selectAccount fun(self: CDP._ClientContainer, params: CDP.FedCm.selectAccount_parameters): CDP.Error?
---Only valid if the dialog type is ConfirmIdpSignin. Acts as if the user had
---clicked the continue button.
---@field confirmIdpSignin fun(self: CDP._ClientContainer, params: CDP.FedCm.confirmIdpSignin_parameters): CDP.Error?
---@field dismissDialog fun(self: CDP._ClientContainer, params: CDP.FedCm.dismissDialog_parameters): CDP.Error?
---Resets the cooldown time, if any, to allow the next FedCM call to show
---a dialog even if one was recently dismissed by the user.
---@field resetCooldown fun(self: CDP._ClientContainer): CDP.Error?
---@field dialogShown fun(self: CDP._ClientContainer, cb: fun(event: CDP.FedCm.dialogShown_event)): CDP.Error?
---@class CDP
---@field Console CDP.Console
---@field Debugger CDP.Debugger
---@field HeapProfiler CDP.HeapProfiler
---@field Profiler CDP.Profiler
---@field Runtime CDP.Runtime
---@field Schema CDP.Schema
---@field Accessibility CDP.Accessibility
---@field Animation CDP.Animation
---@field Audits CDP.Audits
---@field Autofill CDP.Autofill
---@field BackgroundService CDP.BackgroundService
---@field Browser CDP.Browser
---@field CSS CDP.CSS
---@field CacheStorage CDP.CacheStorage
---@field Cast CDP.Cast
---@field DOM CDP.DOM
---@field DOMDebugger CDP.DOMDebugger
---@field EventBreakpoints CDP.EventBreakpoints
---@field DOMSnapshot CDP.DOMSnapshot
---@field DOMStorage CDP.DOMStorage
---@field Database CDP.Database
---@field DeviceOrientation CDP.DeviceOrientation
---@field Emulation CDP.Emulation
---@field HeadlessExperimental CDP.HeadlessExperimental
---@field IO CDP.IO
---@field IndexedDB CDP.IndexedDB
---@field Input CDP.Input
---@field Inspector CDP.Inspector
---@field LayerTree CDP.LayerTree
---@field Log CDP.Log
---@field Memory CDP.Memory
---@field Network CDP.Network
---@field Overlay CDP.Overlay
---@field Page CDP.Page
---@field Performance CDP.Performance
---@field PerformanceTimeline CDP.PerformanceTimeline
---@field Security CDP.Security
---@field ServiceWorker CDP.ServiceWorker
---@field Storage CDP.Storage
---@field SystemInfo CDP.SystemInfo
---@field Target CDP.Target
---@field Tethering CDP.Tethering
---@field Tracing CDP.Tracing
---@field Fetch CDP.Fetch
---@field WebAudio CDP.WebAudio
---@field WebAuthn CDP.WebAuthn
---@field Media CDP.Media
---@field DeviceAccess CDP.DeviceAccess
---@field Preload CDP.Preload
---@field FedCm CDP.FedCm
