domdebugger

package
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2017 License: MIT Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the DOMDebugger domain with the connection set to conn.

Types

type DOMBreakpointType

type DOMBreakpointType string

DOMBreakpointType DOM breakpoint type.

const (
	DOMBreakpointTypeNotSet            DOMBreakpointType = ""
	DOMBreakpointTypeSubtreeModified   DOMBreakpointType = "subtree-modified"
	DOMBreakpointTypeAttributeModified DOMBreakpointType = "attribute-modified"
	DOMBreakpointTypeNodeRemoved       DOMBreakpointType = "node-removed"
)

DOMBreakpointType as enums.

func (DOMBreakpointType) String

func (e DOMBreakpointType) String() string

func (DOMBreakpointType) Valid

func (e DOMBreakpointType) Valid() bool

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.

type GetEventListenersArgs

type GetEventListenersArgs struct {
	ObjectID runtime.RemoteObjectID `json:"objectId"`         // Identifier of the object to return listeners for.
	Depth    *int                   `json:"depth,omitempty"`  // 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"` // 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.
}

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.

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.

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

SetTargetName sets the TargetName optional argument. EventTarget interface name.

Note: This property 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

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 property 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL