chromedp/cdp/target/events.go

56 lines
1.9 KiB
Go
Raw Normal View History

2017-01-24 15:09:23 +00:00
package target
// Code generated by chromedp-gen. DO NOT EDIT.
2017-01-24 15:09:23 +00:00
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 {
TargetInfo *Info `json:"targetInfo"`
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"`
2017-06-30 23:55:30 +00:00
}
2017-01-24 15:09:23 +00:00
// EventTargetDestroyed issued when a target is destroyed.
type EventTargetDestroyed struct {
TargetID ID `json:"targetId"`
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-07-22 00:37:02 +00:00
SessionID SessionID `json:"sessionId"` // Identifier assigned to the session used to send/receive messages.
TargetInfo *Info `json:"targetInfo"`
WaitingForDebugger bool `json:"waitingForDebugger"`
2017-01-24 15:09:23 +00:00
}
// EventDetachedFromTarget issued when detached from target for any reason
2017-07-22 00:37:02 +00:00
// (including detachFromTarget command). Can be issued multiple times per target
// if multiple sessions have been attached to it.
2017-01-24 15:09:23 +00:00
type EventDetachedFromTarget struct {
2017-07-22 00:37:02 +00:00
SessionID SessionID `json:"sessionId"` // Detached session identifier.
2017-01-24 15:09:23 +00:00
}
2017-07-22 00:37:02 +00:00
// EventReceivedMessageFromTarget notifies about a new protocol message
// received from the session (as reported in attachedToTarget event).
2017-01-24 15:09:23 +00:00
type EventReceivedMessageFromTarget struct {
2017-07-22 00:37:02 +00:00
SessionID SessionID `json:"sessionId"` // Identifier of a session which sends a message.
Message string `json:"message"`
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
}