chromedp/cdp/target/events.go

54 lines
1.6 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
package target
// AUTOGENERATED. DO NOT EDIT.
import (
2017-01-26 07:28:34 +00:00
cdp "github.com/knq/chromedp/cdp"
2017-01-24 15:09:23 +00:00
)
// EventTargetCreated issued when a possible inspection target is created.
type EventTargetCreated struct {
2017-01-26 07:28:34 +00:00
TargetInfo *Info `json:"targetInfo,omitempty"`
2017-01-24 15:09:23 +00:00
}
2017-06-30 23:55:30 +00:00
// EventTargetInfoChanged issued when some information about a target has
// changed. This only happens between targetCreated and targetDestroyed.
type EventTargetInfoChanged struct {
TargetInfo *Info `json:"targetInfo,omitempty"`
}
2017-01-24 15:09:23 +00:00
// EventTargetDestroyed issued when a target is destroyed.
type EventTargetDestroyed struct {
2017-01-26 07:28:34 +00:00
TargetID ID `json:"targetId,omitempty"`
2017-01-24 15:09:23 +00:00
}
// EventAttachedToTarget issued when attached to target because of
// auto-attach or attachToTarget command.
type EventAttachedToTarget struct {
2017-01-26 07:28:34 +00:00
TargetInfo *Info `json:"targetInfo,omitempty"`
WaitingForDebugger bool `json:"waitingForDebugger,omitempty"`
2017-01-24 15:09:23 +00:00
}
// EventDetachedFromTarget issued when detached from target for any reason
// (including detachFromTarget command).
type EventDetachedFromTarget struct {
2017-01-26 07:28:34 +00:00
TargetID ID `json:"targetId,omitempty"`
2017-01-24 15:09:23 +00:00
}
// EventReceivedMessageFromTarget notifies about new protocol message from
// attached target.
type EventReceivedMessageFromTarget struct {
2017-01-26 07:28:34 +00:00
TargetID ID `json:"targetId,omitempty"`
Message string `json:"message,omitempty"`
2017-01-24 15:09:23 +00:00
}
2017-01-26 07:28:34 +00:00
// EventTypes all event types in the domain.
var EventTypes = []cdp.MethodType{
cdp.EventTargetTargetCreated,
2017-06-30 23:55:30 +00:00
cdp.EventTargetTargetInfoChanged,
2017-01-26 07:28:34 +00:00
cdp.EventTargetTargetDestroyed,
cdp.EventTargetAttachedToTarget,
cdp.EventTargetDetachedFromTarget,
cdp.EventTargetReceivedMessageFromTarget,
2017-01-24 15:09:23 +00:00
}