File: events.go

package info (click to toggle)
golang-github-chromedp-cdproto 0.0~git20230109.6b041c6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,584 kB
  • sloc: makefile: 2
file content (62 lines) | stat: -rw-r--r-- 2,510 bytes parent folder | download | duplicates (4)
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
package target

// Code generated by cdproto-gen. DO NOT EDIT.

// EventAttachedToTarget issued when attached to target because of
// auto-attach or attachToTarget command.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-attachedToTarget
type EventAttachedToTarget struct {
	SessionID          SessionID `json:"sessionId"` // Identifier assigned to the session used to send/receive messages.
	TargetInfo         *Info     `json:"targetInfo"`
	WaitingForDebugger bool      `json:"waitingForDebugger"`
}

// EventDetachedFromTarget issued when detached from target for any reason
// (including detachFromTarget command). Can be issued multiple times per target
// if multiple sessions have been attached to it.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-detachedFromTarget
type EventDetachedFromTarget struct {
	SessionID SessionID `json:"sessionId"` // Detached session identifier.
}

// EventReceivedMessageFromTarget notifies about a new protocol message
// received from the session (as reported in attachedToTarget event).
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-receivedMessageFromTarget
type EventReceivedMessageFromTarget struct {
	SessionID SessionID `json:"sessionId"` // Identifier of a session which sends a message.
	Message   string    `json:"message"`
}

// EventTargetCreated issued when a possible inspection target is created.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCreated
type EventTargetCreated struct {
	TargetInfo *Info `json:"targetInfo"`
}

// EventTargetDestroyed issued when a target is destroyed.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetDestroyed
type EventTargetDestroyed struct {
	TargetID ID `json:"targetId"`
}

// EventTargetCrashed issued when a target has crashed.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCrashed
type EventTargetCrashed struct {
	TargetID  ID     `json:"targetId"`
	Status    string `json:"status"`    // Termination status type.
	ErrorCode int64  `json:"errorCode"` // Termination error code.
}

// EventTargetInfoChanged issued when some information about a target has
// changed. This only happens between targetCreated and targetDestroyed.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetInfoChanged
type EventTargetInfoChanged struct {
	TargetInfo *Info `json:"targetInfo"`
}