Documentation ¶
Overview ¶
Package domdebugger implements 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.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type DOMBreakpointType
- type EventListener
- type GetEventListenersArgs
- type GetEventListenersReply
- type RemoveDOMBreakpointArgs
- type RemoveEventListenerBreakpointArgs
- type RemoveInstrumentationBreakpointArgs
- type RemoveXHRBreakpointArgs
- type SetDOMBreakpointArgs
- type SetEventListenerBreakpointArgs
- type SetInstrumentationBreakpointArgs
- type SetXHRBreakpointArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DOMBreakpointType ¶
type DOMBreakpointType int
DOMBreakpointType DOM breakpoint type.
const ( DOMBreakpointTypeNotSet DOMBreakpointType = iota DOMBreakpointTypeSubtreeModified DOMBreakpointTypeAttributeModified DOMBreakpointTypeNodeRemoved )
DOMBreakpointType as enums.
func (DOMBreakpointType) MarshalJSON ¶
func (e DOMBreakpointType) MarshalJSON() ([]byte, error)
MarshalJSON encodes enum into a string or null when not set.
func (DOMBreakpointType) String ¶
func (e DOMBreakpointType) String() string
func (*DOMBreakpointType) UnmarshalJSON ¶
func (e *DOMBreakpointType) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes a string value into a enum.
func (DOMBreakpointType) Valid ¶
func (e DOMBreakpointType) Valid() bool
Valid returns true if enum is set.
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 runtime.ScriptID `json:"scriptId"` // Script id of the handler code. LineNumber int `json:"lineNumber"` // Line number in the script (0-based). ColumnNumber int `json:"columnNumber"` // Column number in the script (0-based). Handler *runtime.RemoteObject `json:"handler,omitempty"` // Event handler function value. OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty"` // Event original handler function value. BackendNodeID *dom.BackendNodeID `json:"backendNodeId,omitempty"` // Node the listener is added to (if any). }
EventListener Object event listener.
Note: This type is experimental.
type GetEventListenersArgs ¶
type GetEventListenersArgs struct { ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to return listeners for. // Depth 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. // // Note: This property is experimental. Depth *int `json:"depth,omitempty"` // Pierce 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. // // Note: This property is experimental. Pierce *bool `json:"pierce,omitempty"` }
GetEventListenersArgs represents the arguments for GetEventListeners in the DOMDebugger domain.
func NewGetEventListenersArgs ¶
func NewGetEventListenersArgs(objectID runtime.RemoteObjectID) *GetEventListenersArgs
NewGetEventListenersArgs initializes GetEventListenersArgs with the required arguments.
func (*GetEventListenersArgs) SetDepth ¶
func (a *GetEventListenersArgs) SetDepth(depth int) *GetEventListenersArgs
SetDepth sets the Depth optional argument. 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.
Note: This argument is experimental.
func (*GetEventListenersArgs) SetPierce ¶
func (a *GetEventListenersArgs) SetPierce(pierce bool) *GetEventListenersArgs
SetPierce sets the Pierce optional argument. 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.
Note: This argument is experimental.
type GetEventListenersReply ¶
type GetEventListenersReply struct {
Listeners []EventListener `json:"listeners"` // Array of relevant listeners.
}
GetEventListenersReply represents the return values for GetEventListeners in the DOMDebugger domain.
type RemoveDOMBreakpointArgs ¶
type RemoveDOMBreakpointArgs struct { NodeID dom.NodeID `json:"nodeId"` // Identifier of the node to remove breakpoint from. Type DOMBreakpointType `json:"type"` // Type of the breakpoint to remove. }
RemoveDOMBreakpointArgs represents the arguments for RemoveDOMBreakpoint in the DOMDebugger domain.
func NewRemoveDOMBreakpointArgs ¶
func NewRemoveDOMBreakpointArgs(nodeID dom.NodeID, typ DOMBreakpointType) *RemoveDOMBreakpointArgs
NewRemoveDOMBreakpointArgs initializes RemoveDOMBreakpointArgs with the required arguments.
type RemoveEventListenerBreakpointArgs ¶
type RemoveEventListenerBreakpointArgs struct { EventName string `json:"eventName"` // Event name. // TargetName EventTarget interface name. // // Note: This property is experimental. TargetName *string `json:"targetName,omitempty"` }
RemoveEventListenerBreakpointArgs represents the arguments for RemoveEventListenerBreakpoint in the DOMDebugger domain.
func NewRemoveEventListenerBreakpointArgs ¶
func NewRemoveEventListenerBreakpointArgs(eventName string) *RemoveEventListenerBreakpointArgs
NewRemoveEventListenerBreakpointArgs initializes RemoveEventListenerBreakpointArgs with the required arguments.
func (*RemoveEventListenerBreakpointArgs) SetTargetName ¶
func (a *RemoveEventListenerBreakpointArgs) SetTargetName(targetName string) *RemoveEventListenerBreakpointArgs
SetTargetName sets the TargetName optional argument. EventTarget interface name.
Note: This argument is experimental.
type RemoveInstrumentationBreakpointArgs ¶
type RemoveInstrumentationBreakpointArgs struct {
EventName string `json:"eventName"` // Instrumentation name to stop on.
}
RemoveInstrumentationBreakpointArgs represents the arguments for RemoveInstrumentationBreakpoint in the DOMDebugger domain.
func NewRemoveInstrumentationBreakpointArgs ¶
func NewRemoveInstrumentationBreakpointArgs(eventName string) *RemoveInstrumentationBreakpointArgs
NewRemoveInstrumentationBreakpointArgs initializes RemoveInstrumentationBreakpointArgs with the required arguments.
type RemoveXHRBreakpointArgs ¶
type RemoveXHRBreakpointArgs struct {
URL string `json:"url"` // Resource URL substring.
}
RemoveXHRBreakpointArgs represents the arguments for RemoveXHRBreakpoint in the DOMDebugger domain.
func NewRemoveXHRBreakpointArgs ¶
func NewRemoveXHRBreakpointArgs(url string) *RemoveXHRBreakpointArgs
NewRemoveXHRBreakpointArgs initializes RemoveXHRBreakpointArgs with the required arguments.
type SetDOMBreakpointArgs ¶
type SetDOMBreakpointArgs struct { NodeID dom.NodeID `json:"nodeId"` // Identifier of the node to set breakpoint on. Type DOMBreakpointType `json:"type"` // Type of the operation to stop upon. }
SetDOMBreakpointArgs represents the arguments for SetDOMBreakpoint in the DOMDebugger domain.
func NewSetDOMBreakpointArgs ¶
func NewSetDOMBreakpointArgs(nodeID dom.NodeID, typ DOMBreakpointType) *SetDOMBreakpointArgs
NewSetDOMBreakpointArgs initializes SetDOMBreakpointArgs with the required arguments.
type SetEventListenerBreakpointArgs ¶
type SetEventListenerBreakpointArgs struct { EventName string `json:"eventName"` // DOM Event name to stop on (any DOM event will do). // TargetName EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget. // // Note: This property is experimental. TargetName *string `json:"targetName,omitempty"` }
SetEventListenerBreakpointArgs represents the arguments for SetEventListenerBreakpoint in the DOMDebugger domain.
func NewSetEventListenerBreakpointArgs ¶
func NewSetEventListenerBreakpointArgs(eventName string) *SetEventListenerBreakpointArgs
NewSetEventListenerBreakpointArgs initializes SetEventListenerBreakpointArgs with the required arguments.
func (*SetEventListenerBreakpointArgs) SetTargetName ¶
func (a *SetEventListenerBreakpointArgs) SetTargetName(targetName string) *SetEventListenerBreakpointArgs
SetTargetName sets the TargetName optional argument. EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget.
Note: This argument is experimental.
type SetInstrumentationBreakpointArgs ¶
type SetInstrumentationBreakpointArgs struct {
EventName string `json:"eventName"` // Instrumentation name to stop on.
}
SetInstrumentationBreakpointArgs represents the arguments for SetInstrumentationBreakpoint in the DOMDebugger domain.
func NewSetInstrumentationBreakpointArgs ¶
func NewSetInstrumentationBreakpointArgs(eventName string) *SetInstrumentationBreakpointArgs
NewSetInstrumentationBreakpointArgs initializes SetInstrumentationBreakpointArgs with the required arguments.
type SetXHRBreakpointArgs ¶
type SetXHRBreakpointArgs struct {
URL string `json:"url"` // Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
}
SetXHRBreakpointArgs represents the arguments for SetXHRBreakpoint in the DOMDebugger domain.
func NewSetXHRBreakpointArgs ¶
func NewSetXHRBreakpointArgs(url string) *SetXHRBreakpointArgs
NewSetXHRBreakpointArgs initializes SetXHRBreakpointArgs with the required arguments.