Documentation
¶
Overview ¶
Package domdebugger provides the Chrome DevTools Protocol commands, types, and events for the DOMDebugger domain.
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.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type CSPViolationType
- type DOMBreakpointType
- type EventListener
- type GetEventListenersParams
- type GetEventListenersResult
- type RemoveDOMBreakpointParams
- type RemoveEventListenerBreakpointParams
- type RemoveXHRBreakpointParams
- type SetBreakOnCSPViolationParams
- type SetDOMBreakpointParams
- type SetEventListenerBreakpointParams
- type SetXHRBreakpointParams
Constants ¶
const ( CommandGetEventListeners = "DOMDebugger.getEventListeners" CommandRemoveDOMBreakpoint = "DOMDebugger.removeDOMBreakpoint" CommandRemoveEventListenerBreakpoint = "DOMDebugger.removeEventListenerBreakpoint" CommandRemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint" CommandSetBreakOnCSPViolation = "DOMDebugger.setBreakOnCSPViolation" CommandSetDOMBreakpoint = "DOMDebugger.setDOMBreakpoint" CommandSetEventListenerBreakpoint = "DOMDebugger.setEventListenerBreakpoint" CommandSetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint" )
Command names.
Variables ¶
var GetEventListeners = cdp.Command[GetEventListenersParams, GetEventListenersResult]{Method: CommandGetEventListeners}
GetEventListeners returns event listeners of the given object.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-getEventListeners
var RemoveDOMBreakpoint = cdp.Command[RemoveDOMBreakpointParams, cdp.Empty]{Method: CommandRemoveDOMBreakpoint}
RemoveDOMBreakpoint removes DOM breakpoint that was set using setDOMBreakpoint.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeDOMBreakpoint
var RemoveEventListenerBreakpoint = cdp.Command[RemoveEventListenerBreakpointParams, cdp.Empty]{Method: CommandRemoveEventListenerBreakpoint}
RemoveEventListenerBreakpoint removes breakpoint on particular DOM event.
var RemoveXHRBreakpoint = cdp.Command[RemoveXHRBreakpointParams, cdp.Empty]{Method: CommandRemoveXHRBreakpoint}
RemoveXHRBreakpoint removes breakpoint from XMLHttpRequest.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeXHRBreakpoint
var SetBreakOnCSPViolation = cdp.Command[SetBreakOnCSPViolationParams, cdp.Empty]{Method: CommandSetBreakOnCSPViolation}
SetBreakOnCSPViolation sets breakpoint on particular CSP violations.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setBreakOnCSPViolation
var SetDOMBreakpoint = cdp.Command[SetDOMBreakpointParams, cdp.Empty]{Method: CommandSetDOMBreakpoint}
SetDOMBreakpoint sets breakpoint on particular operation with DOM.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setDOMBreakpoint
var SetEventListenerBreakpoint = cdp.Command[SetEventListenerBreakpointParams, cdp.Empty]{Method: CommandSetEventListenerBreakpoint}
SetEventListenerBreakpoint sets breakpoint on particular DOM event.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setEventListenerBreakpoint
var SetXHRBreakpoint = cdp.Command[SetXHRBreakpointParams, cdp.Empty]{Method: CommandSetXHRBreakpoint}
SetXHRBreakpoint sets breakpoint on XMLHttpRequest.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setXHRBreakpoint
Functions ¶
This section is empty.
Types ¶
type CSPViolationType ¶
type CSPViolationType string
CSPViolationType cSP Violation type.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-CSPViolationType
const ( CSPViolationTypeTrustedtypeSinkViolation CSPViolationType = "trustedtype-sink-violation" CSPViolationTypeTrustedtypePolicyViolation CSPViolationType = "trustedtype-policy-violation" )
CSPViolationType values.
func (CSPViolationType) String ¶
func (t CSPViolationType) String() string
String returns the CSPViolationType as string value.
type DOMBreakpointType ¶
type DOMBreakpointType string
DOMBreakpointType DOM breakpoint type.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-DOMBreakpointType
const ( DOMBreakpointTypeSubtreeModified DOMBreakpointType = "subtree-modified" DOMBreakpointTypeAttributeModified DOMBreakpointType = "attribute-modified" DOMBreakpointTypeNodeRemoved DOMBreakpointType = "node-removed" )
DOMBreakpointType values.
func (DOMBreakpointType) String ¶
func (t DOMBreakpointType) String() string
String returns the DOMBreakpointType as string value.
type EventListener ¶
type EventListener struct {
Type string `json:"type"` // EventListener's type.
UseCapture bool `json:"useCapture"` // EventListener's useCapture.
Passive bool `json:"passive"` // EventListener's passive flag.
Once bool `json:"once"` // EventListener's once flag.
ScriptID cdp.ScriptID `json:"scriptId"` // Script id of the handler code.
LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
ColumnNumber int64 `json:"columnNumber"` // Column number in the script (0-based).
Handler *runtime.RemoteObject `json:"handler,omitempty,omitzero"` // Event handler function value.
OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty,omitzero"` // Event original handler function value.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Node the listener is added to (if any).
}
EventListener object event listener.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-EventListener
type GetEventListenersParams ¶
type GetEventListenersParams struct {
ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to return listeners for.
Depth *int64 `json:"depth,omitempty,omitzero"` // The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
Pierce *bool `json:"pierce,omitempty,omitzero"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
}
GetEventListenersParams are the parameters of the command DOMDebugger.getEventListeners.
type GetEventListenersResult ¶ added in v0.157.3
type GetEventListenersResult struct {
Listeners []*EventListener `json:"listeners,omitempty,omitzero"` // Array of relevant listeners.
}
GetEventListenersResult is the result of the command DOMDebugger.getEventListeners.
type RemoveDOMBreakpointParams ¶
type RemoveDOMBreakpointParams struct {
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to remove breakpoint from.
Type DOMBreakpointType `json:"type"` // Type of the breakpoint to remove.
}
RemoveDOMBreakpointParams are the parameters of the command DOMDebugger.removeDOMBreakpoint.
type RemoveEventListenerBreakpointParams ¶
type RemoveEventListenerBreakpointParams struct {
EventName string `json:"eventName"` // Event name.
TargetName string `json:"targetName,omitempty,omitzero"` // EventTarget interface name.
}
RemoveEventListenerBreakpointParams are the parameters of the command DOMDebugger.removeEventListenerBreakpoint.
type RemoveXHRBreakpointParams ¶
type RemoveXHRBreakpointParams struct {
URL string `json:"url"` // Resource URL substring.
}
RemoveXHRBreakpointParams are the parameters of the command DOMDebugger.removeXHRBreakpoint.
type SetBreakOnCSPViolationParams ¶
type SetBreakOnCSPViolationParams struct {
ViolationTypes []CSPViolationType `json:"violationTypes"` // CSP Violations to stop upon.
}
SetBreakOnCSPViolationParams are the parameters of the command DOMDebugger.setBreakOnCSPViolation.
type SetDOMBreakpointParams ¶
type SetDOMBreakpointParams struct {
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to set breakpoint on.
Type DOMBreakpointType `json:"type"` // Type of the operation to stop upon.
}
SetDOMBreakpointParams are the parameters of the command DOMDebugger.setDOMBreakpoint.
type SetEventListenerBreakpointParams ¶
type SetEventListenerBreakpointParams struct {
EventName string `json:"eventName"` // DOM Event name to stop on (any DOM event will do).
TargetName string `json:"targetName,omitempty,omitzero"` // EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget.
}
SetEventListenerBreakpointParams are the parameters of the command DOMDebugger.setEventListenerBreakpoint.
type SetXHRBreakpointParams ¶
type SetXHRBreakpointParams struct {
URL string `json:"url"` // Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
}
SetXHRBreakpointParams are the parameters of the command DOMDebugger.setXHRBreakpoint.