1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
// Package eventbreakpoints provides the Chrome DevTools Protocol
// commands, types, and events for the EventBreakpoints domain.
//
// 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.
//
// Generated by the cdproto-gen command.
package eventbreakpoints
// Code generated by cdproto-gen. DO NOT EDIT.
import (
"context"
"github.com/chromedp/cdproto/cdp"
)
// SetInstrumentationBreakpointParams sets breakpoint on particular native
// event.
type SetInstrumentationBreakpointParams struct {
EventName string `json:"eventName"` // Instrumentation name to stop on.
}
// SetInstrumentationBreakpoint sets breakpoint on particular native event.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/EventBreakpoints#method-setInstrumentationBreakpoint
//
// parameters:
//
// eventName - Instrumentation name to stop on.
func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpointParams {
return &SetInstrumentationBreakpointParams{
EventName: eventName,
}
}
// Do executes EventBreakpoints.setInstrumentationBreakpoint against the provided context.
func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetInstrumentationBreakpoint, p, nil)
}
// RemoveInstrumentationBreakpointParams removes breakpoint on particular
// native event.
type RemoveInstrumentationBreakpointParams struct {
EventName string `json:"eventName"` // Instrumentation name to stop on.
}
// RemoveInstrumentationBreakpoint removes breakpoint on particular native
// event.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/EventBreakpoints#method-removeInstrumentationBreakpoint
//
// parameters:
//
// eventName - Instrumentation name to stop on.
func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBreakpointParams {
return &RemoveInstrumentationBreakpointParams{
EventName: eventName,
}
}
// Do executes EventBreakpoints.removeInstrumentationBreakpoint against the provided context.
func (p *RemoveInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRemoveInstrumentationBreakpoint, p, nil)
}
// Command names.
const (
CommandSetInstrumentationBreakpoint = "EventBreakpoints.setInstrumentationBreakpoint"
CommandRemoveInstrumentationBreakpoint = "EventBreakpoints.removeInstrumentationBreakpoint"
)
|